Build-no hesaplamak için olduğun dizin ve alt dizinlerinde recursive gezme, bu iş build-farm'da olacağına göre paketler /var/cache/pisi/packages altında olacak zaten. %10000 hız kazancı (15 dakika yerine 1 saniye)
This commit is contained in:
+1
-8
@@ -584,14 +584,10 @@ class Builder:
|
|||||||
def calc_build_no(self, package_name):
|
def calc_build_no(self, package_name):
|
||||||
"""Calculate build number"""
|
"""Calculate build number"""
|
||||||
|
|
||||||
# find previous build in output dir and packages dir
|
# find previous build in packages dir
|
||||||
found = []
|
found = []
|
||||||
def locate_package_names(files):
|
def locate_package_names(files):
|
||||||
for fn in files:
|
for fn in files:
|
||||||
try:
|
|
||||||
fn = fn.decode('utf-8') # FIXME: why is this necessary?
|
|
||||||
except: # fix 1088
|
|
||||||
continue
|
|
||||||
if util.is_package_name(fn, package_name):
|
if util.is_package_name(fn, package_name):
|
||||||
old_package_fn = util.join_path(root, fn)
|
old_package_fn = util.join_path(root, fn)
|
||||||
try:
|
try:
|
||||||
@@ -610,9 +606,6 @@ class Builder:
|
|||||||
|
|
||||||
outdir = ctx.config.options.output_dir or '.'
|
outdir = ctx.config.options.output_dir or '.'
|
||||||
|
|
||||||
for root, dirs, files in os.walk(outdir):
|
|
||||||
dirs = [] # don't recurse
|
|
||||||
locate_package_names(files)
|
|
||||||
for root, dirs, files in os.walk(ctx.config.packages_dir()):
|
for root, dirs, files in os.walk(ctx.config.packages_dir()):
|
||||||
locate_package_names(files)
|
locate_package_names(files)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user