From fc4fc1aaba18267786964198a213a2781648a92f Mon Sep 17 00:00:00 2001 From: Thierry N Date: Mon, 19 Oct 2009 22:57:16 +0200 Subject: maj pkg-get#0.4.5-9 --- base/pkg-get/.md5sum | 2 +- base/pkg-get/Pkgfile | 6 +- base/pkg-get/pkg-get-0.4.5-NuTyX-01.patch | 276 ---------------------------- base/pkg-get/pkg-get-0.4.5-NuTyX-02.patch | 287 ++++++++++++++++++++++++++++++ 4 files changed, 291 insertions(+), 280 deletions(-) delete mode 100644 base/pkg-get/pkg-get-0.4.5-NuTyX-01.patch create mode 100644 base/pkg-get/pkg-get-0.4.5-NuTyX-02.patch (limited to 'base') diff --git a/base/pkg-get/.md5sum b/base/pkg-get/.md5sum index b367c9862..dedc7916f 100644 --- a/base/pkg-get/.md5sum +++ b/base/pkg-get/.md5sum @@ -1,4 +1,4 @@ -a7899560ed0004d8d3fda72274dbd44f pkg-get-0.4.5-NuTyX-01.patch +638354d5e6acbd9143efafcf03c54acf pkg-get-0.4.5-NuTyX-02.patch 5ee169f2f99fc501387219b6b96ca9ef pkg-get-0.4.5.tar.gz 10721fb1fe16ab0305320f9278eb1087 pkg-get.conf c4cca630bfcc85a3f3b13497aff01310 pkg-repgen.patch diff --git a/base/pkg-get/Pkgfile b/base/pkg-get/Pkgfile index 706940505..70a468e88 100644 --- a/base/pkg-get/Pkgfile +++ b/base/pkg-get/Pkgfile @@ -6,15 +6,15 @@ name=pkg-get version=0.4.5 -release=8 +release=9 source=(http://www.varlock.com/files/$name-$version.tar.gz \ - pkg-get-0.4.5-NuTyX-01.patch pkg-get.conf pkg-repgen.patch syn) + pkg-get-0.4.5-NuTyX-02.patch pkg-get.conf pkg-repgen.patch syn) build() { ARCH_=`uname -m` cd $name-$version patch -Np1 -i ../pkg-repgen.patch - patch -Np1 -i ../pkg-get-$version-NuTyX-01.patch + patch -Np1 -i ../pkg-get-$version-NuTyX-02.patch make PREFIX=$PKG/usr CFGDIR=$PKG/etc install install -m 755 ../syn $PKG/usr/bin/syn sed -i "s|CRUX Packages|Paquets NuTyX Architecture $ARCH_|g" $PKG/usr/bin/pkg-repgen diff --git a/base/pkg-get/pkg-get-0.4.5-NuTyX-01.patch b/base/pkg-get/pkg-get-0.4.5-NuTyX-01.patch deleted file mode 100644 index 7e57babb2..000000000 --- a/base/pkg-get/pkg-get-0.4.5-NuTyX-01.patch +++ /dev/null @@ -1,276 +0,0 @@ ---- pkg-get-0.4.5/scripts/pkg-get.pl 2009-10-17 20:20:51.000000000 +0000 -+++ /usr/ports/base/pkg-get/pkg-get 2009-10-17 16:42:23.000000000 +0000 -@@ -1,7 +1,9 @@ - #!/usr/bin/env perl -+# -*- coding: utf-8 -*- - # - # pkg-get - A binary package management utility for CRUX Linux - # Copyright (C) 2004-06 Simone Rota -+# Modified by Arnaud Fernandés 2009-10 - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -48,6 +50,8 @@ - } - readconfig(); - -+my $exitcode = 0; # 2009-10 -+ - SWITCH: { - if ($command eq "version") { version(); last SWITCH; } - if ($command eq "sync") { sync(); last SWITCH; } -@@ -74,10 +78,11 @@ - if ($command eq "update") { update(@ARGV); last SWITCH; } - if ($command eq "sysup") { sysup(); last SWITCH; } - if ($command eq "dependent") { dependent(); last SWITCH; } -- if ($command eq "depinst") { depinst(); last SWITCH; } -+ if ($command eq "depinst") { $exitcode = depinst(); last SWITCH; } # 2009-10 - if ($command eq "current") { current(); last SWITCH; } - } - -+exit($exitcode); # 2009-10 - - ############################################################################ - # Support functions -@@ -104,7 +109,7 @@ - if (not $givencmd){$givencmd = ""}; - my @allowed = ("depinst:", "install:", "sysup", "diff", "update:", "depends:", "info:", "sync", - "version", "help", "quickdep:", "dependent:", "list", "listinst", "isinst:", -- "search:", "dsearch:", "lock:", "unlock:", "listlocked", "quickdiff", "printf:", -+ "search:", "dsearch:", "lock:", "unlock:", "listlocked", "quickdiff", "printf:", - "remove:", "readme:", "dup", "path:", "current:"); - - foreach my $valid(@allowed) { -@@ -126,7 +131,7 @@ - - # Parses the configuration file - sub readconfig { -- open(CFG, $CFGFILE) -+ open(CFG, $CFGFILE) - or exiterr("could not open $CFGFILE"); - while () { - chomp; -@@ -160,7 +165,7 @@ - my $release = $p[0]; - $release =~ s/^.*-//; - $release =~ s/\.pkg\.tar\.gz//; -- if (not $_[2]) {$_[2] = $_[1]}; -+ if (not $_[2]) {$_[2] = $_[1]}; - $pkg{'name'} = $name; - $pkg{'version'} = $version; - $pkg{'release'} = $release; -@@ -214,7 +219,7 @@ - sub getdirectdeps { - my $pkgname = $_[0]; - my $dir = $_[1]; -- open(DEPS, "$dir/PKGDEPS") -+ open(DEPS, "$dir/PKGDEPS") - or exiterr("could not open $dir/PKGDEPS"); - while () { - chomp; -@@ -236,7 +241,7 @@ - my $pkgname = $pkg{'name'}; - my $found = 0; - my $finished = 0; -- open(READ, "$dir/PKGREAD") -+ open(READ, "$dir/PKGREAD") - or exiterr("could not open $dir/PKGREAD"); - while () { - if ($finished eq 1) {return;}; -@@ -312,12 +317,12 @@ - # Get the list of installed packages - sub getinstalled { - if (%installed) { -- return; -+ return; - } - my $name; - my $version; - my $sec = 0; -- open(DB, $PKGDB) -+ open(DB, $PKGDB) - or exiterr("could not open ".$PKGDB); - while () { - chomp; -@@ -447,7 +452,7 @@ - return %res; - } - --# Get short status for package, ie [i] -+# Get short status for package, ie [i] - sub getshortstatus { - my %pkg = @_; - if ($pkg{'instversion'}) { -@@ -503,9 +508,9 @@ - $md5 =~ s/\s+.*$//; - $md5 =~ chop($md5); - if ($md5 ne $pkg{'md5sum'} and not $ignore_md5sum) { -- print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; -- print STDERR "required : $pkg{'md5sum'}\n"; -- print STDERR "found : $md5\n"; -+ print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; -+ print STDERR "required : $pkg{'md5sum'}\n"; -+ print STDERR "found : $md5\n"; - return 0; - } - return 1; -@@ -518,9 +523,9 @@ - $md5 =~ s/\s+.*$//; - $md5 =~ chop($md5); - if ($md5 ne $pkg{'md5sum'} and not $ignore_md5sum) { -- print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; -- print STDERR "required : $pkg{'md5sum'}\n"; -- print STDERR "found : $md5\n"; -+ print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; -+ print STDERR "required : $pkg{'md5sum'}\n"; -+ print STDERR "found : $md5\n"; - return 0; - } - } -@@ -537,11 +542,11 @@ - if ($download_only) {return 1}; - if ($force){$aa = $aa."-f "}; - if ($root) {$aa = $aa."-r ".$root." "}; -- if ($pkg{'pre_install'} eq "yes" and ($install_scripts or $pre_install)) {dopre(%pkg)}; -+ if ($pkg{'pre_install'} eq "yes" and ($install_scripts or $pre_install)) {dopre(%pkg)}; - my $fullpath = $pkg{'path'}."/".$pkg{'name'}."#".$pkg{'version'}."-".$pkg{'release'}.".pkg.tar.gz"; - print "pkg-get: /usr/bin/pkgadd $upgrade$aa$fullpath\n"; - system ("/usr/bin/pkgadd $upgrade$aa$fullpath") == 0 or return 0; -- if ($pkg{'post_install'} eq "yes" and ($install_scripts or $post_install)) {dopost(%pkg)}; -+ if ($pkg{'post_install'} eq "yes" and ($install_scripts or $post_install)) {dopost(%pkg)}; - return 1; - } - -@@ -675,7 +680,7 @@ - } - foreach my $key (sort keys %found) { - print "$key\n"; -- } -+ } - if (not %found) {print "No matching packages found\n"}; - } - -@@ -691,7 +696,7 @@ - while () { - chomp; - my %pkg = parsepackage($_, $dir, $url, 0); -- if ((index($pkg{'name'}, $arg) > -1 or index($pkg{'description'}, $arg) > -1) -+ if ((index($pkg{'name'}, $arg) > -1 or index($pkg{'description'}, $arg) > -1) - and not $found{$pkg{'name'}}) { - $found{$pkg{'name'}} = 1; - } -@@ -700,7 +705,7 @@ - } - foreach my $key (sort keys %found) { - print "$key\n"; -- } -+ } - if (not %found) {print "No matching packages found\n";}; - } - -@@ -722,7 +727,7 @@ - } - foreach my $key (sort keys %found) { - print "$key\n"; -- } -+ } - } - - # Show path for a package ################################################## -@@ -800,7 +805,7 @@ - getinstalled(); - foreach my $key (sort keys %installed) { - print "$key\n"; -- } -+ } - } - - # Print if package is installed ########################################### -@@ -877,7 +882,7 @@ - - # List locked packages ##################################################### - sub listlocked { -- open(LCK, $LOCKFILE) -+ open(LCK, $LOCKFILE) - or exit; - while () { - chomp; -@@ -1021,7 +1026,7 @@ - print " $dup\n"; - } - } -- } -+ } - } - - # Show list of dependencies for package #################################### -@@ -1057,7 +1062,7 @@ - my @r = split(/\|/, $repo); - my $dir = $r[0]; - my $url = $r[1]; -- open(DEPS, "$dir/PKGDEPS") -+ open(DEPS, "$dir/PKGDEPS") - or exiterr("could not open $dir/PKGDEPS"); - while () { - chomp; -@@ -1089,7 +1094,7 @@ - getinstalled(); - foreach my $pkgname(@args) { - my %pkg = getpackage($pkgname, 1); -- if (not %pkg) { -+ if (not %pkg ) { - push(@failtasks, "not found,$pkgname"); - } elsif (getshortstatus(%pkg) ne "[ ]") { - push(@prevtasks, "$pkgname"); -@@ -1152,25 +1157,50 @@ - } - } - -+# 2009-10 - sub depinst { - my @toinst; my %seen; - $curraction = "installed"; - my @args = @ARGV; shift(@args); - getinstalled(); -+ -+ #~ Pour chaque paquet dans les arguments - foreach my $pkgname(@args) { -+ -+ #~ Si déjà installé retourne la valeur 55 -+ if($installed{$pkgname}){ -+ print "pkg-get : Le paquet $pkgname est déjà installé.\n"; -+ return 55; -+ } -+ #~ Si n'est pas dans les dépots, retourne la valeur 56 -+ if(not getpackage($pkgname, 1)){ -+ print "pkg-get : Le paquet $pkgname n'est pas disponible en binaire.\n"; -+ return 56; -+ } -+ -+ #~ Recherche des dépendances (tableau associatif @dependencies) - getdependencies($pkgname, 0, ""); -- foreach my $dep(@dependencies) { -+ -+ #~ Pour chaque dépendances -+ foreach my $dep(@dependencies) { -+ -+ #~ Si on ne l'a pas déjà traitée - if (not $seen{$dep}) { -+ -+ #~ Prends le paquet des dépots - my %pkg = getpackage($dep, 1); - if (%pkg) { -+ #~ L'ajoute à la liste des paquets à installer - if (getshortstatus(%pkg) eq "[ ]"){ - push(@toinst, $pkg{'name'}); - } - } -+ #~ Marque la dépendance comme déjà traitée - $seen{$dep} = 1; - } - } - } -+ #~ Si des paquets sont marqués comme étant à installer, on lance l'installation - if (@toinst) { - unshift(@toinst, "dummy"); # is shifted later in install sub; - install(@toinst); diff --git a/base/pkg-get/pkg-get-0.4.5-NuTyX-02.patch b/base/pkg-get/pkg-get-0.4.5-NuTyX-02.patch new file mode 100644 index 000000000..465dafd24 --- /dev/null +++ b/base/pkg-get/pkg-get-0.4.5-NuTyX-02.patch @@ -0,0 +1,287 @@ +--- pkg-get-0.4.5/scripts/pkg-get.pl 2009-10-17 20:20:51.000000000 +0000 ++++ /usr/ports/base/pkg-get/pkg-get 2009-10-17 16:42:23.000000000 +0000 +@@ -1,7 +1,9 @@ + #!/usr/bin/env perl ++# -*- coding: utf-8 -*- + # + # pkg-get - A binary package management utility for CRUX Linux + # Copyright (C) 2004-06 Simone Rota ++# Modified by Arnaud Fernandés 2009-10 + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -48,6 +50,8 @@ + } + readconfig(); + ++my $exitcode = 0; # 2009-10 ++ + SWITCH: { + if ($command eq "version") { version(); last SWITCH; } + if ($command eq "sync") { sync(); last SWITCH; } +@@ -74,10 +78,11 @@ + if ($command eq "update") { update(@ARGV); last SWITCH; } + if ($command eq "sysup") { sysup(); last SWITCH; } + if ($command eq "dependent") { dependent(); last SWITCH; } +- if ($command eq "depinst") { depinst(); last SWITCH; } ++ if ($command eq "depinst") { $exitcode = depinst(); last SWITCH; } # 2009-10 + if ($command eq "current") { current(); last SWITCH; } + } + ++exit($exitcode); # 2009-10 + + ############################################################################ + # Support functions +@@ -104,7 +109,7 @@ + if (not $givencmd){$givencmd = ""}; + my @allowed = ("depinst:", "install:", "sysup", "diff", "update:", "depends:", "info:", "sync", + "version", "help", "quickdep:", "dependent:", "list", "listinst", "isinst:", +- "search:", "dsearch:", "lock:", "unlock:", "listlocked", "quickdiff", "printf:", ++ "search:", "dsearch:", "lock:", "unlock:", "listlocked", "quickdiff", "printf:", + "remove:", "readme:", "dup", "path:", "current:"); + + foreach my $valid(@allowed) { +@@ -126,7 +131,7 @@ + + # Parses the configuration file + sub readconfig { +- open(CFG, $CFGFILE) ++ open(CFG, $CFGFILE) + or exiterr("could not open $CFGFILE"); + while () { + chomp; +@@ -160,7 +165,7 @@ + my $release = $p[0]; + $release =~ s/^.*-//; + $release =~ s/\.pkg\.tar\.gz//; +- if (not $_[2]) {$_[2] = $_[1]}; ++ if (not $_[2]) {$_[2] = $_[1]}; + $pkg{'name'} = $name; + $pkg{'version'} = $version; + $pkg{'release'} = $release; +@@ -214,7 +219,7 @@ + sub getdirectdeps { + my $pkgname = $_[0]; + my $dir = $_[1]; +- open(DEPS, "$dir/PKGDEPS") ++ open(DEPS, "$dir/PKGDEPS") + or exiterr("could not open $dir/PKGDEPS"); + while () { + chomp; +@@ -236,7 +241,7 @@ + my $pkgname = $pkg{'name'}; + my $found = 0; + my $finished = 0; +- open(READ, "$dir/PKGREAD") ++ open(READ, "$dir/PKGREAD") + or exiterr("could not open $dir/PKGREAD"); + while () { + if ($finished eq 1) {return;}; +@@ -312,12 +317,12 @@ + # Get the list of installed packages + sub getinstalled { + if (%installed) { +- return; ++ return; + } + my $name; + my $version; + my $sec = 0; +- open(DB, $PKGDB) ++ open(DB, $PKGDB) + or exiterr("could not open ".$PKGDB); + while () { + chomp; +@@ -447,7 +452,7 @@ + return %res; + } + +-# Get short status for package, ie [i] ++# Get short status for package, ie [i] + sub getshortstatus { + my %pkg = @_; + if ($pkg{'instversion'}) { +@@ -503,9 +508,9 @@ + $md5 =~ s/\s+.*$//; + $md5 =~ chop($md5); + if ($md5 ne $pkg{'md5sum'} and not $ignore_md5sum) { +- print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; +- print STDERR "required : $pkg{'md5sum'}\n"; +- print STDERR "found : $md5\n"; ++ print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; ++ print STDERR "required : $pkg{'md5sum'}\n"; ++ print STDERR "found : $md5\n"; + return 0; + } + return 1; +@@ -518,9 +523,9 @@ + $md5 =~ s/\s+.*$//; + $md5 =~ chop($md5); + if ($md5 ne $pkg{'md5sum'} and not $ignore_md5sum) { +- print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; +- print STDERR "required : $pkg{'md5sum'}\n"; +- print STDERR "found : $md5\n"; ++ print STDERR "=======> ERROR: md5sum mismatch for $pkg{'name'}:\n"; ++ print STDERR "required : $pkg{'md5sum'}\n"; ++ print STDERR "found : $md5\n"; + return 0; + } + } +@@ -537,11 +542,11 @@ + if ($download_only) {return 1}; + if ($force){$aa = $aa."-f "}; + if ($root) {$aa = $aa."-r ".$root." "}; +- if ($pkg{'pre_install'} eq "yes" and ($install_scripts or $pre_install)) {dopre(%pkg)}; ++ if ($pkg{'pre_install'} eq "yes" and ($install_scripts or $pre_install)) {dopre(%pkg)}; + my $fullpath = $pkg{'path'}."/".$pkg{'name'}."#".$pkg{'version'}."-".$pkg{'release'}.".pkg.tar.gz"; + print "pkg-get: /usr/bin/pkgadd $upgrade$aa$fullpath\n"; + system ("/usr/bin/pkgadd $upgrade$aa$fullpath") == 0 or return 0; +- if ($pkg{'post_install'} eq "yes" and ($install_scripts or $post_install)) {dopost(%pkg)}; ++ if ($pkg{'post_install'} eq "yes" and ($install_scripts or $post_install)) {dopost(%pkg)}; + return 1; + } + +@@ -675,7 +680,7 @@ + } + foreach my $key (sort keys %found) { + print "$key\n"; +- } ++ } + if (not %found) {print "No matching packages found\n"}; + } + +@@ -691,7 +696,7 @@ + while () { + chomp; + my %pkg = parsepackage($_, $dir, $url, 0); +- if ((index($pkg{'name'}, $arg) > -1 or index($pkg{'description'}, $arg) > -1) ++ if ((index($pkg{'name'}, $arg) > -1 or index($pkg{'description'}, $arg) > -1) + and not $found{$pkg{'name'}}) { + $found{$pkg{'name'}} = 1; + } +@@ -700,7 +705,7 @@ + } + foreach my $key (sort keys %found) { + print "$key\n"; +- } ++ } + if (not %found) {print "No matching packages found\n";}; + } + +@@ -722,7 +727,7 @@ + } + foreach my $key (sort keys %found) { + print "$key\n"; +- } ++ } + } + + # Show path for a package ################################################## +@@ -800,7 +805,7 @@ + getinstalled(); + foreach my $key (sort keys %installed) { + print "$key\n"; +- } ++ } + } + + # Print if package is installed ########################################### +@@ -877,7 +882,7 @@ + + # List locked packages ##################################################### + sub listlocked { +- open(LCK, $LOCKFILE) ++ open(LCK, $LOCKFILE) + or exit; + while () { + chomp; +@@ -1021,7 +1026,7 @@ + print " $dup\n"; + } + } +- } ++ } + } + + # Show list of dependencies for package #################################### +@@ -1057,7 +1062,7 @@ + my @r = split(/\|/, $repo); + my $dir = $r[0]; + my $url = $r[1]; +- open(DEPS, "$dir/PKGDEPS") ++ open(DEPS, "$dir/PKGDEPS") + or exiterr("could not open $dir/PKGDEPS"); + while () { + chomp; +@@ -1089,7 +1094,7 @@ + getinstalled(); + foreach my $pkgname(@args) { + my %pkg = getpackage($pkgname, 1); +- if (not %pkg) { ++ if (not %pkg ) { + push(@failtasks, "not found,$pkgname"); + } elsif (getshortstatus(%pkg) ne "[ ]") { + push(@prevtasks, "$pkgname"); +@@ -1152,25 +1157,50 @@ + } + } + ++# 2009-10 + sub depinst { + my @toinst; my %seen; + $curraction = "installed"; + my @args = @ARGV; shift(@args); + getinstalled(); ++ ++ #~ Pour chaque paquet dans les arguments + foreach my $pkgname(@args) { ++ ++ #~ Si déjà installé retourne la valeur 55 ++ if($installed{$pkgname}){ ++ print "pkg-get : Le paquet $pkgname est déjà installé.\n"; ++ return 55; ++ } ++ #~ Si n'est pas dans les dépots, retourne la valeur 56 ++ if(not getpackage($pkgname, 1)){ ++ print "pkg-get : Le paquet $pkgname n'est pas disponible en binaire.\n"; ++ return 56; ++ } ++ ++ #~ Recherche des dépendances (tableau associatif @dependencies) + getdependencies($pkgname, 0, ""); +- foreach my $dep(@dependencies) { ++ ++ #~ Pour chaque dépendances ++ foreach my $dep(@dependencies) { ++ ++ #~ Si on ne l'a pas déjà traitée + if (not $seen{$dep}) { ++ ++ #~ Prends le paquet des dépots + my %pkg = getpackage($dep, 1); + if (%pkg) { ++ #~ L'ajoute à la liste des paquets à installer + if (getshortstatus(%pkg) eq "[ ]"){ + push(@toinst, $pkg{'name'}); + } + } ++ #~ Marque la dépendance comme déjà traitée + $seen{$dep} = 1; + } + } + } ++ #~ Si des paquets sont marqués comme étant à installer, on lance l'installation + if (@toinst) { + unshift(@toinst, "dummy"); # is shifted later in install sub; + install(@toinst); +--- pkg-get-0.4.5/scripts/pkg-get.pl.orig 2009-10-17 20:20:51.000000000 +0000 ++++ pkg-get-0.4.5/scripts/pkg-get.pl 2009-10-17 16:42:23.000000000 +0000 +@@ -948,7 +948,7 @@ + printf("%-19s %-19s %-19s\n\n","Package","Installed","Available in the repositories"); + $gotdiff = 1; + } +- printf("%-19s %-19s %-19s %-19s\n", $pkg{'name'}, $pkg{'instversion'}, $pkg{'version'}."-".$pkg{'release'}); ++ printf("%-19s %-19s %-19s\n", $pkg{'name'}, $pkg{'instversion'}, $pkg{'version'}."-".$pkg{'release'}); + } elsif ($all) { # yeah, it blows, at least avoid to read the locked state twice. + if ($gotdiff == 0){ + print "Differences between installed packages and packages repo:\n\n"; -- cgit v1.2.3-54-g00ecf