summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm26
-rw-r--r--urpme10
-rwxr-xr-xurpmf1
-rwxr-xr-xurpmi.addmedia7
-rwxr-xr-xurpmi.removemedia3
-rw-r--r--urpmi.spec9
-rwxr-xr-xurpmi.update11
-rwxr-xr-xurpmq40
8 files changed, 69 insertions, 38 deletions
diff --git a/urpm.pm b/urpm.pm
index 89e3f834..d3f0ee59 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1731,7 +1731,7 @@ sub get_source_packages {
if ($urpm->{source}{$_}) {
$local_sources{$_} = $urpm->{source}{$_};
} else {
- $fullname2id{$p->fullname} = $_;
+ $fullname2id{$p->fullname} = $_.'';
}
}
@@ -1741,30 +1741,30 @@ sub get_source_packages {
$file2fullnames{($pkg->filename =~ /(.*)\.rpm$/ && $1) || $pkg->fullname}{$pkg->fullname} = undef;
}
- #- examine the local repository, which is trusted.
+ #- examine the local repository, which is trusted (no gpg or pgp signature check but md5 is now done).
opendir D, "$urpm->{cachedir}/rpms";
while (defined($_ = readdir D)) {
- if (/([^\/]*)\.rpm/) {
- if (!$options{clean} && -s "$urpm->{cachedir}/rpms/$1.rpm") {
- #print STDERR "looking at $urpm->{cachedir}/rpms/$1.rpm\n";
- if (keys(%{$file2fullnames{$1} || {}}) > 1) {
- $urpm->{error}(_("there are multiple packages with the same rpm filename \"%s\""), $1);
+ if (my ($filename) = /^([^\/]*)\.rpm$/) {
+ my $filepath = "$urpm->{cachedir}/rpms/$filename.rpm";
+ if (!$options{clean} && -s $filepath && URPM::verify_rpm($filepath, nogpg => 1, nopgp => 1) =~ /OK/) {
+ if (keys(%{$file2fullnames{$filename} || {}}) > 1) {
+ $urpm->{error}(_("there are multiple packages with the same rpm filename \"%s\""), $filename);
next;
- } elsif (keys(%{$file2fullnames{$1} || {}}) == 1) {
- my ($fullname) = keys(%{$file2fullnames{$1} || {}});
+ } elsif (keys(%{$file2fullnames{$filename} || {}}) == 1) {
+ my ($fullname) = keys(%{$file2fullnames{$filename} || {}});
if (defined($id = delete $fullname2id{$fullname})) {
- $local_sources{$id} = "$urpm->{cachedir}/rpms/$1.rpm";
+ $local_sources{$id} = $filepath;
} else {
- push @local_to_removes, "$urpm->{cachedir}/rpms/$1.rpm";
+ push @local_to_removes, $filepath;
}
} else {
- push @local_to_removes, "$urpm->{cachedir}/rpms/$1.rpm";
+ push @local_to_removes, $filepath;
}
} else {
#- this is an invalid file in cache, remove it and ignore it.
#- or clean options has been given meaning ignore any file in cache
#- remove it too.
- unlink "$urpm->{cachedir}/rpms/$1.rpm";
+ unlink $filepath;
}
} #- no error on unknown filename located in cache (because .listing)
}
diff --git a/urpme b/urpme
index 3b7a916b..b175b9bc 100644
--- a/urpme
+++ b/urpme
@@ -39,7 +39,15 @@ my $yesexpr = _("Yy");
local $_ = ' ' . join(' ', @ARGV) . ' ';
if ( / --?h/ || @ARGV == 0 ) {
- print STDERR _("usage: urpme [-a] [--auto] <packages...>\n");
+ print STDERR _("urpme version %s
+Copyright (C) 1999, 2000, 2001, 2002 MandrakeSoft.
+This is free software and may be redistributed under the terms of the GNU GPL.
+
+usage:
+", $urpm::VERSION) . _(" --help - print this help message.
+") . _(" --auto - automatically select a package in choices.
+") . _(" -a - select all packages matching expression.
+");
exit(0);
}
diff --git a/urpmf b/urpmf
index 06820092..1cce7060 100755
--- a/urpmf
+++ b/urpmf
@@ -22,6 +22,7 @@ do
$ECHO "This is free software and may be redistributed under the terms of the GNU GPL."
echo
$ECHO "usage: urpmf [options] <file>"
+ $ECHO " --help - print this help message."
$ECHO " --quiet - do not print tag name (default if no tag given on command"
$ECHO " line, incompatible with interactive mode)."
$ECHO " --all - print all tags."
diff --git a/urpmi.addmedia b/urpmi.addmedia
index ceb77ff2..d4fcfd63 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -39,9 +39,7 @@ where <url> is one of
removable://<path>
and [options] are from
-") . _(" -c - clean headers cache directory.
-") . _(" -h - try to find and use synthesis or hdlist file.
-") . _(" -f - force generation of hdlist files.
+") . _(" --help - print this help message.
") . _(" --wget - use wget to retrieve distant files.
") . _(" --curl - use curl to retrieve distant files.
") . _(" --proxy - use specified HTTP proxy, the port number is assumed
@@ -50,6 +48,9 @@ and [options] are from
authentication (format is <user:password>).
") . _(" --update - create an update medium.
") . _(" --distrib - automatically create all media from an installation medium.
+") . _(" -c - clean headers cache directory.
+") . _(" -h - try to find and use synthesis or hdlist file.
+") . _(" -f - force generation of hdlist files.
");
$options{force} = 0;
diff --git a/urpmi.removemedia b/urpmi.removemedia
index a3bd9381..c7eac093 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -33,9 +33,10 @@ sub main {
/^--?c/ and $options{noclean} = 0, next;
/^-/ and die _("usage: urpmi.removemedia [-a] <name> ...
where <name> is a medium name to remove.
+") . _(" --help - print this help message.
") . _(" -a - select all media.
") . _(" -c - clean headers cache directory.
-") . _("\nunknown options '%s'\n", $_);
+") . (/^--?h(?:elp)$/ ? _("\nunknown options '%s'\n", $_) : '');
push @toremoves, $_;
}
diff --git a/urpmi.spec b/urpmi.spec
index b9af416a..3a71e03d 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 4.0
-Release: 21mdk
+Release: 22mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -204,6 +204,13 @@ fi
%changelog
+* Thu Oct 24 2002 François Pons <fpons@mandrakesoft.com> 4.0-22mdk
+- fixed online help of tools to be more consistent.
+- added some times missing --help options.
+- fixed bad version displayed by urpmq.
+- added --list-aliases to list parallel aliases.
+- fixed bad rpm in cache by checking only MD5 signature.
+
* Wed Oct 16 2002 François Pons <fpons@mandrakesoft.com> 4.0-21mdk
- fixed bad copy of files when a relative symlink is used.
- added minimal README documentation files for distributed modules.
diff --git a/urpmi.update b/urpmi.update
index e9c5a32d..06373277 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -57,17 +57,18 @@ sub main {
/^--?noa/ and next; #- default, keeped for compability.
/^-/ and die _("usage: urpmi.update [options] <name> ...
where <name> is a medium name to update.
-") . _(" -a - select all non-removable media.
-") . _(" -c - clean headers cache directory.
-") . _(" -d - force complete computation of depslist.ordered file.
-") . _(" -f - force generation of hdlist files.
+") . _(" --help - print this help message.
") . _(" --wget - use wget to retrieve distant files.
") . _(" --curl - use curl to retrieve distant files.
") . _(" --proxy - use specified HTTP proxy, the port number is assumed
to be 1080 by default (format is <proxyhost[:port]>).
") . _(" --proxy-user - specify user and password to use for proxy
authentication (format is <user:password>).
-") . _("\nunknown options '%s'\n", $_);
+") . _(" -a - select all non-removable media.
+") . _(" -c - clean headers cache directory.
+") . _(" -d - force complete computation of depslist.ordered file.
+") . _(" -f - force generation of hdlist files.
+") . (/^--?h(?:elp)$/ ? _("\nunknown options '%s'\n", $_) : '');
push @toupdates, $_;
}
diff --git a/urpmq b/urpmq
index e8438013..47e8d9a5 100755
--- a/urpmq
+++ b/urpmq
@@ -37,18 +37,8 @@ Copyright (C) 2000, 2001, 2002 MandrakeSoft.
This is free software and may be redistributed under the terms of the GNU GPL.
usage:
-") . _(" -h - print this help message.
-") . _(" -v - verbose mode.
-") . _(" -d - extend query to package dependencies.
-") . _(" -u - remove package if a more recent version is already installed.
-") . _(" -c - choose complete method for resolving requires closure.
-") . _(" -P - do not search in provides to find package.
-") . _(" -y - impose fuzzy search (same as --fuzzy).
-") . _(" -s - next package is a source package (same as --src).
-") . _(" -g - print groups with name also.
-") . _(" -r - print version and release with name also.
-") . _(" -f - print version, release and arch with name.
-") . "\n" . _(" --update - use only update media.
+", $urpm::VERSION) . _(" --help - print this help message.
+") . _(" --update - use only update media.
") . _(" --media - use only the media listed by comma.
") . _(" --synthesis - use the synthesis given instead of urpmi db.
") . _(" --auto-select - automatically select packages to upgrade the system.
@@ -56,6 +46,7 @@ usage:
") . _(" --list - list available packages.
") . _(" --list-media - list available media.
") . _(" --list-nodes - list available nodes when using --parallel.
+") . _(" --list-aliases - list available parallel aliases.
") . _(" --src - next package is a source package (same as -s).
") . _(" --headers - extract headers for package listed from urpmi db to
stdout (root only).
@@ -68,8 +59,18 @@ usage:
to be 1080 by default (format is <proxyhost[:port]>).
") . _(" --proxy-user - specify user and password to use for proxy
authentication (format is <user:password>).
+") . _(" -v - verbose mode.
+") . _(" -d - extend query to package dependencies.
+") . _(" -u - remove package if a more recent version is already installed.
+") . _(" -c - choose complete method for resolving requires closure.
+") . _(" -P - do not search in provides to find package.
+") . _(" -y - impose fuzzy search (same as --fuzzy).
+") . _(" -s - next package is a source package (same as --src).
+") . _(" -g - print groups with name also.
+") . _(" -r - print version and release with name also.
+") . _(" -f - print version, release and arch with name.
") . "\n" . _(" names or rpm files given on command line are queried.
-", $urpm::VERSION);
+");
exit(0);
}
@@ -89,6 +90,7 @@ for (@ARGV) {
/^--list$/ and do { $query->{list} = 1; next };
/^--list-media$/ and do { $query->{list_media} = 1; next };
/^--list-nodes$/ and do { $query->{list_nodes} = 1; next };
+ /^--list-aliases$/ and do { $query->{list_aliases} = 1; next };
/^--src$/ and do { $query->{src} = 1; next };
/^--headers$/ and do { $query->{headers} = 1; next };
/^--sources$/ and do { $query->{sources} = 1; next };
@@ -156,7 +158,17 @@ $urpm->configure(nocheck_access => 1,
my $state = {};
my %requested;
-if ($query->{list_nodes}) {
+if ($query->{list_aliases}) {
+ local ($_, *PARALLEL);
+ open PARALLEL, "/etc/urpmi/parallel.cfg";
+ while (<PARALLEL>) {
+ chomp; s/#.*$//; s/^\s*//; s/\s*$//;
+ /\s*([^:]*):/ or next;
+ print "$1\n";
+ }
+ close PARALLEL;
+} elsif ($query->{list_nodes}) {
+ $query->{parallel} or $urpm->{fatal}(1, _("--list-nodes can only be used with --parallel"));
foreach (keys %{$urpm->{parallel_handler}{nodes} || {}}) {
print "$_\n";
}