[Spacewalk-list] Script to cleanup obsolete packages in channels

pradelles nicolas npradelles at eutelsat.fr
Mon Aug 27 15:33:20 UTC 2012


Hi,
You will find attached a new version of this script rewritten in python.
The new script is dramatically faster and don't have little glitches
with channels and packages names.
You have to modify lines 33 to 36 to comply with your spacewalk
configuration.

Maybe in a future version I would add input arguments and exception
catchers ... but it will in the future ;)


Regards,
Nicolas

-----Original Message-----
From: spacewalk-list-bounces at redhat.com
[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Trent Johnson
Sent: 23 avril 2012 18:45
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] Script to cleanup obsolete packages in
channels

Thanks Mike - I started running it yesterday on a two year old 
installation - it's still going, but a lot of cruft has been removed.

I had to make a channel called "aaaaaa" otherwise it skips the first 
channel.

Thanks,
Trent


sent from a mobile device

On 04/17/2012 05:47 PM, Michael Cronenworth wrote:
> On 04/17/2012 04:24 AM, pradelles nicolas wrote:
>> Please find attached a little script who cleanup obsolete and unused
>> packages in all channels on a spacewalk server. It is a very
preliminary
>> version, so be indulgent;)
>>
>> You have to modify lines 26-29 to comply with your spacewalk
>> configuration.	
>
> Thanks for this. I needed it already on my first spacewalk install
when
> I messed up my channel layout. Apparently a repo sync doesn't work if
> the packages already exist on the file system. After setting up a
> channel, adding a repo, and syncing, I had packages in my channel.
> However, I had to delete the channel and set it up again. When I hit
> "Sync" my package count stayed at 0. I ran your script and ran "Sync"
> again and I had packages in my channel again. 


This message may contain confidential or privileged information and is 
intended only for the personal and confidential use of the designated
recipient(s) named above. If you are not one of the intended recipients 
of this message you are hereby notified that any review, dissemination, 
distribution or copying is strictly prohibited. 
This communication is for information purposes only and should not be 
regarded as an official statement of Eutelsat S.A. or any of its 
subsidiaries. E-mail transmission cannot be guaranteed to be secure or 
error-free. Therefore, Eutelsat S.A. does not claim that this information
is complete or accurate and it should not be treated as such. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: swalk-clean-old-packages.py
Type: application/octet-stream
Size: 3382 bytes
Desc: swalk-clean-old-packages.py
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20120827/8f06a00c/attachment.obj>


More information about the Spacewalk-list mailing list