diff options
author | agc <agc@pkgsrc.org> | 2001-10-16 09:17:08 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2001-10-16 09:17:08 +0000 |
commit | 8bc0a92531420218f0bd990bd77739718a112717 (patch) | |
tree | d2b5bd8d932bb2305cb77e0a78e3f4f6afa5a04f /pkgtools | |
parent | 7fcd69604c3f73814e63530e1ca420f23caf02a9 (diff) | |
download | pkgsrc-8bc0a92531420218f0bd990bd77739718a112717.tar.gz |
Upgrade to version 0.51 of bsdpak. From Ben Collver in PR 14257.
New version includes the NetBSD patches. Other changes...
0.51:
* Applied another patch from Ben Collver:
. minor logic problem with verifying INDEX file
. compare and upgrade now work even if INDEX doesn't exist (very nice for
me because INDEX takes >12 hours to generate on my box)
0.50:
* Applied a patch to make this work with NetBSD ports.
* Cleaned up the entire dist a little bit..
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/bsdpak/Makefile | 6 | ||||
-rw-r--r-- | pkgtools/bsdpak/distinfo | 7 | ||||
-rw-r--r-- | pkgtools/bsdpak/patches/patch-aa | 128 |
3 files changed, 6 insertions, 135 deletions
diff --git a/pkgtools/bsdpak/Makefile b/pkgtools/bsdpak/Makefile index 4902c020ad0..881e3ecad02 100644 --- a/pkgtools/bsdpak/Makefile +++ b/pkgtools/bsdpak/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2001/02/17 17:51:24 wiz Exp $ +# $NetBSD: Makefile,v 1.3 2001/10/16 09:17:08 agc Exp $ -DISTNAME= bsdpak-0.40 +DISTNAME= bsdpak-0.51 CATEGORIES= pkgtools MASTER_SITES= http://www.oddbox.org/projects/bsdpak/dists/ -MAINTAINER= collver@softhome.net +MAINTAINER= collver@linuxfreemail.com HOMEPAGE= http://www.oddbox.org/projects/bsdpak/index.php COMMENT= BSD package management utility diff --git a/pkgtools/bsdpak/distinfo b/pkgtools/bsdpak/distinfo index 8c32d657ffb..468289de2aa 100644 --- a/pkgtools/bsdpak/distinfo +++ b/pkgtools/bsdpak/distinfo @@ -1,5 +1,4 @@ -$NetBSD: distinfo,v 1.3 2001/06/01 01:26:59 wiz Exp $ +$NetBSD: distinfo,v 1.4 2001/10/16 09:17:08 agc Exp $ -SHA1 (bsdpak-0.40.tar.gz) = 5e09a536271faea56693642aeb3b168f13ce98be -Size (bsdpak-0.40.tar.gz) = 2852 bytes -SHA1 (patch-aa) = 0452ac2b37896831a6fc7f07c28ab136ff3f3ae6 +SHA1 (bsdpak-0.51.tar.gz) = 33653505ef8d65c313e191d8b510da33792fe58f +Size (bsdpak-0.51.tar.gz) = 10882 bytes diff --git a/pkgtools/bsdpak/patches/patch-aa b/pkgtools/bsdpak/patches/patch-aa deleted file mode 100644 index d4c29c8c17c..00000000000 --- a/pkgtools/bsdpak/patches/patch-aa +++ /dev/null @@ -1,128 +0,0 @@ -$NetBSD: patch-aa,v 1.2 2001/06/01 01:26:59 wiz Exp $ - ---- bsdpak.pl.orig Tue Sep 12 01:57:06 2000 -+++ bsdpak.pl Thu May 24 07:22:09 2001 -@@ -16,7 +16,23 @@ - my @indexPackagesOutput; - - my $currentPackagesCommand = '/usr/sbin/pkg_info -aI'; --my $indexPackagesCommand = 'cat /usr/ports/INDEX'; -+ -+my $indexPackagesDir; -+if (-d "/usr/ports") { -+ $indexPackagesDir = '/usr/ports'; -+} elsif (-d "/usr/pkgsrc") { -+ $indexPackagesDir = '/usr/pkgsrc'; -+} else { -+ print "Could not find package directory.\n"; -+ exit(1); -+} -+ -+if (! -f "$indexPackagesDir/INDEX") { -+ print "Could not find $indexPackagesDir/INDEX\nI suggest:\n cd $indexPackagesDir;make index\n\n"; -+ exit(1); -+} -+ -+my $indexPackagesCommand = "cat $indexPackagesDir/INDEX"; - - - main(); -@@ -89,10 +105,10 @@ - --index= - Specify a path or url to use for the index file. - --By default this program uses /usr/ports/INDEX for the index --packages, and pkg_info output for current packages. Current --info is not yet customizeable (you shouldn't have to change it) --but the index path is, with --index= .. it can be a path or url. -+By default this program uses /usr/ports/INDEX or /usr/pkgsrc/INDEX -+for the index packages, and pkg_info output for current packages. -+Current info is not yet customizeable (you shouldn't have to change -+it) but the index path is, with --index= .. it can be a path or url. - - EOF - } -@@ -101,7 +117,14 @@ - if($flags{'index'}) { - my $indexLine = $flags{'index'}; - if($indexLine =~ m/ftp:\/\// || $indexLine =~ m/http:\/\//) { -- $indexPackagesCommand = "fetch -o - $flags{'index'} 2>&1"; -+ my $fetchCommand; -+ `ftp about: >/dev/null 2>&1`; -+ if ($? == 0) { -+ $fetchCommand = 'ftp'; -+ } else { -+ $fetchCommand = 'fetch'; -+ } -+ $indexPackagesCommand = "$fetchCommand -o - $flags{'index'} 2>/dev/null"; - } - else { - if(-e $flags{'index'}) { $indexPackagesCommand = "cat $flags{'index'}"; } -@@ -115,7 +138,7 @@ - @currentPackagesOutput = `$currentPackagesCommand`; - @indexPackagesOutput = `$indexPackagesCommand`; - -- if($indexPackagesOutput[0] =~ m/fetch: -:/) { -+ if($? != 0) { - print "The file $flags{'index'} does not exist!\n"; - exit; - } -@@ -186,7 +209,10 @@ - - - sub UpgradePackages { -- my(%currentCompare, @printOut, $printOutLine, $packageName, $packageNameVer, $indexVersion, $currentVersion, $indexRefcount, $currentRefcount, $packagePath, $versionCode, $comment, $rc); -+ my(%currentCompare, @removePass, $removePassLine, @buildPass, $buildPassLine, @printOut, $printOutLine, $packageName, $packageNameVer, $indexVersion, $currentVersion, $indexRefcount, $currentRefcount, $packagePath, $versionCode, $comment, $rc); -+ -+ $printOutLine = "# UpgradePackages script generated by bsdpak $version\n\n# DETAIL\n"; -+ push @printOut, $printOutLine; - - foreach $packageName (keys %currentPackages) { - $packageNameVer = "$packageName-$currentPackages{$packageName}{'version'}"; -@@ -238,10 +264,25 @@ - $currentCompare{'comment'} = $comment; - - if($currentCompare{'versioncode'} eq "<") { -- $printOutLine = "\#\n\# $currentCompare{'name'}\n\# $currentCompare{'comment'}\n\#\ncd $currentCompare{'path'}\nmake && pkg_delete -f $currentCompare{'namever'}\nmake install\nmake clean\n\n"; -- push(@printOut, $printOutLine); -+ $printOutLine = "\# $currentCompare{'name'} $currentCompare{'cversion'} $currentCompare{'comment'}\n"; -+ push @printOut, $printOutLine; -+ -+ $removePassLine = "pkg_delete -f -R $currentCompare{'namever'}\n"; -+ push(@removePass, $removePassLine); -+ $buildPassLine = <<__EOF__; -+cd $currentCompare{'path'} -+make update -+make clean-update clean-depends -+__EOF__ -+ push(@buildPass, $buildPassLine); - } - } -+ $printOutLine = "\n# REMOVE PASS\n"; -+ push @printOut, $printOutLine; -+ push @printOut, @removePass; -+ $printOutLine = "\n# BUILD PASS\n"; -+ push @printOut, $printOutLine; -+ push @printOut, @buildPass; - print @printOut; - } - -@@ -336,10 +377,15 @@ - while(1) { - ($p1, $v1) = split(/\./, $v1, 2); - ($p2, $v2) = split(/\./, $v2, 2); -- -+ if (!defined($v1)) { $v1 = "" }; -+ if (!defined($v2)) { $v2 = "" }; -+ if (!defined($p1)) { $p1 = "" }; -+ if (!defined($p2)) { $p2 = "" }; -+ - if (($p1 eq "") && ($p2 eq "")) { return 0; } -- elsif ($p1 != $p2) { return $p1 <=> $p2; } -- elsif ($p1 ne $p2) { return $p1 cmp $p2; } -+ if (($p1 =~ /^\d+$/) && ($p2 =~ /^\d+$/)) { -+ if ($p1 != $p2) { return $p1 <=> $p2; } -+ } elsif ($p1 ne $p2) { return $p1 cmp $p2; } - } - } - |