diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-03 10:55:08 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-03 10:55:08 +0000 |
commit | 3481fae53f31389b1abe13b7b5b895d78e11abdb (patch) | |
tree | 98f85078efce6f3c3871c7d433b596888711c62e | |
parent | 91adee2992220d8ffc6c49b630c78afe7d43c779 (diff) | |
download | drakiso-3481fae53f31389b1abe13b7b5b895d78e11abdb.tar drakiso-3481fae53f31389b1abe13b7b5b895d78e11abdb.tar.gz drakiso-3481fae53f31389b1abe13b7b5b895d78e11abdb.tar.bz2 drakiso-3481fae53f31389b1abe13b7b5b895d78e11abdb.tar.xz drakiso-3481fae53f31389b1abe13b7b5b895d78e11abdb.zip |
drakclassic: Support arch specific packages in package lists.
-rw-r--r-- | lib/MGA/DrakISO/BuildMedia.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/MGA/DrakISO/BuildMedia.pm b/lib/MGA/DrakISO/BuildMedia.pm index 06376b5..9ed9026 100644 --- a/lib/MGA/DrakISO/BuildMedia.pm +++ b/lib/MGA/DrakISO/BuildMedia.pm @@ -371,6 +371,8 @@ sub add_dependencies_to_selected_packages { sub get_known_conflicts { my ($build) = @_; + my $arch = $build->{settings}{arch}; + my $file = $build->{known_conflicts}; -f $file or return; @@ -378,6 +380,11 @@ sub get_known_conflicts { foreach my $line (cat_($file)) { my ($data, $comment) = split('#', $line); next if !$data; # skip pure comment lines + my ($head, $tail) = split(':', $data, 2); + if ($head && $tail) { + next if $head !~ /\s*$arch\s*/; + $data = $tail; + } my @packages = split(' ', $data); foreach my $pkg (@packages) { $known_conflicts{$pkg} = 1; @@ -656,11 +663,18 @@ sub remove_from_selected_packages { sub update_package_selection { my ($build, $file, $action, $class, $o_warn) = @_; + my $arch = $build->{settings}{arch}; + -f $file or die "ERROR: cannot open package list file '$file'\n"; foreach my $line (cat_($file)) { chomp($line); my ($data, $comment) = split('#', $line); next if !$data; # skip pure comment lines + my ($head, $tail) = split(':', $data, 2); + if ($head && $tail) { + next if $head !~ /\s*$arch\s*/; + $data = $tail; + } my @packages = split(' ', $data); foreach my $pkg (@packages) { my @alternatives = split('\|', $pkg); |