Re: Try to teach pkgorder to get its white out from an external file...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



crickets chirping...james

On 10/16/06, Oden, James <James.Oden@xxxxxxxxxxx> wrote:
Hi All,

I've trying to get pkgorder to be able to take its source of dep
whiteout from an external file.  This is needed so that I don't have to
patch whiteout.py evertime this needs to change.  Anyway, I tried the
following simple patch to no avail:

--- anaconda-10.1.1.37/scripts/pkgorder.delta   2006-10-16
13:39:39.000000000 -0500
+++ anaconda-10.1.1.37/scripts/pkgorder 2006-10-16 13:39:44.000000000
-0500
@@ -126,7 +126,13 @@
            line = "%s-%s-%s.%s.rpm\n" % (pkg['name'], pkg['version'],
                                          pkg['release'], pkg['arch'])
            ofile.write(line)
-
+
+def loadWhiteoutFromFile(whiteoutFilename):
+       print "Using whiteout file"
+       whiteoutFH = open(whiteoutFilename, 'r')
+       whiteout = whiteoutFH.read()
+       print whiteout
+       rpm.addMacro("_dependency_whiteout", whiteout)


 # set PKGORDER_DEBUG to get rpm debugging
@@ -150,6 +156,9 @@
    elif arg == "--product":
        productPath = sys.argv[n]
        n += 1
+    elif arg == "--whiteout":
+        loadWhiteoutFromFile(sys.argv[n])
+        n += 1
    else:
        args.append(arg)


I'm not very good with python, so I'm wondering if I'm doing something
kind of dumb?  Any ideas what might make this work?

Thanks...james

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list



[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux