Update of /cvsroot/fink/experimental/chrisdolan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1588
Modified Files: finkbuild mkpkg.pl Log Message: v1.30 of mkpkg.pl * Added update mode * Many, many fixes * This version is finally really usable Change to finkbuild to support building multiple perl versions at a time Index: mkpkg.pl =================================================================== RCS file: /cvsroot/fink/experimental/chrisdolan/mkpkg.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mkpkg.pl 21 Feb 2005 04:30:40 -0000 1.6 +++ mkpkg.pl 23 Feb 2005 05:24:44 -0000 1.7 @@ -11,10 +11,12 @@ Options: -m --maintainer=s specify the maintainer. This is a required parameter (e.g. -m "Joe Maintainer <[EMAIL PROTECTED]>") + -u --update use update mode instead of create mode -d --diff use difference mode instead of create mode -P --prereqs show prereq info (not yet finished) -t --typepkg force %type_pkg[perl] variants -b --bin force a %N-bin splitoff + -D --details print CPAN details for the module(s) -f --force force overwrite of .info file (not used in difference mode) -p --prefix=s specify Fink prefix (defaults to /sw) -T --tree=s specify where in Fink to write .info file @@ -38,10 +40,16 @@ packages (if any). To collect the CPAN data easily, this program relies heavily on the CPANPLUS infrastructure. -There are two main modes to this program: create mode and difference -mode. In create mode (the default), the program attempts to create a -brand new .info file. If one already exists, it refuses to overwrite -it without the C<--force> option. +There are three main modes to this program: create mode, update mode +and difference mode. In create mode (the default), the program +attempts to create a brand new .info file. If one already exists, it +refuses to overwrite it without the C<--force> option. + +In update mode, the program creates a .info.new file that is the same +as what create mode would have created, plus comments reflecting +changes from the existing version. Note: This mode has not been well +tested against existing .info files that were not created by this +program! In difference mode, the program creates the new .info file in memory and compares it to the existing .info file. Any changes are @@ -54,9 +62,7 @@ CPANPLUS 0.051 must be installed. This is untested with other versions of CPANPLUS. CPANPLUS is not in Fink as of this writing. -yaml-pm must be installed. - -file-slurp-pm must be installed. +file-slurp-pm, module-corelist-pm, and yaml-pm must be installed. =head1 CAVEATS @@ -89,11 +95,13 @@ help => 0, version => 0, + update => 0, diff => 0, force => 0, prereqs => 0, typepkg => 0, bin => 0, # make a %N-bin splitoff + details => 0, prefix => "/sw", maintainer => undef, @@ -108,11 +116,13 @@ "h|help" => \$opts{help}, "V|version" => \$opts{version}, + "u|update" => \$opts{update}, "d|diff" => \$opts{diff}, "f|force" => \$opts{force}, "P|prereqs" => \$opts{prereqs}, "t|typepkg" => \$opts{typepkg}, "b|bin" => \$opts{bin}, + "D|details" => \$opts{details}, "p|prefix=s" => \$opts{prefix}, "m|maintainer=s" => \$opts{maintainer}, @@ -142,6 +152,7 @@ prereqs => $opts{prereqs}, typepkg => $opts{typepkg}, bin => $opts{bin}, + details => $opts{details}, prefix => $opts{prefix}, maintainer => $opts{maintainer}, @@ -157,7 +168,11 @@ foreach my $module (@ARGV) { - if ($opts{diff}) + if ($opts{update}) + { + $fink->update_pkg($module); + } + elsif ($opts{diff}) { my $diff = $fink->diff_pkg($module); print $diff if ($diff); Index: finkbuild =================================================================== RCS file: /cvsroot/fink/experimental/chrisdolan/finkbuild,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- finkbuild 17 Feb 2005 05:14:49 -0000 1.2 +++ finkbuild 23 Feb 2005 05:24:44 -0000 1.3 @@ -1,7 +1,7 @@ -#!/bin/csh +#!/bin/tcsh if ($#argv < 1) then - echo "Syntax: $0 [opts] <info file> [<perlversion>]" + echo "Syntax: $0 [opts] <info file> [<perlversion> ...]" echo " opt '-n' means no reindexing" echo " <perlversion> is like '581'" exit @@ -15,25 +15,29 @@ endif set info = $1 -set perlver = $2 -set pkg = `echo $info | sed "s,.*/,," | sed "s,\.info,,"`$perlver +shift +set perlvers = "$*" if (! -f $info) then echo "info file not found" exit endif -/sw/bin/fink validate $1 +/sw/bin/fink validate $info if ($index == "true") then /sw/bin/fink index endif -nice +10 /sw/bin/fink -k -K rebuild $pkg -if ($status == 0) then - foreach deb (/sw/fink/debs/$pkg*) - echo " ****** $deb ******" - /sw/bin/fink validate $deb - if ($status == 0) then - dpkg-deb -c $deb - endif - end -endif + +foreach perlver (`echo $perlvers`) + set pkg = `echo $info | sed "s,.*/,," | sed "s,\.info,,"`$perlver + nice +10 /sw/bin/fink -k -K rebuild $pkg + if ($status == 0) then + foreach deb (/sw/fink/debs/$pkg*) + echo " ****** $deb ******" + /sw/bin/fink validate $deb + if ($status == 0) then + dpkg-deb -c $deb + endif + end + endif +end ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits