summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-09 09:10:44 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-09 09:10:44 +0000
commit7a504d096c0c3b0984f132c98eb3ac10087f4562 (patch)
tree4498a895a19b4d07d3172dea6c61ad6292536c74
parentd58475cf4160b40641c9f0bc102bdb117cdb84fe (diff)
downloadurpmi-7a504d096c0c3b0984f132c98eb3ac10087f4562.tar
urpmi-7a504d096c0c3b0984f132c98eb3ac10087f4562.tar.gz
urpmi-7a504d096c0c3b0984f132c98eb3ac10087f4562.tar.bz2
urpmi-7a504d096c0c3b0984f132c98eb3ac10087f4562.tar.xz
urpmi-7a504d096c0c3b0984f132c98eb3ac10087f4562.zip
Simplify the format of the skip.list and inst.list files (so it now
matches what's documented :)
-rw-r--r--urpm.pm14
1 files changed, 3 insertions, 11 deletions
diff --git a/urpm.pm b/urpm.pm
index a7d1d75a..0b2869e9 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2150,25 +2150,17 @@ sub create_transaction {
#- get the list of packages that should not be upgraded or installed,
#- typically from the inst.list or skip.list files.
-#- This file contains lines with the following format :
-#- 0. everything after a '#' is ignored
-#- 1. name of package or regular expression between slashes
-#- 2. optional string "[*]", or optional "["
-#- 3. version specification (a comparison operator and a version number)
-#- 4. the rest of the line is ignored
sub get_packages_list {
my ($file, $extra) = @_;
- my %val;
+ my $val = [];
local $_;
open my $f, $file or return {};
for (<$f>, split /,/, $extra) {
chomp; s/#.*$//; s/^\s*//; s/\s*$//;
- if (my ($n, $s) = /^([^\s\[]+)(?:\[\*\])?\[?\s*([^\s\]]*\s*[^\s\]]*)/) {
- $val{$n}{$s} = undef;
- }
+ push @$val, $_;
}
close $f;
- \%val;
+ $val;
}
#- select source for package selected.