pure_package_name() kullan, adamlar boşuna yazmamış o fonksiyonu
This commit is contained in:
@@ -15,7 +15,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pisi.specfile import SpecFile
|
from pisi.specfile import SpecFile
|
||||||
from pisi.util import join_path
|
from pisi.util import join_path, pure_package_name
|
||||||
|
|
||||||
def findPspec(folder):
|
def findPspec(folder):
|
||||||
pspecList = []
|
pspecList = []
|
||||||
@@ -32,9 +32,7 @@ def getPackages(pspecList):
|
|||||||
for pspec in pspecList:
|
for pspec in pspecList:
|
||||||
specFile = SpecFile(join_path(pspec, "pspec.xml"))
|
specFile = SpecFile(join_path(pspec, "pspec.xml"))
|
||||||
for p in specFile.packages:
|
for p in specFile.packages:
|
||||||
packages += [(p.name,
|
packages += [(p.name, specFile.source.name)]
|
||||||
"%s-%s" % (specFile.history[0].version, specFile.history[0].release),
|
|
||||||
specFile.source.name)]
|
|
||||||
return packages
|
return packages
|
||||||
|
|
||||||
def usage(miniMe):
|
def usage(miniMe):
|
||||||
@@ -56,9 +54,9 @@ if __name__ == "__main__":
|
|||||||
usage(sys.argv[0])
|
usage(sys.argv[0])
|
||||||
|
|
||||||
packages = getPackages(findPspec(repSRC))
|
packages = getPackages(findPspec(repSRC))
|
||||||
binaries = os.listdir(repBIN)
|
binaries = map(pure_package_name, filter(lambda x: x.endswith(".pisi"), os.listdir(repBIN)))
|
||||||
|
|
||||||
print "Missing binary packages:"
|
print "Missing binary packages:"
|
||||||
for p, v, s in packages:
|
for p, s in packages:
|
||||||
if not filter(lambda x: x.startswith("%s-%s" % (p, v)), binaries):
|
if not p in binaries:
|
||||||
print " %s (%s)" % (p, s)
|
print " %s (%s)" % (p, s)
|
||||||
|
|||||||
Reference in New Issue
Block a user