<div dir="ltr">Alex,<div><br></div><div>Using the api in a python script is probably the best way to do this. I set up a cron job to merge packages.</div><div><br></div><div>I simply create two arrays, one for source channels and one for destination channels like so:</div>
<div><br></div><div><br></div><div><div>## Source and Destination Channels. All items must be positioned identically in the corresponding lists!</div><div>src_channels = ['rhel-x86_64-server-6-base', 'rhel-x86_64-server-6-base-epel', 'rhel-x86_64-server-6-base-hpsa', 'rhel-x86_64-server-6-base-optional', 'rhel-x86_64-server-6-base-puppet-dependencies', 'rhel-x86_64-server-6-base-puppet-product', 'rhel-x86_64-server-6-base-spacewalk-client', 'rhel-x86_64-server-6-base-thd-tools', 'rhel-x86_64-server-6-base-tools', 'rhel-x86_64-server-6-base-updates']</div>
<div>dst_channels = ['rhel-x86_64-server-6-stores', 'rhel-x86_64-server-6-stores-epel', 'rhel-x86_64-server-6-stores-hpsa', 'rhel-x86_64-server-6-stores-optional', 'rhel-x86_64-server-6-stores-puppet-dependencies', 'rhel-x86_64-server-6-stores-puppet-product', 'rhel-x86_64-server-6-stores-spacewalk-client', 'rhel-x86_64-server-6-stores-thd-tools', 'rhel-x86_64-server-6-stores-tools', 'rhel-x86_64-server-6-stores-updates']</div>
<div><br></div><div>print "Merging selected channels!"<br></div><div><br></div><div>client.channel.software.mergePackages(key, src_channels[0], dst_channels[0])</div><div>client.channel.software.mergePackages(key, src_channels[1], dst_channels[1])</div>
<div>client.channel.software.mergePackages(key, src_channels[2], dst_channels[2])</div><div>client.channel.software.mergePackages(key, src_channels[3], dst_channels[3])</div><div>client.channel.software.mergePackages(key, src_channels[4], dst_channels[4])</div>
<div>client.channel.software.mergePackages(key, src_channels[5], dst_channels[5])</div><div>client.channel.software.mergePackages(key, src_channels[6], dst_channels[6])</div><div>client.channel.software.mergePackages(key, src_channels[7], dst_channels[7])</div>
<div>client.channel.software.mergePackages(key, src_channels[8], dst_channels[8])</div><div>client.channel.software.mergePackages(key, src_channels[9], dst_channels[9])</div><div><br></div><div>print "All channels have been synchronized!"</div>
<div><br></div><div>client.auth.logout(key)</div></div><div><br></div><div><br></div><div>I'm no expert on python, so I'm sure there's a more pythonic way to do this, but it works. </div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Jul 18, 2014 at 7:50 AM, Alexander Dacre <span dir="ltr"><<a href="mailto:alex.dacre@aridhia.com" target="_blank">alex.dacre@aridhia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Firstly, apologies if this appears as a duplicate post - first mailing list.<br>
<br>
The spacewalk-clone-by data command seems great, but it only seems to do packages with errata?<br>
<br>
If I was to just keep channels in sync from a package point of view and ignore errata, what would be the best way? I'm currently using the spacewalk-api and channel.software.mergePackages.<br>
<br>
Thanks,<br>
Alex<br>
<br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</blockquote></div><br></div>