|
|
|
@ -1338,13 +1338,12 @@ class Builder(Update):
|
|
|
|
|
path.basename(x) for x in removeList)
|
|
|
|
|
logger.info(removelist_str)
|
|
|
|
|
|
|
|
|
|
map(lambda x: os.unlink(x),
|
|
|
|
|
(pathJoin(pkgDir, x) for x in removeList))
|
|
|
|
|
[os.unlink(y) for y in (pathJoin(pkgDir, x) for x in removeList)]
|
|
|
|
|
|
|
|
|
|
# remove empty directories
|
|
|
|
|
map(lambda x: os.rmdir(x), (x for x in (path.join(pkgDir, y) for y
|
|
|
|
|
in os.listdir(pkgDir))
|
|
|
|
|
if path.isdir(x) and not os.listdir(x)))
|
|
|
|
|
[os.rmdir(y) for y
|
|
|
|
|
in (path.join(pkgDir, x) for x
|
|
|
|
|
in os.listdir(pkgDir))
|
|
|
|
|
if path.isdir(y) and not os.listdir(y)]
|
|
|
|
|
|
|
|
|
|
self.regenPackages(chrootPath, pkgDir[len(chrootPath):])
|
|
|
|
|
except OSError as e:
|
|
|
|
@ -1456,11 +1455,11 @@ class Builder(Update):
|
|
|
|
|
digestfile = self._digest_file(isofile)
|
|
|
|
|
try:
|
|
|
|
|
with writeFile(digestfile) as f:
|
|
|
|
|
f.writelines(map(lambda x: template % {
|
|
|
|
|
f.writelines((template % {
|
|
|
|
|
'alg': x.upper(),
|
|
|
|
|
'digest':
|
|
|
|
|
process("%ssum" % x, isofile).read().partition(' ')[0],
|
|
|
|
|
'filename': path.basename(isofile)}, ["md5", "sha1"]))
|
|
|
|
|
'filename': path.basename(isofile)} for x in ["md5", "sha1"]))
|
|
|
|
|
except (IOError, OSError):
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
@ -1556,9 +1555,9 @@ class Builder(Update):
|
|
|
|
|
devPath = path.join(directory, "dev")
|
|
|
|
|
# clean dev
|
|
|
|
|
for pathname, dirs, files in os.walk(devPath, topdown=False):
|
|
|
|
|
map(lambda x: os.unlink(path.join(pathname, x)), files)
|
|
|
|
|
map(lambda x: os.unlink(x) if path.islink(x) else os.rmdir(x),
|
|
|
|
|
(path.join(pathname, x) for x in dirs))
|
|
|
|
|
[os.unlink(path.join(pathname, x)) for x in files]
|
|
|
|
|
[os.unlink(x) if path.islink(x) else os.rmdir(x) for
|
|
|
|
|
x in (path.join(pathname, x) for x in dirs)]
|
|
|
|
|
for node, mode, dmode, major, minor in [
|
|
|
|
|
("console", 0o600, stat.S_IFCHR, 5, 1),
|
|
|
|
|
("tty1", 0o600, stat.S_IFCHR, 4, 1),
|
|
|
|
|