backend/satellite_tools/Makefile | 2 +-
backend/satellite_tools/satsync.py | 12 +++++++++---
backend/server/handlers/app/packages.py | 22 ++++++++++++++--------
backend/setup.py | 2 +-
4 files changed, 25 insertions(+), 13 deletions(-)
New commits:
commit 4e287ce0f5eee91c095ee132afd266755595ee2a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Dec 14 16:24:23 2009 +0100
spacewalk-report moved out of backend (see 6e3b9f87e)
diff --git a/backend/satellite_tools/Makefile b/backend/satellite_tools/Makefile
index fb22c4b..5f3d4ff 100644
--- a/backend/satellite_tools/Makefile
+++ b/backend/satellite_tools/Makefile
@@ -17,7 +17,7 @@ FILES = __init__ connection diskImportLib messages \
SCRIPTS = satellite-sync spacewalk-debug\
rhn-schema-version rhn-satellite-activate rhn-charsets \
rhn-ssl-dbstore update-packages rhn-db-stats rhn-schema-stats \
- spacewalk-repo-sync spacewalk-report
+ spacewalk-repo-sync
SPACEWALK_SUBDIRS = reports reports/data
commit 8fb26d450dfd854f66044de0e0d97dae97f5ca81
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Dec 14 15:14:09 2009 +0100
fixed 'packages.channelPackageSubscriptionBySession': caught <type
'exceptions.KeyError'> : 'md5sum'
diff --git a/backend/server/handlers/app/packages.py
b/backend/server/handlers/app/packages.py
index 86cbdc6..7e448ac 100644
--- a/backend/server/handlers/app/packages.py
+++ b/backend/server/handlers/app/packages.py
@@ -349,14 +349,18 @@ class Packages(RPC_Base):
if package['arch'] == 'src' or package['arch'] ==
'nosrc':
# Source package - no reason to continue
continue
- _md5sum_sql_filter = ""
- md5sum_exists = 0
- if package.has_key('md5sum') and CFG.ENABLE_NVREA:
- md5sum_exists = 1
- _md5sum_sql_filter = """and c.checksum =
:md5sum"""
+ _checksum_sql_filter = ""
+ checksum_exists = 0
+ if 'md5sum' in package: # for old rhnpush compatibility
+ package['checksum'] = ('md5',
package['md5sum'])
+
+ if package.has_key('checksum') and CFG.ENABLE_NVREA:
+ checksum_exists = 1
+ _checksum_sql_filter = """and c.checksum = :checksum
+ and c.checksum_type =
:checksum_type"""
h = rhnSQL.prepare(self._get_pkg_info_query % \
- _md5sum_sql_filter)
+ _checksum_sql_filter)
pkg_epoch = None
if package['epoch'] != '':
pkg_epoch = package['epoch']
@@ -366,7 +370,9 @@ class Packages(RPC_Base):
pkg_epoch=pkg_epoch, \
pkg_version=package['version'], \
pkg_rel=package['release'],pkg_arch=package['arch'],
\
- orgid = org_id, md5sum = package['md5sum'] )
+ orgid = org_id, \
+ checksum_type = package['checksum'][0], \
+ checksum = package['checksum'][1])
else:
h.execute(pkg_name=package['name'], \
pkg_epoch=pkg_epoch, \
@@ -376,7 +382,7 @@ class Packages(RPC_Base):
row = h.fetchone_dict()
- package['md5sum'] = row['md5sum']
+ package['checksum'] = (row['checksum_type'],
row['checksum'])
package['org_id'] = org_id
package['channels'] = channelList
batch.append(IncompletePackage().populate(package))
commit a036d4b387913d9dcc1a4be2d9589fd3c3f469a9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Dec 14 14:44:37 2009 +0100
fixed import of kickstart trees nad packages (satellite-sync)
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 230d32c..17ff868 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1423,10 +1423,13 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
relative_path = f['relative_path']
dest_path = os.path.join(base_path, relative_path)
timestamp = rhnLib.timestamp(f['last_modified'])
- md5sum = f['md5sum']
+ if 'md5sum' in f: # old pre-sha256 kickstart export
+ checksum = ('md5', f['md5sum'])
+ else:
+ checksum = (f['checksum_type'], f['checksum'])
file_size = f['file_size']
(errcode, ret_path) = self._verify_file(dest_path,
- timestamp, file_size, ('md5', md5sum)) # FIXME sha256
+ timestamp, file_size, checksum)
if errcode != 0:
# Have to download it
val = (kt_label, base_path, relative_path,
@@ -1674,7 +1677,10 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
# Populate the package key info
if len(self.pkg_header_info) > 0:
for data in self.pkg_header_info:
- checksum = ('md5', data['md5sum']) # FIXME sha256
+ if 'md5sum' in data: # old pre-sha256 package export
+ checksum = ('md5', data['md5sum'])
+ else:
+ checksum = (data['checksum_type'],
data['checksum'])
server_packages.processPackageKeyAssociations(data['header'],
\
checksum)
return self._link_channel_packages()
commit 52405c8fce62b4e7eaf6d69ed1ea59f33bc288e7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Dec 14 14:20:22 2009 +0100
fixed spacewalk-backend-libs packaging error
diff --git a/backend/setup.py b/backend/setup.py
index ecb8896..f07abf8 100644
--- a/backend/setup.py
+++ b/backend/setup.py
@@ -12,6 +12,6 @@ setup(name = os.environ["PYTHON_MODULE_NAME"],
long_description = """A collection of python modules used by the
Spacewalk (
http://spacewalk.redhat.com) software.""",
url = 'http://spacewalk.redhat.com',
- packages = ["spacewalk/common"],
+ packages = ["spacewalk", "spacewalk/common"],
license = "GPL",
)