backend/server/importlib/channelImport.py | 11 ++++++++---
backend/spacewalk/common/fileutils.py | 3 ++-
2 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 4e0730d2e480746140dc5461ce7dc74027b4f3aa
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jan 21 13:07:00 2010 +0100
fixed bug from popen2 -> subprocess migration
subprocess.poll() doesn't return status but set subprocess.returnvalue
diff --git a/backend/spacewalk/common/fileutils.py
b/backend/spacewalk/common/fileutils.py
index dc7e8e9..a4896c8 100644
--- a/backend/spacewalk/common/fileutils.py
+++ b/backend/spacewalk/common/fileutils.py
@@ -226,7 +226,8 @@ def rhn_popen(cmd, progressCallback=None, bufferSize=16384,
outputLog=None):
while 1:
# Is the child process done?
- status = c.poll()
+ c.poll()
+ status = c.returncode
if status != -1:
if os.WIFEXITED(status):
# Save the exit code, we still have to read from the pipes
commit 941003bd8909e53bfeb6d0a3c2dd6a0ef8bd401c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jan 21 12:27:26 2010 +0100
checksum_type may not exist (for rhel < 5 channels)
diff --git a/backend/server/importlib/channelImport.py
b/backend/server/importlib/channelImport.py
index 009a2d6..4802b6b 100644
--- a/backend/server/importlib/channelImport.py
+++ b/backend/server/importlib/channelImport.py
@@ -63,7 +63,8 @@ class ChannelImport(Import):
or (channel['parent_channel']
and RHEL5_REGEXP.match(channel['parent_channel'])))):
channel['checksum_type'] = 'sha1'
- if channel['checksum_type'] not in self.checksum_types:
+ if (channel['checksum_type']
+ and channel['checksum_type'] not in self.checksum_types):
self.checksum_types[channel['checksum_type']] = None
# bug #528227
@@ -95,7 +96,10 @@ class ChannelImport(Import):
channel.ignored = 1
raise InvalidArchError(arch, "Unsupported channel arch %s" % arch)
channel['channel_arch_id'] = self.arches[arch]
- channel['checksum_type_id'] =
self.checksum_types[channel['checksum_type']]
+ if channel['checksum_type']:
+ channel['checksum_type_id'] =
self.checksum_types[channel['checksum_type']]
+ else:
+ channel['checksum_type_id'] = None
if channel.has_key('product_name'):
channel['product_name_id'] = self.backend.lookupProductNames(
commit af4597fb48d313facd16ae08621236974f3980e9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jan 21 12:23:16 2010 +0100
check parent_channel label only if exists
fixed
...
File "/usr/share/rhn/server/importlib/channelImport.py", line 61, in
__processChannel
if (not channel['checksum_type']
TypeError: expected string or buffer
diff --git a/backend/server/importlib/channelImport.py
b/backend/server/importlib/channelImport.py
index 37b6882..009a2d6 100644
--- a/backend/server/importlib/channelImport.py
+++ b/backend/server/importlib/channelImport.py
@@ -60,7 +60,8 @@ class ChannelImport(Import):
# Yum repo checksum type
if (not channel['checksum_type']
and (RHEL5_REGEXP.match(channel['label'])
- or RHEL5_REGEXP.match(channel['parent_channel']))):
+ or (channel['parent_channel']
+ and RHEL5_REGEXP.match(channel['parent_channel'])))):
channel['checksum_type'] = 'sha1'
if channel['checksum_type'] not in self.checksum_types:
self.checksum_types[channel['checksum_type']] = None
Show replies by date