Issue350

Project smart
Title [PLUGIN] Sync Yum channels
Priority feature Status resolved
Superseder Nosy List netmask, niemeyer, rasker
Assigned To rasker Topics

Created on 2007-12-27.17:40:54 by netmask, last changed 2008-07-03.07:53:49 by rasker.

Files
File name Uploaded Type Edit Remove
test_yumchannelsync.py netmask, 2008-01-14.20:32:17 text/x-python
yumchannelsync.py netmask, 2008-02-03.17:46:14 application/octet-stream
yumsync.tar.gz netmask, 2007-12-27.17:40:49 application/x-gzip
Messages
msg1476 (view) Author: rasker Date: 2008-07-03.07:53:49
Exported:  https://bugs.launchpad.net/smart/+bug/245109

Reason: Review Patch. Let's clean up the points I made and start bringing this
into the main branch.

further details:
https://blueprints.launchpad.net/smart/+spec/bug-reporting-migration
msg1338 (view) Author: rasker Date: 2008-06-23.18:25:16
Thanks for this plugin. I have got it working on f8 using the latest smart 
from svn.

I had to comment line 114 (baseurl = baseurl.splitlines()[1]) to get it to 
work without throwing an exception. (thanks afb on #smart!)

The second issue is that for each mirror it pulls in all the files. So for a 
single baseurl you might get copies of the same data over and over again. I 
guess there might be two solutions to this: delete the metadata files but keep 
the repomd file for each mirror after the data has been imported (reducing the 
storage overhead) or use the same file names for each baseurl. Just ideas. The 
first idea might be better anyway because that would work for all smart rpm 
repos.

Also if it goes to a different url for a mirror it will download the files 
again even if it hasn't changed (although i am not sure it does this every 
time but a lot of times i see this)

Livna.repo has an odd baseurl config. the line starts baseurl = (baseurl) then 
they have another baseurl on the next line and so forth for each of thier 
mirrors. Each of these is actually a mirror but it breaks the yumsync import.

The last thing is that the mirrors are imported before whatever pulls in the 
normal smart import (e.g. from /etc/smart/channels) and if your distro has 
installed soem config there it will import multiple channels which are 
basically duplicates.

cheers

btw this should go in the distribution somehow!! It is very helpful
msg1302 (view) Author: netmask Date: 2008-02-03.17:46:14
This new modification supports usage of 'mirrorlist' tags.
msg1283 (view) Author: netmask Date: 2008-01-14.20:32:17
The test set was wrong. Here goes the fixed version.
msg1264 (view) Author: netmask Date: 2007-12-27.17:40:49
Hello Gustavo,

I'm sending two files that compose a new plugin that will sync Yum channel files
with Smart. This has been coded against SVN revision 899, and tested on RHEL5
and Fedora 8.

There is the plugin file itself, and the test set, as requested. My problem is:
I don't know how to run the test. :)

Please, review the proposed plugin, and let me know. Thank you!
History
Date User Action Args
2008-07-03 07:53:50raskersetstatus: chatting -> resolved
assignedto: niemeyer -> rasker
messages: + msg1476
2008-06-23 18:25:17raskersetnosy: + rasker
messages: + msg1338
2008-02-03 17:46:15netmasksetfiles: + yumchannelsync.py
messages: + msg1302
2008-01-14 20:32:22netmasksetfiles: + test_yumchannelsync.py
status: unread -> chatting
messages: + msg1283
2007-12-27 17:40:57netmaskcreate