summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/BuildMedia.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MGA/DrakISO/BuildMedia.pm')
-rw-r--r--lib/MGA/DrakISO/BuildMedia.pm14
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);