Revision: 17719 http://gar.svn.sourceforge.net/gar/?rev=17719&view=rev Author: cgrzemba Date: 2012-04-17 07:09:47 +0000 (Tue, 17 Apr 2012) Log Message: ----------- add check against stdlibs
Modified Paths: -------------- csw/mgar/gar/v2/lib/python/find_missing_bins.py Added Paths: ----------- csw/mgar/gar/v2/lib/python/make-stdlib-db.py Property Changed: ---------------- csw/mgar/gar/v2/lib/python/ Property changes on: csw/mgar/gar/v2/lib/python ___________________________________________________________________ Added: svn:ignore + stdlib.json Modified: csw/mgar/gar/v2/lib/python/find_missing_bins.py =================================================================== --- csw/mgar/gar/v2/lib/python/find_missing_bins.py 2012-04-16 22:48:22 UTC (rev 17718) +++ csw/mgar/gar/v2/lib/python/find_missing_bins.py 2012-04-17 07:09:47 UTC (rev 17719) @@ -23,6 +23,7 @@ catrel = 'unstable' cache_file_bins = 'bins-%s-%s-%s.json' cache_file_needed_bins = 'needed-bins-%s-%s-%s.json' +fn_stdlibs = 'stdlibs.json' class FindBins(object): @@ -98,6 +99,8 @@ rest_client = rest.RestClient() rd = FindBins() needed_bins = {} + with open(fn_stdlibs, "r") as fd: + stdlibs = cjson.decode(fd.read()) for osrel in common_constants.OS_RELS: if osrel in common_constants.OBSOLETE_OS_RELS: continue @@ -111,6 +114,9 @@ if nb in bins[npkg]: found = True break + if nb in stdlibs: + found = True + break if found == False: print "%s not found, needed in pkg %s" % (nb,pkg) @@ -120,6 +126,9 @@ options, args = parser.parse_args() if options.debug: logging.basicConfig(level=logging.DEBUG) + if not os.path.exists(fn_stdlibs): + print "needed file %s not found, exit" % fn_stdlibs + sys.exit() pr = PackageScanner() pr.scanPackage() Added: csw/mgar/gar/v2/lib/python/make-stdlib-db.py =================================================================== --- csw/mgar/gar/v2/lib/python/make-stdlib-db.py (rev 0) +++ csw/mgar/gar/v2/lib/python/make-stdlib-db.py 2012-04-17 07:09:47 UTC (rev 17719) @@ -0,0 +1,18 @@ +#!/bin/env python + +from os import listdir, chdir, getcwd +import re +import cjson + +fnLiblst = "stdlibs.json" + +liblst = [] +cwd = getcwd() +chdir('/usr/lib') +for lib in listdir('.'): + if re.match('lib[a-zA-Z0-9_-]*.so.[0-9]+$',lib): + liblst.append(lib) +chdir(cwd) +with open(fnLiblst,'w') as fd: + fd.write(cjson.encode(liblst)) +fd.close() Property changes on: csw/mgar/gar/v2/lib/python/make-stdlib-db.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel