Fwd: [PATCH]Add --cacheonly to livecd-create (and to olpc-os-builder)
jvonau at shaw.ca
Tue Jul 24 15:14:40 EDT 2012
On Tue, 2012-07-24 at 10:23 -0400, Martin Langhoff wrote:
> ---------- Forwarded message ----------
> From: Martin Langhoff <martin.langhoff at gmail.com>
> Date: Tue, Jul 24, 2012 at 10:09 AM
> Subject: [PATCH]Add --cacheonly to livecd-create (and to olpc-os-builder)
> To: livecd at lists.fedoraproject.org
> As part of adding --cacheonly to olpc-os-builder, which is largely
> based on imgcreate, I am adding --cacheonly to livecd-tools :-)
Been thinking of this for awhile now, before /intermediates/shared/ came
into use, but is not at the top of my list of things to do. Going to
need pass --cacheonly from OOB anyway to force the use of the cache
after the first pass of OOB, so why bother with the upstream patches.
You are more or less creating a local mirror of the remote repo but with
just the to be installed rpms present.
Think we can do that now with what is in imgcreate after the first pass
of OOB by passing a new global option use_cache= in OOB's .ini file to
repos.py. This new option could link new path to path then run
createrepo against path and change baseurl= to be file:///path for
each repo found by repos.py. This should keep yum's metadata straight
between the "main cache" in imgcreate when online and the offline "repo"
as the metadata would be updated before the repos are used.
1. build/intermediates/shared/repos/<repo used from repos.py>/packages
3. build/intermediates/shared/repos/<repo used from repos.py>/
What would be cool after this is working is to toggle
def build( clean_intermediates= ) to false in osbuilder.py and do the
cleanup based on "global use_cache=" in the modules that would be using
path. With a tweak of both nochroot.activities modules that could
skip the downloading/copying if use_cache= was set as path is already
populated, and wipe/recreate path if unset.
Sorry I haven't had the need to work this up, other priorities have come
first for me. Hope I've explained myself well enough for you to
understand my idea.
More information about the Devel