Ok just to repost - here's the current delta to livecd-creator that I can't
live without.

The first part is answering "Why is my network pegged?" (though does anyone
know if there's a nice way to use something like Wireshark to get this
info?)

The second is defaulting to a persistent cache for downloads.  This is not
protected against concurrent execution - should we go ahead and add a
--nocache option for those people who have a local fedora mirror?


Finally one random tip unrelated to this mail: use "ionice -c3
livecd-creator [OPTIONS]" if you're actually trying to use your laptop at
the same time yum is making your CD.  I wonder if it would make sense to
just do this by default in yum?
commit 6d4a897b468067cd93b2e185720e465a39c3bb8a
Author: Colin Walters <[EMAIL PROTECTED]>
Date:   Fri Aug 24 17:37:17 2007 -0400

    add download info, global yum cache

diff --git a/creator/livecd-creator b/creator/livecd-creator
index 0d18896..4bf69e9 100755
--- a/creator/livecd-creator
+++ b/creator/livecd-creator
@@ -203,6 +203,15 @@ class LiveCDParser(pykickstart.parser.KickstartParser):
         self.currentdir[self._includeDepth] = cd
         return pykickstart.parser.KickstartParser.readKickstart(self, file, reset)
 
+class TextProgress(object):
+    def start(self, filename, url, *args, **kwargs):
+        print "Retrieving %s" % (url,)
+        self.url = url
+    def update(self, *args):
+        pass
+    def end(self, *args):
+        print "Retrieved %s OK" % (self.url,)
+
 class LiveCDYum(yum.YumBase):
     def __init__(self):
         yum.YumBase.__init__(self)
@@ -217,6 +226,7 @@ class LiveCDYum(yum.YumBase):
         conf += "installroot=%s\n" % installroot
         conf += "cachedir=/var/cache/yum\n"
         conf += "plugins=0\n"
+        conf += "debuglevel=2\n"
         conf += "reposdir=\n"
 
         path = datadir + "/yum.conf"
@@ -288,6 +298,7 @@ class LiveCDYum(yum.YumBase):
         repo.gpgcheck = 0
         repo.enable()
         repo.setup(0)
+        repo.setCallback(TextProgress())
         self.repos.add(repo)
             
     def runInstall(self):
@@ -430,7 +441,10 @@ class ImageCreator(object):
         os.makedirs(self.build_dir + "/out/sysroot")
         os.makedirs(self.build_dir + "/data/sysroot")
         os.makedirs(self.build_dir + "/install_root")
-        os.makedirs(self.build_dir + "/yum-cache")
+        try:
+            os.makedirs("/var/cache/livecd/yum-cache")
+        except OSError, e:
+            pass
 
         if base_on:
             # get backing ext3 image if we're based this build on an existing live CD ISO
@@ -463,7 +477,7 @@ class ImageCreator(object):
         # bind mount system directories into install_root/
         for (f, dest) in [("/sys", None), ("/proc", None), ("/dev", None),
                           ("/dev/pts", None), ("/selinux", None),
-                          (self.build_dir + "/yum-cache", "/var/cache/yum")]:
+                          ("/var/cache/livecd/yum-cache", "/var/cache/yum")]:
             self.bindmounts.append(BindChrootMount(f, self.build_dir + "/install_root", dest))
 
         for b in self.bindmounts:
--
Fedora-livecd-list mailing list
Fedora-livecd-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-livecd-list

Reply via email to