[Spacewalk-list] Reposync problem

Paul paul4352 at yahoo.co.uk
Sun Jan 3 23:01:56 UTC 2010


Hi,

I'm having trouble with Spacewalk 0.7. For some reason when I add a new 
channel (for CentOS5.4 64 bit) with a yum repository it is unable to 
download and sync the packages. When I run spacewalk-repo-sync manually 
I can see it going through each package. I see the package downloaded 
into the repo cache, but the package never makes it under 
/var/satellite/redhat/1.

After a lot of digging, I've discovered that in the below section of 
reposync.py the pid value is not 'None' and so the self.upload_package 
call is never performed. I have now hacked this in my version to ensure 
the packages are properly downloaded as a temporary measure.

reposync.py:
>         for (index, pack) in enumerate(to_download):
>             """download each package"""
>             try:
>                 self.print_msg(str(index+1) + "/" + 
> str(len(to_download)) + " : "+ \
>                       pack.getNVREA())
>                 path = self.plugin.get_package(pack)
>                 md5 = rhnLib.getFileMD5(filename=path)
>                 pid =  rhnPackage.get_package_for_md5sum(
>                                   self.channel['org_id'], md5)
>                 if pid is None:
>                      self.upload_package(pack, path)

However, how do I do things the correct way? What is the reason for the 
get_package_for_md5sum call and how do I get it to return 'None' so the 
package is stored? I've checked the various documentation on the site 
and I can't see that I've missed anything.

cheers

Paul




More information about the Spacewalk-list mailing list