summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-02-14 13:32:39 +0000
committerFrancois Pons <fpons@mandriva.com>2001-02-14 13:32:39 +0000
commit2a2de4e6275563b1d974f695ef87fa7748df6520 (patch)
tree06b08a8d69d87e756dfed5d3dc9cf180d2bbcbf7
parent81c13ed0d79db9b10de7eda92115f12283e13409 (diff)
downloadurpmi-2a2de4e6275563b1d974f695ef87fa7748df6520.tar
urpmi-2a2de4e6275563b1d974f695ef87fa7748df6520.tar.gz
urpmi-2a2de4e6275563b1d974f695ef87fa7748df6520.tar.bz2
urpmi-2a2de4e6275563b1d974f695ef87fa7748df6520.tar.xz
urpmi-2a2de4e6275563b1d974f695ef87fa7748df6520.zip
*** empty log message ***
-rw-r--r--urpm.pm23
-rwxr-xr-xurpmi.addmedia5
-rw-r--r--urpmi.spec10
3 files changed, 21 insertions, 17 deletions
diff --git a/urpm.pm b/urpm.pm
index 24732b39..c673cc20 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -382,8 +382,9 @@ sub update_media {
#- hdlist file else build it from rpms files.
foreach my $medium (@{$urpm->{media}}) {
#- take care of modified medium only or all if all have to be recomputed.
+ #- but do not take care of removable media for all.
$medium->{ignore} and next;
- $medium->{modified} ||= $options{all} or next;
+ $medium->{modified} ||= $options{all} && $medium->{url} !~ /removable/ or next;
#- list of rpm files for this medium, only available for local medium where
#- the source hdlist is not used (use force).
@@ -1178,7 +1179,7 @@ sub select_packages_to_upgrade {
$ask_child->($pkg->{name}, "obsoletes", sub {
#- take care of flags and version and release if present
if ($_[0] =~ /^(\S*)\s*(\S*)\s*([^\s-]*)-?(\S*)/ &&
- rpmtools::db_traverse_names($db, [], [$1], undef) > 0) {
+ rpmtools::db_traverse_tag($db, "name", [$1], [], undef) > 0) {
$3 and eval(rpmtools::version_compare($pkg->{version}, $3) . $2 . 0) or next;
$4 and eval(rpmtools::version_compare($pkg->{release}, $4) . $2 . 0) or next;
$urpm->{log}("selecting $pkg->{name}-$pkg->{version}-$pkg->{release} using obsoletes");
@@ -1225,9 +1226,9 @@ sub select_packages_to_upgrade {
#- find new packages to upgrade.
foreach my $pkg (values %{$urpm->{params}{info}}) {
my $skipThis = 0;
- my $count = rpmtools::db_traverse_names($db, [ 'name' ], [ $pkg->{name} ], sub {
- $skipThis ||= $pkg->{installed};
- });
+ my $count = rpmtools::db_traverse_tag($db, "name", [ $pkg->{name} ], [ 'name' ], sub {
+ $skipThis ||= $pkg->{installed};
+ });
#- skip if not installed (package not found in current install).
$skipThis ||= ($count == 0);
@@ -1241,12 +1242,12 @@ sub select_packages_to_upgrade {
#- keep in mind installed files which are not being updated. doing this costs in
#- execution time but use less memory, else hash all installed files and unhash
#- all file for package marked for upgrade.
- rpmtools::db_traverse_names($db, [ qw(name files) ], [ $pkg->{name} ], sub {
- my ($p) = @_;
- @installedFilesForUpgrade{grep { ($_ !~ m|^/etc/rc.d/| && $_ !~ m|\.la$| &&
- ! -d "$prefix/$_" && ! -l "$prefix/$_") }
- @{$p->{files}}} = ();
- });
+ rpmtools::db_traverse_tag($db, "name", [ $pkg->{name} ], [ qw(name files) ], sub {
+ my ($p) = @_;
+ @installedFilesForUpgrade{grep { ($_ !~ m|^/etc/rc.d/| && $_ !~ m|\.la$| &&
+ ! -d "$prefix/$_" && ! -l "$prefix/$_") }
+ @{$p->{files}}} = ();
+ });
$ask_child->($pkg->{name}, "files", sub {
delete $installedFilesForUpgrade{$_[0]};
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 83850b17..d31307b3 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -30,13 +30,12 @@ where <url> is one of
ftp://<login>:<password>@<host>/<path> with <relative filename of hdlist>
ftp://<host>/<path> with <relative filename of hdlist>
http://<host>/<path> with <relative filename of hdlist>
- removable_<device>_<number>://<path>
+ removable_<device>://<path>
";
$name or die $usage;
- my ($type, $dev, $num) = $url =~ m,^(file|ftp|http|removable_(\w+)_(\d+))://, or die $usage;
+ my ($type, $dev) = $url =~ m,^(file|ftp|http|removable_(\w+)(?:_\d+)?)://, or die $usage;
if ($type eq "removable") {
- $num =~ /^\d+$/ or die "$usage bad number (is `$num')\n";
$dev && -e "/dev/$dev" or die "$usage device `$dev' do not exist\n";
} elsif ($with eq "with") {
$relative_hdlist or die "$usage <relative path of hdlist> missing\n";
diff --git a/urpmi.spec b/urpmi.spec
index fa3bb4f5..fd818e45 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,12 +2,12 @@
Name: urpmi
Version: 1.5
-Release: 1mdk
+Release: 2mdk
License: GPL
Source0: %{name}.tar.bz2
Summary: User mode rpm install
Requires: /usr/bin/suidperl, eject, wget
-PreReq: rpmtools >= 2.2
+PreReq: rpmtools >= 2.3
BuildRoot: %{_tmppath}/%{name}-buildroot
Group: %{group}
@@ -113,7 +113,11 @@ autoirpm.uninstall
%changelog
-* Wed Feb 14 2001 François Pons <fpons@ackbar.mandrakesoft.com> 1.5-1mdk
+* Wed Feb 14 2001 François Pons <fpons@mandrakesoft.com> 1.5-2mdk
+- removable medium are not automatically updated now.
+- remove need of number removable device when adding a new medium.
+
+* Wed Feb 14 2001 François Pons <fpons@mandrakesoft.com> 1.5-1mdk
- added --auto-select flag for urpmi and urpmq.
- added --headers flag to urpmq.
- changed help screen for both urpmi and urpmq.