[Spacewalk-list] Packages associated with wrong channel

Sander Grendelman sander at grendelman.com
Wed Apr 6 10:54:38 UTC 2011


On Mon, Apr 04, 2011 at 02:18:42PM -0600, Jason M. Nielsen wrote:
>
> After a long time of poking around I noticed a pattern and it appears to  
> be related to errata that were submitted into spacewalk. The script I  
> use is not capable of supplying a channel name so it is submitted to all  
> channels. I presumed that even with the errata in all channels it would  
> still only be the errata and only apply if the rpm existed in the  
> channel. Actually it would seem by pushing the errata to all channels it  
> results in those rpms becoming associated with the channel with one  
> exception. Architecture is held correctly. That is, Im not seeing x8664  
> rpms associated with i386 channels.
>
> I realize that if this is what caused the problem then its the b0rked  
> script but what Im wondering is does Spacewalk automatically associate  
> an rpm with a channel just because errata for the rpm has been submitted  
> to that channel?
>
> It seems to me that packages should only be associated to a channel by  
> an explicit push of some sort (in my case rhnpush) and no other reason.  
> It could be the script itself did this as one section looks like it very  
> well might be pushing packages and not just errata. Im completely  
> unfamiliar with the api though.

I've also run into this problem, it seems that publishing an erratum
to multiple channels can cause associated packages to be pushed to some
of those channels too. This can also cause centos5-packages to appear in
centos4 channels :(. A workaround is to publish the erratum without
associated packages and associating packages afterwards.

In my opinion this is a bug, I don't know if there is already a bugzilla
report for this one?

>
> I tried disassociating the errata with the channels but the rpm still  
> shows up in the package list. Its looking like the only method to  
> reliably clean this up will be start from scratch. Maybe I can just wipe  
> the rhel4 channels.
>
> If it was not the script and related to the errata then Im baffled as to  
> what caused this.

It is very probable that this was caused by the script, deleting the 
packages should also work. You can probably search for packages with
"el5" in their name through the api and delete the resulting packages
from your rhel4 channels.

>
> This is the script I used (get_errata.pl):
> http://sourceforge.net/projects/rhn2spacewalk/files/

I don't see an errata-publishing step in this script but I do see that
errata are created with their relevant packages attached.

What works for me when publishing an erratum through the api is:

1) Create erratum _without packages_.
2) Publish erratum to the relevant channels.
3) Add packages to the erratum.

This way no packages are pushed to the wrong channel. An extra benefit
is that publishing the erratum without packages is a lot quicker.




More information about the Spacewalk-list mailing list