From 3481fae53f31389b1abe13b7b5b895d78e11abdb Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 3 Jan 2018 10:55:08 +0000 Subject: drakclassic: Support arch specific packages in package lists. --- lib/MGA/DrakISO/BuildMedia.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/MGA') 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); -- cgit v1.2.1