kadischi/livecd_generator kadischi.py,1.43,1.44

Jasper O'neal Hartline (autopsy) fedora-extras-commits at redhat.com
Sat Sep 2 22:38:28 UTC 2006


Author: autopsy

Update of /cvs/devel/kadischi/livecd_generator
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6160/kadischi/livecd_generator

Modified Files:
	kadischi.py 
Log Message:
Determine if it is a LiveCD or LiveDVD based on size, various minor tweaks.


Index: kadischi.py
===================================================================
RCS file: /cvs/devel/kadischi/livecd_generator/kadischi.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- kadischi.py	2 Sep 2006 05:09:52 -0000	1.43
+++ kadischi.py	2 Sep 2006 22:38:26 -0000	1.44
@@ -15,6 +15,7 @@
 
 # variables related to building the image
 myname = "Kadischi Contributor"
+media = ""
 
 # Check for known postscriptdirs and set it accordingly.
 if os.path.isdir("/usr/local/share/kadischi/post_install_scripts"):
@@ -93,8 +94,8 @@
     else:
         f = open(buildstamp, "r")
         lines = f.readlines()
-        distname = lines[1][:-3]
-        distver = lines[2][:-2]
+        distname = lines[1][:-1]
+        distver = lines[2][:-1]
         f.close()
         dist = string.join([distname, distver], " ")
 
@@ -167,9 +168,13 @@
         if (totalsize > 1600000000):
             estimate0 = (totalsize / 2.3) ## Observed ratio for SquashFS
             estimate1 = (totalsize / 2.5) ## Observed ratio for SquashFS
+            media = "(LiveDVD)"
+            dist = string.join([dist, media], " ")
         else:
             estimate0 = (totalsize / 2.4) ## Observed ratio for SquashFS
             estimate1 = (totalsize / 2.6) ## Observed ratio for SquashFS
+            media = "(LiveCD)"
+            dist = string.join([dist, media], " ")
 
         print ("[kadischi]: estimated %s size is between %s and %s bytes" % (isoimage, estimate1, estimate0))
 




More information about the scm-commits mailing list