summaryrefslogtreecommitdiffstats
path: root/urpm/sys.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-11 15:32:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-11 15:32:55 +0000
commitc5399523daa90db86e0dd1220d5480e7baf1cfd3 (patch)
tree0334fb402018ba2061b2418d4ad75579188cf87e /urpm/sys.pm
parente0c8dc16a48b88912b7845d051b7bfee4a6d3559 (diff)
downloadurpmi-c5399523daa90db86e0dd1220d5480e7baf1cfd3.tar
urpmi-c5399523daa90db86e0dd1220d5480e7baf1cfd3.tar.gz
urpmi-c5399523daa90db86e0dd1220d5480e7baf1cfd3.tar.bz2
urpmi-c5399523daa90db86e0dd1220d5480e7baf1cfd3.tar.xz
urpmi-c5399523daa90db86e0dd1220d5480e7baf1cfd3.zip
move get_packages_list() (for next commit)
Diffstat (limited to 'urpm/sys.pm')
-rw-r--r--urpm/sys.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index 20061813..90f91e8d 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -10,6 +10,21 @@ use POSIX ();
(our $VERSION) = q($Revision$) =~ /(\d+)/;
+
+#- get the list of packages that should not be upgraded or installed,
+#- typically from the inst.list or skip.list files.
+sub get_packages_list {
+ my ($file, $o_extra) = @_;
+ my $val = [];
+ open(my $f, '<', $file);
+ foreach (<$f>, split /,/, $o_extra || '') {
+ chomp; s/#.*$//; s/^\s*//; s/\s*$//;
+ next if $_ eq '';
+ push @$val, $_;
+ }
+ $val;
+}
+
#- find used mount point from a pathname, use a optional mode to allow
#- filtering according the next operation (mount or umount).
sub find_mntpoints {