backend/server/importlib/backend.py | 12 +++++++-----
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 5ad729d1506439fa89c94e887c3cd0fd97fb3a20
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 25 11:45:50 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.6.13-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 90cda5f..9fc842e 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.6.12
+Version: 1.6.13
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -674,6 +674,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Aug 25 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.13-1
+- fixed package lookup
+
* Fri Aug 19 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.12-1
- 593402 - cobbler-web is known to break our configuration
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 80d2f8b..36d81df 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.12-1 backend/
+1.6.13-1 backend/
commit 0285415f8403d2714b72e3534138fbd92230f6c1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 25 11:34:50 2011 +0200
fixed package lookup
regression caused by 86ec92b1c0221a9bb51e0f032f1800b349972036
fixing
Traceback (most recent call last):
File "/usr/bin/satellite-sync", line 139, in main
return satsync.Runner().main()
...
File
"/usr/lib/python2.4/site-packages/spacewalk/server/importlib/backend.py", line
1701, in __lookupObjectCollection
raise InvalidPackageError(object, "Could not find object %s in table %s"
% (object, tableName))
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index 29e4f0f..dc2a0b8 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -480,19 +480,21 @@ class Backend:
raise TypeError("Expected an IncompletePackage instance, found
%s" % \
str(type(package)))
for package in packages:
+ # here we need to figure out which checksum we have in the database
+ not_found = None
for type, chksum in package['checksums'].iteritems():
package['checksum_type'] = type
package['checksum'] = chksum
package['checksum_id'] = checksums[(type, chksum)]
try:
self.__lookupObjectCollection([package], 'rhnPackage')
- exception = None
+ not_found = None
break
except InvalidPackageError, e:
- if ignore_missing:
- pass
- else:
- raise
+ not_found = (e, sys.exc_info()[2])
+ if not_found and not ignore_missing:
+ # package is not in database at all
+ raise not_found[0], None, not_found[1]
def lookupSolarisPackages(self, packages, ignore_missing=0):
for pkg in packages: