summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kent <mkent@magoazul.com>2011-05-10 11:42:59 -0700
committerBryan McLellan <btm@opscode.com>2011-05-19 18:05:38 -0700
commit120ff45ec1b13d49e0772ef554b5bd597f18ee5c (patch)
tree6d0d9eaeccece742313e39137455000485ea4ff9
parent5268746fee205eb40e96a2437172580fe8ac3fee (diff)
downloadchef-120ff45ec1b13d49e0772ef554b5bd597f18ee5c.tar.gz
Lame fix for RHEL4 - mark all installed packages as available for
reinstall.
-rw-r--r--chef/lib/chef/provider/package/yum-dump.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/chef/lib/chef/provider/package/yum-dump.py b/chef/lib/chef/provider/package/yum-dump.py
index b8050553ea..4cb7dd139c 100644
--- a/chef/lib/chef/provider/package/yum-dump.py
+++ b/chef/lib/chef/provider/package/yum-dump.py
@@ -120,10 +120,17 @@ def dump_packages(yb, list):
pkg.type = 'a'
packages[str(pkg)] = pkg
- # These are both installed and available
- for pkg in db.reinstall_available:
- pkg.type = 'r'
- packages[str(pkg)] = pkg
+ if YUM_VER == 2:
+ # ugh - can't get the availability state of our installed rpms, lets assume
+ # they are available to install
+ for pkg in db.installed:
+ pkg.type = 'r'
+ packages[str(pkg)] = pkg
+ else:
+ # These are both installed and available
+ for pkg in db.reinstall_available:
+ pkg.type = 'r'
+ packages[str(pkg)] = pkg
unique_packages = packages.values()