backend/satellite_tools/exporter/exportLib.py | 7 ++++---
backend/satellite_tools/xmlSource.py | 7 +++++--
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 0c9ca5771cdfc4f8c22d2912d4b7929da3e2eb63
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Dec 2 23:43:12 2010 +0100
659348 - import checksum-type correctly
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index d2738a0..372eb46 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -612,9 +612,12 @@ addItem(ObsoletesItem)
class FileItem(BaseChecksummedItem):
item_name = 'rhn-package-file'
item_class = importLib.File
+ tagMap = {
+ 'checksum-type' : 'checksum_type',
+ }
def populate(self, attributes, elements):
- if 'md5' in attributes:
- attributes['checksum_type'] = 'md5'
+ if 'md5' in attributes and 'checksum-type' not in attributes:
+ attributes['checksum-type'] = 'md5'
attributes['checksum'] = attributes['md5']
item = BaseChecksummedItem.populate(self, attributes, elements)
return item
commit 336ccbcdff49f564fd9bba235337019184623d4d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Dec 2 22:26:58 2010 +0100
659348 - <rhn-package-file> attribute is checksum-type not checksum_type
diff --git a/backend/satellite_tools/exporter/exportLib.py
b/backend/satellite_tools/exporter/exportLib.py
index 52a533b..3d18a72 100644
--- a/backend/satellite_tools/exporter/exportLib.py
+++ b/backend/satellite_tools/exporter/exportLib.py
@@ -727,7 +727,8 @@ class _PackageDumper(BaseRowDumper):
pc.name, pf.device, pf.inode, pf.file_mode, pf.username,
pf.groupname, pf.rdev, pf.file_size,
TO_CHAR(mtime, 'YYYYMMDDHH24MISS') mtime,
- c.checksum_type, c.checksum, pf.linkto, pf.flags, pf.verifyflags,
pf.lang
+ c.checksum_type as "checksum-type",
+ c.checksum, pf.linkto, pf.flags, pf.verifyflags, pf.lang
from rhnPackageFile pf
left join rhnChecksumView c
on pf.checksum_id = c.id,
@@ -845,9 +846,9 @@ class _PackageFilesDumper(BaseDumper):
def dump_subelement(self, data):
data['mtime'] = _dbtime2timestamp(data['mtime'])
- data['checksum_type'] = data['checksum_type'] or ""
+ data['checksum-type'] = data['checksum-type'] or ""
data['checksum'] = data['checksum'] or ""
- if data['checksum_type'] == 'md5':
+ if data['checksum-type'] == 'md5':
# generate md5="..." attribute
# for compatibility with older satellites
data['md5'] = data['checksum']
Show replies by date