Filtering out '~/'
parent
20b0632d0b
commit
421354e9c9
|
@ -412,10 +412,12 @@ if args.command == "package":
|
||||||
pkg = tarfile.open(pkgname, "w:gz")
|
pkg = tarfile.open(pkgname, "w:gz")
|
||||||
|
|
||||||
for f in appmeta.files:
|
for f in appmeta.files:
|
||||||
# TODO remove leading '~'
|
filename = args.rootdir +"/"+ appmeta.name +"/"+ f
|
||||||
|
filedest = appmeta.files[f]["dest"].replace("~/", "", 1)
|
||||||
|
|
||||||
# TODO save and restore owners and permissions
|
# TODO save and restore owners and permissions
|
||||||
try:
|
try:
|
||||||
pkg.add(args.rootdir +"/"+ appmeta.name +"/"+ f, arcname=appmeta.files[f]["dest"])
|
pkg.add(filename, arcname=filedest)
|
||||||
log.info("Adding %s to package" % f)
|
log.info("Adding %s to package" % f)
|
||||||
except:
|
except:
|
||||||
log.warning("Failed to add %s to tar package %s" % (f, pkgname))
|
log.warning("Failed to add %s to tar package %s" % (f, pkgname))
|
||||||
|
|
Loading…
Reference in New Issue