* fix: donot fail if no old package has a build no
* fix: use join
This commit is contained in:
+4
-3
@@ -538,8 +538,6 @@ class Builder:
|
|||||||
a.sort(lambda x,y : cmp(x[1],y[1]))
|
a.sort(lambda x,y : cmp(x[1],y[1]))
|
||||||
old_package_fn = a[-1][0] # get the last one
|
old_package_fn = a[-1][0] # get the last one
|
||||||
old_build = a[-1][1]
|
old_build = a[-1][1]
|
||||||
else:
|
|
||||||
old_build = None
|
|
||||||
|
|
||||||
# compare old files.xml with the new one..
|
# compare old files.xml with the new one..
|
||||||
old_pkg = Package(old_package_fn, 'r')
|
old_pkg = Package(old_package_fn, 'r')
|
||||||
@@ -564,6 +562,9 @@ class Builder:
|
|||||||
if fo.hash != fn.hash:
|
if fo.hash != fn.hash:
|
||||||
changed = True
|
changed = True
|
||||||
break
|
break
|
||||||
|
else: # no old build had a build number
|
||||||
|
old_build = None
|
||||||
|
|
||||||
ctx.ui.debug('old build number: %s' % old_build)
|
ctx.ui.debug('old build number: %s' % old_build)
|
||||||
|
|
||||||
# set build number
|
# set build number
|
||||||
@@ -650,7 +651,7 @@ class Builder:
|
|||||||
files = Files()
|
files = Files()
|
||||||
files.read(ctx.const.files_xml)
|
files.read(ctx.const.files_xml)
|
||||||
for finfo in files.list:
|
for finfo in files.list:
|
||||||
pkg.add_to_package("install/" + finfo.path)
|
pkg.add_to_package(join("install", finfo.path))
|
||||||
|
|
||||||
pkg.close()
|
pkg.close()
|
||||||
os.chdir(c)
|
os.chdir(c)
|
||||||
|
|||||||
Reference in New Issue
Block a user