Remove dead code from portage.digestParseFile().
authorZac Medico <zmedico@gentoo.org>
Sun, 9 Apr 2006 09:10:03 +0000 (09:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 9 Apr 2006 09:10:03 +0000 (09:10 -0000)
svn path=/main/trunk/; revision=3107

pym/portage.py

index 5b2c278f40d4dfae61665569b1431e8e169f10a3..66cbb6678443817473a5f262d2d45e4b8b00f3ea 100644 (file)
@@ -2113,36 +2113,6 @@ def digestParseFile(myfilename,mysettings=None,db=None):
        mf = Manifest(pkgdir, db, mysettings)
 
        return mf.getDigests()
-       
-       #########################################
-       # Old code that's replaced by the above #
-       #########################################
-
-       if not os.path.exists(myfilename):
-               return None
-       mylines = portage_util.grabfile(myfilename, compat_level=1)
-
-       mydigests={}
-       for x in mylines:
-               myline=string.split(x)
-               if len(myline) < 4:
-                       #invalid line
-                       continue
-               if myline[0] not in portage_checksum.get_valid_checksum_keys():
-                       continue
-               mykey  = myline.pop(0)
-               myhash = myline.pop(0)
-               mysize = long(myline.pop())
-               myfn   = string.join(myline, " ")
-               if myfn not in mydigests:
-                       mydigests[myfn] = {}
-               mydigests[myfn][mykey] = myhash
-               if "size" in mydigests[myfn]:
-                       if mydigests[myfn]["size"] != mysize:
-                               raise portage_exception.DigestException, "Conflicting sizes in digest: %(filename)s" % {"filename":myfilename}
-               else:
-                       mydigests[myfn]["size"] = mysize
-       return mydigests
 
 # XXXX strict was added here to fix a missing name error.
 # XXXX It's used below, but we're not paying attention to how we get it?