satellite/install/install.pl | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 449a348a7b1fc42055d894ff1fa1fe2f74408b56
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Tue Jun 2 15:39:39 2009 -0300
502958 - Use up2date in installer if on RHEL 4 that has yum installed.
diff --git a/satellite/install/install.pl b/satellite/install/install.pl
index 1c88b4c..f91f7dc 100755
--- a/satellite/install/install.pl
+++ b/satellite/install/install.pl
@@ -73,6 +73,17 @@ Spacewalk::Setup::upgrade_stop_services(\%opts);
remove_obsoleted_packages(\%opts);
my $have_yum = ( -f '/usr/bin/yum' ? 1 : 0 );
+if ($have_yum) {
+ # If we have yum available but are on RHEL 4, stick with up2date:
+ # NOTE: Even if the system has no redhat-release (i.e. Fedora) this regex
+ # will simply not match.
+ my $redhat_release = `rpm -q --qf='%{VERSION}' redhat-release`;
+ if ($redhat_release =~ /^4.*/) {
+ $have_yum = 0;
+ print loc("Warning: Found yum on RHEL 4, using up2date instead.\n");
+ }
+}
+
my $run_updater;
if (defined $opts{'run-updater'}) {
Show replies by date