public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13983 - main/trunk/bin
@ 2009-08-10 22:11 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-10 22:11 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-08-10 22:11:57 +0000 (Mon, 10 Aug 2009)
New Revision: 13983

Removed:
   main/trunk/bin/md5check.py
Log:
This script is obsolete since manifest 2.


Deleted: main/trunk/bin/md5check.py
===================================================================
--- main/trunk/bin/md5check.py	2009-08-10 22:05:36 UTC (rev 13982)
+++ main/trunk/bin/md5check.py	2009-08-10 22:11:57 UTC (rev 13983)
@@ -1,100 +0,0 @@
-#!/usr/bin/python -O
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-import os,sys
-os.environ["FEATURES"]="mirror cvs"
-try:
-	import portage
-except ImportError:
-	from os import path as osp
-	sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
-	import portage
-import portage.util
-
-def cstrip(mystr,mychars):
-	newstr = ""
-	for x in mystr:
-		if x not in mychars:
-			newstr += x
-	return newstr
-
-md5_list = {}
-bn_list  = []
-col_list = []
-
-hugelist = []
-for mycp in portage.db["/"]["porttree"].dbapi.cp_all():
-	hugelist += portage.db["/"]["porttree"].dbapi.cp_list(mycp)
-hugelist.sort()
-
-for mycpv in hugelist:
-	pv = mycpv.split("/")[-1]
-
-	newuri = portage.db["/"]["porttree"].dbapi.aux_get(mycpv,["SRC_URI"])[0]
-	newuri = newuri.split()
-
-	digestpath = portage.db["/"]["porttree"].dbapi.findname(mycpv)
-	digestpath = os.path.dirname(digestpath)+"/files/digest-"+pv
-	md5sums    = portage.digestParseFile(digestpath)
-	
-	if md5sums == None:
-		portage.writemsg("Missing digest: %s\n" % mycpv)
-		md5sums = {}
-
-	for x in md5sums.keys():
-		if x[0] == '/':
-			del md5sums[x]
-
-	#portage.writemsg("\n\ndigestpath: %s\n" % digestpath)
-	#portage.writemsg("md5sums: %s\n" % md5sums)
-	#portage.writemsg("newuri: %s\n" % newuri)
-
-	bn_list = []
-	for x in newuri:
-		if not x:
-			continue
-		if (x in [")","(",":","||"]) or (x[-1] == "?"):
-			# ignore it. :)
-			continue
-		x = cstrip(x,"()|?")
-		if not x:
-			continue
-
-		mybn = os.path.basename(x)
-		if mybn not in bn_list:
-			bn_list += [mybn]
-		else:
-			continue
-		
-		if mybn not in md5sums:
-			portage.util.writemsg("Missing md5sum: %s in %s\n" % (mybn, mycpv))
-		else:
-			if mybn in md5_list:
-				if (md5_list[mybn]["MD5"]  != md5sums[mybn]["MD5"]) or \
-				   (md5_list[mybn]["size"] != md5sums[mybn]["size"]):
-
-					# This associates the md5 with each file. [md5/size]
-					md5joins = md5_list[mybn][2].split(",")
-					md5joins = (" ["+md5_list[mybn][0]+"/"+md5_list[mybn][1]+"],").join(md5joins)
-					md5joins += " ["+md5_list[mybn][0]+"/"+md5_list[mybn][1]+"]"
-
-					portage.writemsg("Colliding md5: %s of %s [%s/%s] and %s\n" % (mybn,mycpv,md5sums[mybn][0],md5sums[mybn][1],md5joins))
-					col_list += [mybn]
-				else:
-					md5_list[mybn][2] += ","+mycpv
-			else:
-				md5_list[mybn] = md5sums[mybn]+[mycpv]
-			del md5sums[mybn]
-		
-	#portage.writemsg(str(bn_list)+"\n")
-	for x in md5sums:
-		if x not in bn_list:
-			portage.writemsg("Extra md5sum: %s in %s\n" % (x, mycpv))
-
-
-print col_list
-print
-print str(len(md5_list))+" unique distfile md5s."
-print str(len(bn_list))+" unique distfile names."




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-10 22:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-10 22:11 [gentoo-commits] portage r13983 - main/trunk/bin Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox