<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Hi, everyone.<BR>
 <BR>
This pungi's patch is able to create easily CD/DVD that inclde update RPM packages (exclude old PRM packages automatically).<BR>
Apply a patch and add line below to yum.conf.f7.i386 .<BR>
#-------------------------<BR>
exclude=*debuginfo*<BR>
<BR>[fedorai-update]<BR>name=Fedora 7 - update<BR>baseurl=http://[mirror site URL]/fedora/updates/7/i386/<BR>enabled=1<BR>gpgcheck=0<BR>
#-------------------------<BR>
 <BR>
Example of execution.<BR>
#pungi -c /etc/pungi/f7-fedora.i386<BR>
 <BR>
We can create a DVD that use a new kernel package and update packages.<BR>
And to rebuilt anaconda installer that use a new kernel.<BR>
 <BR>
Have a nice day!<BR>
Best regards.<BR>
 <BR>
 <BR>
 <BR>
--- /usr/lib/python2.5/site-packages/pypungi/gather.py 2007-05-26 07:15:48.000000000 +0900<BR>+++ /usr/lib/python2.5/site-packages/pypungi/gather.py.new 2007-06-16 07:14:07.000000000 +0900<BR>@@ -387,3 +387,54 @@<BR>                 shutil.copy2(path, local)<BR> <BR>             os.link(local, os.path.join(pkgdir, os.path.basename(remote)))<BR>+<BR>+<BR>+    # Add removeOldPackages 20070616 Pochi_ken <<A href="mailto:pochi_ken@hotmail.com">pochi_ken@hotmail.com</A>><BR>+    def removeOldPackages(self):<BR>+        """Cycle through the check of rpms and<BR>+           update the package objects and delete the old package objects."""<BR>+<BR>+        pkgdir = os.path.join!
 (self.config.get('default', 'destdir'),<BR>+                              self.config.get('default', 'version'), <BR>+                              self.config.get('default', 'flavor'), <BR>+                              self.config.get('default', 'arch'), <BR>+                              self.config.get('default', 'osdir'),<BR>+            &nb!
 sp;         &nbsp!
 ; &
nbsp;     self.config.get('default', 'product_path'))<BR>+        local = self.config.get('default','cachedir') + '/'<BR>+        localfiles = os.listdir(local)<BR>+        trot = yum.rpmUtils.transaction.initReadOnlyTransaction()<BR>+        rpmlst = []<BR>+        for filename in localfiles:<BR>+            rpmfile = local + filename<BR>+            try:<BR>+                hdr = yum.rpmUtils.miscutils.hdrFromPackage(trot, rpmfile)<BR>+                rpmlst.append((rpmfile, hdr))<BR>+       !
          self.logger.info("Reading header info from %s" % rpmfile)<BR>+            except:<BR>+                self.logger.info("Could not read header info in %s" % rpmfile)<BR>+        rpmlst.sort()<BR>+        c = 0<BR>+        oldrpmlst = []<BR>+        while (c < (len(rpmlst)-1)):<BR>+            i = 1<BR>+            while (i < 5):<BR>+                cRPMpkg = yum.rpmUtils.miscutils.pkgTupleFromHeader(rpmlst[c][1])<BR>+         &nbs!
 p;      nRPMpkg = yum.rpmUtils.miscut!
 ils.pkgT
upleFromHeader(rpmlst[c+i][1])<BR>+                if (cRPMpkg[0] == nRPMpkg[0]) and (cRPMpkg[1] == nRPMpkg[1]):<BR>+                    cRPMEVR = cRPMpkg[2:]<BR>+                    nRPMEVR = nRPMpkg[2:]<BR>+                    if yum.rpmUtils.miscutils.compareEVR(nRPMEVR, cRPMEVR) == 1:<BR>+                        oldrpmlst.append(rpmlst[c][0])<BR>+                    else:<BR>+      !
                   oldrpmlst.append(rpmlst[c+i][0])<BR>+                        rpmlst.pop(c+i)<BR>+                        c = c-1<BR>+                i = i+1<BR>+                if ((c+i) > (len(rpmlst)-1)):<BR>+                    i = 5<BR>+            c = c+1<BR>+        for filename in oldrpmlst:<BR>+    &nbsp!
 ;       self.logger.info("Old pa!
 ckage %s
 is removed." % filename)<BR>+            os.remove(filename)<BR>+            os.remove(os.path.join(pkgdir, os.path.basename(filename)))<BR>+    # END removeOldPackage<BR>--- /usr/bin/pungi 2007-05-31 01:30:29.000000000 +0900<BR>+++ /usr/bin/pungi.new 2007-06-13 22:21:15.000000000 +0900<BR>@@ -101,13 +101,17 @@<BR> <BR>     # Actually do work.<BR>     if not config.get('default', 'arch') == 'source':<BR>+        mygather = pypungi.gather.Gather(config, pkglist)<BR>         if opts.do_all or opts.do_gather:<BR>-            mygather = pypungi.gather.Gather(config, pkglist)<BR>             mygather.getPackageObjec!
 ts()<BR>             mygather.downloadPackages()<BR>-            if config.getboolean('default', 'getsource'):<BR>-                mygather.getSRPMList()<BR>-                mygather.downloadSRPMs()<BR>+<BR>+        if opts.do_all or opts.do_remove:<BR>+            mygather.removeOldPackages()<BR>+<BR>+        if config.getboolean('default', 'getsource'):<BR>+            mygather.getSRPMList()<BR>+            mygather.downloadSRPMs()<BR> <BR>      &!
 nbsp;  mypungi = pypungi.pungi.Pungi(config)<BR> <BR!
 >@@ -153
,6 +157,8 @@<BR>           help="Enable ALL stages")<BR>         parser.add_option("-G", action="store_true", default=False, dest="do_gather",<BR>           help="Flag to enable processing the Gather stage")<BR>+        parser.add_option("-R", action="store_true", default=False, dest="do_remove",<BR>+          help="Flag to enable processing the Remove stage")<BR>         parser.add_option("-B", action="store_true", default=False, dest="do_buildinstall",<BR>           help="Flag to enable processing the BuildInstall stage")<BR>         parser.add_option("-P", action="store_true", default=False, dest="do_packageorder",<BR>@@ -164,7 !
 +170,7 @@<BR> <BR> <BR>         (opts, args) = parser.parse_args()<BR>-        if opts.do_gather or opts.do_buildinstall or opts.do_packageorder or opts.do_splittree or opts.do_createiso:<BR>+        if opts.do_gather or opts.do_remove or opts.do_buildinstall or opts.do_packageorder or opts.do_splittree or opts.do_createiso:<BR>             opts.do_all = False<BR>         if len(sys.argv) < 2:<BR>             parser.print_help()<BR><BR><br /><hr />Windows Vista $B$D$$$KH/Gd!*(B <a href='http://clk.atdmt.com/GBL/go/msnjpjhm0110000002gbl/direct/01/' target='_new'>$B$5$i$K>\$7$/(B</a></body>
</html>