summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-02-23 18:27:05 +0000
committerFrancois Pons <fpons@mandriva.com>2001-02-23 18:27:05 +0000
commitdd4a50b5b51dd974eeea86a3197e7126c2f7681e (patch)
treea9c21af569c08a73c735c2681f2954c4678dccb9
parentd7d3e19e4a30e2c7aa5293f5339b537fe7b8cfd7 (diff)
downloadurpmi-dd4a50b5b51dd974eeea86a3197e7126c2f7681e.tar
urpmi-dd4a50b5b51dd974eeea86a3197e7126c2f7681e.tar.gz
urpmi-dd4a50b5b51dd974eeea86a3197e7126c2f7681e.tar.bz2
urpmi-dd4a50b5b51dd974eeea86a3197e7126c2f7681e.tar.xz
urpmi-dd4a50b5b51dd974eeea86a3197e7126c2f7681e.zip
*** empty log message ***
-rw-r--r--urpm.pm16
-rwxr-xr-xurpmi3
-rw-r--r--urpmi.spec7
-rwxr-xr-xurpmq14
4 files changed, 35 insertions, 5 deletions
diff --git a/urpm.pm b/urpm.pm
index 398b063f..c4c483c9 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -57,6 +57,7 @@ sub new {
my ($class) = @_;
bless {
config => "/etc/urpmi/urpmi.cfg",
+ skiplist => "/etc/urpmi/skip.list",
depslist => "/var/lib/urpmi/depslist.ordered",
provides => "/var/lib/urpmi/provides",
compss => "/var/lib/urpmi/compss",
@@ -1113,6 +1114,21 @@ sub filter_minimal_packages_to_upgrade {
}
}
+#- get out of package that should not be upgraded.
+sub deselect_unwanted_packages {
+ my ($urpm, $packages) = @_;
+
+ my %skip;
+ local ($_, *F);
+ open F, $urpm->{skiplist};
+ while (<F>) {
+ chomp; s/#.*$//; s/^\s*//; s/\s*$//;
+ my $pkg = $urpm->{params}{info}{$_} or next;
+ exists $packages->{$pkg->{id}} && defined $packages->{$pkg->{id}} and delete $packages->{$pkg->{id}};
+ }
+ close F;
+}
+
#- select source for package selected.
#- according to keys given in the packages hash.
#- return a list of list containing the source description for each rpm,
diff --git a/urpmi b/urpmi
index 0eaef367..9da4ad42 100755
--- a/urpmi
+++ b/urpmi
@@ -185,6 +185,9 @@ if ($minimal) {
$urpm->filter_packages_to_upgrade(\%packages, $ask_choice, complete => $complete);
}
+#- get out of package that should not be upgraded.
+$urpm->deselect_unwanted_packages(\%packages);
+
#- package to install as a array of strings.
my @to_install;
diff --git a/urpmi.spec b/urpmi.spec
index 26e1a2ea..be4dff69 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 1.5
-Release: 6mdk
+Release: 7mdk
License: GPL
Source0: %{name}.tar.bz2
Summary: User mode rpm install
@@ -113,6 +113,11 @@ autoirpm.uninstall
%changelog
+* Fri Feb 23 2001 François Pons <fpons@mandrakesoft.com> 1.5-7mdk
+- added /etc/urpmi/skip.list for package that should not
+ be upgraded.
+- remove -v option of urpmq to match -v as verbose.
+
* Mon Feb 19 2001 François Pons <fpons@mandrakesoft.com> 1.5-6mdk
- fixed urpmq --headers with exotic rpm filename.
- fixed closing using tee (need testing).
diff --git a/urpmq b/urpmq
index ce3599db..b4cb65ed 100755
--- a/urpmq
+++ b/urpmq
@@ -47,12 +47,12 @@ 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 dependancies.
-u - remove package if a better version is already installed.
-c - choose complete method for resolving requires closure.
-g - print groups too with name.
- -v - print version too with name.
- -r - print release too with name.
+ -r - print version and release too with name.
--auto-select - automatically select packages for upgrading the system.
--headers - extract headers for package listed from urpmi db to
@@ -76,8 +76,8 @@ for (@ARGV) {
/u/ and do { $query->{upgrade} = 1; next };
/c/ and do { $query->{complete} = 1; next };
/g/ and do { $query->{group} = 1; next };
- /v/ and do { $query->{version} = 1; next };
- /r/ and do { $query->{release} = 1; next };
+ /v/ and do { $query->{verbose} = 1; next };
+ /r/ and do { $query->{version} = $query->{release} = 1; next };
die( sprintf _("urpmq: unknown option \"-$1\", check usage with --help\n")); } next };
@nextargv and do { my $r = shift @nextargv; $r and $$r = $_; next };
/\.rpm$/ and do { -r $_ or print STDERR _("urpmq: cannot read rpm file \"$_\"\n"), next;
@@ -88,6 +88,9 @@ for (@ARGV) {
#- params contains informations to parse installed system.
my $urpm = new urpm;
+#- remove verbose if not asked.
+$query->{verbose} or $urpm->{log} = sub {};
+
$urpm->read_depslist;
$query && $query->{group} and $urpm->read_compss;
@@ -120,6 +123,9 @@ if ($query->{auto_select}) {
}
}
+#- get out of package that should not be upgraded.
+$urpm->deselect_unwanted_packages(\%packages);
+
#- filter to add in packages selected required packages.
$query->{deps} && !$query->{upgrade} and $urpm->compute_closure(\%packages);
$query->{upgrade} and $urpm->filter_packages_to_upgrade(\%packages, complete => $query->{complete});