summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Dieter <jdieter@gmail.com>2007-03-26 17:53:44 +0300
committerJonathan Dieter <jdieter@gmail.com>2007-03-26 17:53:44 +0300
commitbed4147fd41e2d458a5be66d4937f4b9ddd1523e (patch)
tree40e4e54b557f89797b0f51f7cefc58f2d6a5baf6
parent9f1276c8c12780d8e00fa0b5e3335919d8bbcc1e (diff)
downloadpresto-bed4147fd41e2d458a5be66d4937f4b9ddd1523e.zip
presto-bed4147fd41e2d458a5be66d4937f4b9ddd1523e.tar.gz
presto-bed4147fd41e2d458a5be66d4937f4b9ddd1523e.tar.xz
Fix bug where we sometimes die if delta repository doesn't exist
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
-rw-r--r--ChangeLog6
-rw-r--r--shared/prestoTransaction.py12
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6366884..c34b504 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,9 @@
-* Mon Mar 27 2007 Jonathan Dieter <jdieter@gmail.com> - 0.2.5
+* Mon Mar 26 2007 Jonathan Dieter <jdieter@gmail.com> - 0.2.6
- Fix another mirrorlist bug
-
-* Mon Mar 26 2007 Jonathan Dieter <jdieter@gmail.com> - 0.2.4
- Minor optimization
- Added logging to /var/log/presto.log
+ - Fix another mirrorlist bug
+ - Fix bug where we sometimes die if delta repository doesn't exist
* Sat Mar 24 2007 Jonathan Dieter <jdieter@gmail.com> - 0.2.3
- Fixed bug that breaks yum install
diff --git a/shared/prestoTransaction.py b/shared/prestoTransaction.py
index 15ad928..8a46211 100644
--- a/shared/prestoTransaction.py
+++ b/shared/prestoTransaction.py
@@ -24,8 +24,14 @@ def find_available_drpms(conduit, newpkg):
rpmdb = conduit.getRpmDB()
- # Saves us some typing
- p_repo = newpkg.po.repo.p_repo
+ # Set p_repo to be packages delta repository or set to False if
+ # there is no delta repository
+ try:
+ p_repo = newpkg.po.repo.p_repo
+ drpm_enabled = p_repo.enabled
+ except:
+ drpm_enabled = False
+
chosen_drpm = None
# First part of key when matching drpms
@@ -44,7 +50,7 @@ def find_available_drpms(conduit, newpkg):
else:
is_local = False
- if is_installed and p_repo.enabled and not is_local:
+ if is_installed and drpm_enabled and not is_local:
for oldpkg in installed:
# Generate second part of key for matching drpms, then full key
key2 = "%s*%s*%i*%s*%s" % (oldpkg.name, oldpkg.arch, int(oldpkg.epoch), oldpkg.version, oldpkg.release)