/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.) pykickstart-1.99.3-1.fc16.noarch yum-3.4.3-4.fc16.noarch python-imgcreate-16.4-1.fc16.x86_64
Proof of concept fix - entirely in python-imgcreate: --- kickstart.py 2011-09-01 13:39:52.486228328 +0200 +++ /usr/lib/python2.7/site-packages/imgcreate/kickstart.py @@ -511,7 +511,7 @@ if repos.has_key(repo.name): 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) return repos.values() --- creator.py 2011-09-01 13:32:40.030261984 +0200 +++ /usr/lib/python2.7/site-packages/imgcreate/creator.py @@ -612,7 +612,7 @@ ayum.setup(yum_conf, self._instroot) 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) if inc: @@ -621,6 +621,8 @@ yr.exclude = exc if proxy: yr.proxy = proxy + if not cost is None: + yr.cost = cost if kickstart.exclude_docs(self.ks): rpm.addMacro("_excludedocs", "1")
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. https://admin.fedoraproject.org/updates/livecd-tools-16.12-1.fc16
livecd-tools-17.8-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/livecd-tools-17.8-1.fc17
Package livecd-tools-16.12-1.fc16: * 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: https://admin.fedoraproject.org/updates/FEDORA-2012-6062/livecd-tools-16.12-1.fc16 then log in and leave karma (feedback).
livecd-tools-17.9-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/livecd-tools-17.9-1.fc17
livecd-tools-16.13-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/livecd-tools-16.13-1.fc16
livecd-tools-17.10-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/livecd-tools-17.10-1.fc17
livecd-tools-16.15-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/livecd-tools-16.15-1.fc16
livecd-tools-17.11-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/livecd-tools-17.11-1.fc17
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.