Bug 679109

Summary: repo-sync trips over broken packages
Product: [Community] Spacewalk Reporter: Gerald Gruenberger <gerald.gruenberger>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.3CC: gerald.gruenberger, slukasik
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-26 09:10:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 674675    

Description Gerald Gruenberger 2011-02-21 16:03:43 UTC
Description of problem:

spacewalk-repo-sync trips over broken packages

Version-Release number of selected component (if applicable): 
spacewalk-backend-tools-1.3.57-1.el5


How reproducible:


Steps to Reproduce:
1. /usr/bin/spacewalk-repo-sync --channel 'rpmforge_centos5_i386' --url 'http://apt.sw.be/redhat/el5/en/i386/rpmforge/' --type 'yum'
  

Actual results:

Repo http://apt.sw.be/redhat/el5/en/i386/rpmforge/ has 10567 packages.
1/10220 : blobwars-1.07-1.el5.rf-0.i386
error: rpmts_HdrFromFdno: MD5 digest: BAD Expected(d89999554a6046d7c9842d6fbe32e5a7) != (1a6542ee1f2e66a0c307ed2eefe83f84)
(50, 'Unable to load package', 'Invalid information uploaded to the server')
Traceback (most recent call last):
  File "/usr/bin/spacewalk-repo-sync", line 69, in ?
    sys.exit(abs(main() or 0))
  File "/usr/bin/spacewalk-repo-sync", line 63, in main
    sync.main()
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/reposync.py", line 103, in main
    self.import_packages(plugin, url)
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/reposync.py", line 191, in import_packages
    finally_remove(localpath)
UnboundLocalError: local variable 'localpath' referenced before assignment

reposync stops

Expected results:

a synchronized channel (reposync should skip over the broken package, mark it
as broken)


Additional info:

This is another version of closed bug 582203.

Comment 2 Michael Mráka 2011-03-03 15:31:59 UTC
Fixed in spacewalk master by 
commit c80b2410a4f16f304cbe599f1872fb4c0963d76f
    679109 - localpath must be defined in except block

Comment 3 Miroslav Suchý 2011-04-11 07:45:07 UTC
Mass moving to ON_QA before release of Spacewalk 1.4

Comment 4 Miroslav Suchý 2011-04-26 09:10:34 UTC
Spacewalk 1.4 has been released