Hello community,
here is the log from the commit of package cpanspec for openSUSE:Factory
checked in at Wed Apr 6 09:39:08 CEST 2011.
--------
--- cpanspec/cpanspec.changes 2011-02-20 02:02:20.000000000 +0100
+++ /mounts/work_src_done/STABLE/cpanspec/cpanspec.changes 2011-04-05 13:25:58.000000000 +0200
@@ -1,0 +2,16 @@
+Tue Apr 5 11:25:44 UTC 2011 - coolo@novell.com
+
+- also read out recommends
+
+-------------------------------------------------------------------
+Tue Apr 5 08:30:32 UTC 2011 - coolo@novell.com
+
+- %defattr is needed even without doc
+
+-------------------------------------------------------------------
+Fri Apr 1 09:42:27 UTC 2011 - coolo@novell.com
+
+- limit %description to the preamble of head1 - before the first
+ head2
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cpanspec.spec ++++++
--- /var/tmp/diff_new_pack.wABeWq/_old 2011-04-06 09:35:30.000000000 +0200
+++ /var/tmp/diff_new_pack.wABeWq/_new 2011-04-06 09:35:30.000000000 +0200
@@ -20,7 +20,7 @@
Name: cpanspec
Version: 1.78
-Release: 19
+Release: 21
%define tar_version 1.78
Summary: Generate a SUSE spec file for a CPAN module
License: GPL+ or Artistic
++++++ cpanspec.patch ++++++
--- /var/tmp/diff_new_pack.wABeWq/_old 2011-04-06 09:35:30.000000000 +0200
+++ /var/tmp/diff_new_pack.wABeWq/_new 2011-04-06 09:35:30.000000000 +0200
@@ -1,6 +1,7 @@
-diff -ruN cpanspec-1.78-orig/cpanspec cpanspec-1.78/cpanspec
---- cpanspec-1.78-orig/cpanspec 2009-01-16 21:35:55.000000000 +0100
-+++ cpanspec-1.78/cpanspec 2011-02-20 01:55:34.000000000 +0100
+Index: cpanspec-1.78/cpanspec
+===================================================================
+--- cpanspec-1.78.orig/cpanspec 2009-01-16 21:35:55.000000000 +0100
++++ cpanspec-1.78/cpanspec 2011-04-05 13:25:33.788388329 +0200
@@ -12,9 +12,6 @@
#
# $Id: cpanspec,v 1.67 2009/01/16 20:35:17 stevenpritchard Exp $
@@ -11,7 +12,7 @@
=head1 NAME
cpanspec - Generate a spec file for a CPAN module
-@@ -191,6 +188,9 @@
+@@ -191,6 +188,9 @@ L, L, Lhttp://www.cpan.org";
our $home=$ENV{'HOME'} || (getpwuid($<))[7];
-@@ -241,6 +241,8 @@
+@@ -241,6 +241,8 @@ our @add_requires;
our @add_provides;
our @add_buildrequires;
@@ -54,7 +55,7 @@
# env. vars and their macro analogues
my @MACROS = (
-@@ -252,7 +254,7 @@
+@@ -252,7 +254,7 @@ my @MACROS = (
# 1 is for the macros.
{
@@ -63,7 +64,7 @@
'buildroot' => '%{buildroot}',
},
);
-@@ -338,6 +340,62 @@
+@@ -338,6 +340,62 @@ sub update_packages() {
$updated=1;
}
@@ -126,7 +127,7 @@
sub build_rpm($) {
my $spec=shift;
my $dir=getcwd();
-@@ -387,10 +445,10 @@
+@@ -387,10 +445,10 @@ sub extract($$$) {
}
}
@@ -139,7 +140,7 @@
my $path=$args{module};
$path=~s,::,/,g;
-@@ -415,60 +473,95 @@
+@@ -415,60 +473,97 @@ sub get_description(%) {
last if $pm;
}
@@ -180,7 +181,6 @@
- warn "Failed to read $pm from $args{filename}"
- . ($args{type} eq 'tar'
- ? (": " . $args{archive}->error()) : "") . "\n";
-- }
+sub get_description($) {
+ my $cont = shift;
+ my $parser = Pod::POM->new;
@@ -188,16 +188,18 @@
+ # extract pod; the file may contain no pod, that's ok
+ my $pom = $parser->parse_text($cont);
+
++
+ HEAD1:
+ foreach my $head1 ($pom->head1) {
+
+ next HEAD1 unless $head1->title eq 'DESCRIPTION';
+
-+ my $pom = $head1->content;
-+ $description = $pom->present('Pod::POM::View::Text');
++ $description = '';
++ foreach my $item ($head1->content()) {
++ last if ($item->type() eq 'head2');
++ $description .= $item->present('Pod::POM::View::Text');
+ }
+
-+ # limit to 3 paragraphs at the moment
-+ #my @paragraphs = (split /\n\n/, $description)[0..2];
+ # no limit
+ my @paragraphs = (split /\n\n/, $description);
+
@@ -250,8 +252,7 @@
}
+ return $summary="$mod Perl module";
+}
-
-- return(undef, undef);
++
+sub get_author($) {
+ my $cont = shift;
+ my @lines=();
@@ -276,7 +277,8 @@
+ }
+
+ $author = join "\n", @lines;
-+
+
+- return(undef, undef);
+ # return...
+ return $author;
+ }
@@ -284,7 +286,7 @@
}
sub check_rpm($) {
-@@ -554,13 +647,6 @@
+@@ -554,13 +649,6 @@ my $prefix=$noprefix ? "" : "perl-";
$packager=$packager || `rpm --eval '\%packager'`;
@@ -298,7 +300,7 @@
our %corelist;
my $rpm=new FileHandle "rpm -q --provides perl|"
-@@ -577,67 +663,49 @@
+@@ -577,67 +665,49 @@ while (my $provides=<$rpm>) {
my @args=@ARGV;
my @processed=();
@@ -384,7 +386,7 @@
if ($@) {
warn "Failed to load IO::Uncompress::Bunzip2: $@\n";
-@@ -650,12 +718,14 @@
+@@ -650,12 +720,14 @@ for my $file (@args) {
warn "IO::Uncompress::Bunzip2->new() failed on $file: $!\n";
next;
}
@@ -399,7 +401,7 @@
}
my @files;
-@@ -684,12 +754,9 @@
+@@ -684,12 +756,9 @@ for my $file (@args) {
my $url="http://search.cpan.org/dist/$name/";
@@ -414,7 +416,7 @@
archive => $archive,
type => $type,
filename => $file,
-@@ -700,18 +767,13 @@
+@@ -700,18 +769,13 @@ for my $file (@args) {
path => $path,
);
@@ -429,17 +431,17 @@
- $description="$module Perl module";
- }
+ get_description($content) if(!defined($description));
-+
+
+- $summary="$module Perl module" if (!defined($summary));
+ get_summary($content,$module) if (!defined($summary));
+
+ get_author($content) if (!defined($author));
-
-- $summary="$module Perl module" if (!defined($summary));
++
+ my $authors="Authors:\n--------\n$author";
my @doc=sort { $a cmp $b } grep {
!/\//
-@@ -722,17 +784,22 @@
+@@ -722,17 +786,22 @@ for my $file (@args) {
and $_ ne "MANIFEST.SKIP"
and $_ ne "INSTALL"
and $_ ne "SIGNATURE"
@@ -462,7 +464,24 @@
and $_ ne "pm_to_blib"
and $_ ne "install.sh"
} @files;
-@@ -947,45 +1014,63 @@
+@@ -809,7 +878,7 @@ for my $file (@args) {
+ my $license="";
+
+ my $scripts=0;
+- my (%build_requires,%requires);
++ my (%build_requires,%requires,%recommends);
+ my ($yml,$meta);
+ if (grep /^META\.yml$/, @files
+ and $yml=extract($archive, $type, "$path/META.yml")) {
+@@ -823,6 +892,7 @@ for my $file (@args) {
+
+ %build_requires=%{$meta->{build_requires}} if ($meta->{build_requires});
+ %requires=%{$meta->{requires}} if ($meta->{requires});
++ %recommends=%{$meta->{recommends}} if ($meta->{recommends});
+ if ($meta->{recommends}) {
+ for my $dep (keys(%{$meta->{recommends}})) {
+ $requires{$dep}=$requires{$dep}
+@@ -947,45 +1017,63 @@ for my $file (@args) {
}
print $spec <= " . $requires{$dep}) if ($requires{$dep});
-@@ -1015,11 +1101,6 @@
+@@ -1015,15 +1104,19 @@ END
printf $spec "%-16s%s\n", "Requires:", $dep;
}
@@ -570,7 +589,20 @@
for my $prov (@add_provides) {
printf $spec "%-16s%s\n", "Provides:", $prov;
-@@ -1043,7 +1124,10 @@
+ }
++ for my $dep (sort(keys(%recommends))) {
++ next if ($dep eq 'perl');
++ next if (!$compat and exists($corelist{$dep}));
++ printf $spec "%-16s%s", "Recommends:", "perl($dep)";
++ print $spec (" >= " . $requires{$dep}) if ($requires{$dep});
++ print $spec "\n";
++ }
++
++
+
+ if (@filter_requires) {
+ print $spec <close();
-@@ -1187,6 +1253,11 @@
+@@ -1187,6 +1266,16 @@ END
build_rpm($specfile) if ($buildsrpm or $buildrpm);
push(@processed, $module);
+
+ (my $basename = $specfile) =~ s{\.spec$}{};
-+ verbose "Writing $basename.changes";
-+ system("osc vc -m 'initial package $version
-+ * created by $NAME $VERSION' $basename");
++ if (-f "$basename.changes") {
++ verbose "Updating $basename.changes";
++ system("osc vc -m 'updated to $version'");
++ } else {
++ verbose "Writing $basename.changes";
++ system("osc vc -m 'initial package $version
++ * created by $NAME $VERSION' $basename");
++ }
}
# vi: set ai et:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org