diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-09 09:10:44 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-09 09:10:44 +0000 |
commit | 7a504d096c0c3b0984f132c98eb3ac10087f4562 (patch) | |
tree | 4498a895a19b4d07d3172dea6c61ad6292536c74 | |
parent | d58475cf4160b40641c9f0bc102bdb117cdb84fe (diff) | |
download | urpmi-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.pm | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -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. |