/usr/share/doc/pykickstart-1.99.3/kickstart-docs.txt and http://fedoraproject.org/wiki/Anaconda/Kickstart describes the repo --cost option.
Building a live image with a kickstart where all repos have a cost specified as
repo --cost=1 --name=xx --baseurl=file:///home/xxx
do however not work.
Instrumenting /usr/lib/python2.7/site-packages/yum/yumRepo.py __cmp__ in line 289 so it prints the .cost's shows that the repos always has the default value of 1000.
(It also shows that the repos are compared a huge number of times. I wonder if that is intentional and optimal.)
Proof of concept fix - entirely in python-imgcreate:
--- kickstart.py 2011-09-01 13:39:52.486228328 +0200
@@ -511,7 +511,7 @@
logging.warn("Overriding already specified repo %s" %(repo.name,))
- repos[repo.name] = (repo.name, baseurl, mirrorlist, proxy, inc, exc)
+ repos[repo.name] = (repo.name, baseurl, mirrorlist, proxy, inc, exc, repo.cost)
--- creator.py 2011-09-01 13:32:40.030261984 +0200
@@ -612,7 +612,7 @@
for repo in kickstart.get_repos(self.ks, repo_urls):
- (name, baseurl, mirrorlist, proxy, inc, exc) = repo
+ (name, baseurl, mirrorlist, proxy, inc, exc, cost) = repo
yr = ayum.addRepository(name, baseurl, mirrorlist)
@@ -621,6 +621,8 @@
yr.exclude = exc
yr.proxy = proxy
+ if not cost is None:
+ yr.cost = cost
Is this also a problem with anaconda? Or just livecd's?
I don't know. I "never" use anaconda with package installation - I "always" install by letting anaconda resize a live image.
A quick greb for \.cost in /usr/lib/python2.7/site-packages/pyanaconda/yuminstall.py indicates that it do have the right plumbing in place.
(It do however seem like repos with cost 0 will cause problems - even though that would be the most obvious cost to assign to a local file:// repo ...)
livecd-tools-16.12-1.fc16 has been submitted as an update for Fedora 16.
livecd-tools-17.8-1.fc17 has been submitted as an update for Fedora 17.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing livecd-tools-16.12-1.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
livecd-tools-17.9-1.fc17 has been submitted as an update for Fedora 17.
livecd-tools-16.13-1.fc16 has been submitted as an update for Fedora 16.
livecd-tools-17.10-1.fc17 has been submitted as an update for Fedora 17.
livecd-tools-16.15-1.fc16 has been submitted as an update for Fedora 16.
livecd-tools-17.11-1.fc17 has been submitted as an update for Fedora 17.
livecd-tools-17.11-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.