From 18d16d763908d30ec7cb02243f33ff1c3c990651 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 5 Apr 2015 16:19:53 -0700 Subject: [PATCH] Don't append the architecture un-necessarily, as this breaks upgrades that change it http://virtualmin.com/node/36740 --- software/yum-lib.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/software/yum-lib.pl b/software/yum-lib.pl index bde0ab941..fe60d162a 100755 --- a/software/yum-lib.pl +++ b/software/yum-lib.pl @@ -19,8 +19,14 @@ if ($in->{'enablerepo'}) { $enable = "enablerepo=".quotemeta($in->{'enablerepo'}); } local (@rv, @newpacks); + +# If there are multiple architectures to update for a package, split them out local @names = map { &append_architectures($_) } split(/\s+/, $update); +if (@names == 1) { + @names = ( $update ); + } $update = join(" ", @names); + print "",&text('yum_install', "yum $enable -y install $update"),"

\n"; print "

";
 &additional_log('exec', undef, "yum $enable -y install $update");
@@ -83,8 +89,8 @@ else {
 }
 
 # append_architectures(package)
-# Given a package name, if it has multiple architectures return the name with each
-# appended
+# Given a package name, if it has multiple architectures return the name with
+# each appended
 sub append_architectures
 {
 my ($name) = @_;