build: Remove redundant dict variable
This commit is contained in:
@@ -937,8 +937,6 @@ class Builder:
|
|||||||
# FIXME: material collisions after expanding globs could be
|
# FIXME: material collisions after expanding globs could be
|
||||||
# reported as errors
|
# reported as errors
|
||||||
|
|
||||||
d = {}
|
|
||||||
|
|
||||||
def add_path(path):
|
def add_path(path):
|
||||||
# add the files under material path
|
# add the files under material path
|
||||||
for fpath, fhash in util.get_file_hashes(path, collisions, install_dir):
|
for fpath, fhash in util.get_file_hashes(path, collisions, install_dir):
|
||||||
@@ -956,9 +954,12 @@ class Builder:
|
|||||||
st = os.stat(fpath)
|
st = os.stat(fpath)
|
||||||
else:
|
else:
|
||||||
st = os.lstat(fpath)
|
st = os.lstat(fpath)
|
||||||
d[frpath] = pisi.files.FileInfo(path=frpath, type=ftype, permanent=permanent,
|
|
||||||
|
fileinfo = pisi.files.FileInfo(path=frpath, type=ftype, permanent=permanent,
|
||||||
size=fsize, hash=fhash, uid=str(st.st_uid), gid=str(st.st_gid),
|
size=fsize, hash=fhash, uid=str(st.st_uid), gid=str(st.st_gid),
|
||||||
mode=oct(stat.S_IMODE(st.st_mode)))
|
mode=oct(stat.S_IMODE(st.st_mode)))
|
||||||
|
files.append(fileinfo)
|
||||||
|
|
||||||
if stat.S_IMODE(st.st_mode) & stat.S_ISUID:
|
if stat.S_IMODE(st.st_mode) & stat.S_ISUID:
|
||||||
ctx.ui.warning(_("/%s has suid bit set") % frpath)
|
ctx.ui.warning(_("/%s has suid bit set") % frpath)
|
||||||
|
|
||||||
@@ -967,9 +968,6 @@ class Builder:
|
|||||||
for path in glob.glob(wildcard_path):
|
for path in glob.glob(wildcard_path):
|
||||||
add_path(path)
|
add_path(path)
|
||||||
|
|
||||||
for (p, fileinfo) in d.iteritems():
|
|
||||||
files.append(fileinfo)
|
|
||||||
|
|
||||||
files_xml_path = util.join_path(self.pkg_dir(), ctx.const.files_xml)
|
files_xml_path = util.join_path(self.pkg_dir(), ctx.const.files_xml)
|
||||||
files.write(files_xml_path)
|
files.write(files_xml_path)
|
||||||
self.files = files
|
self.files = files
|
||||||
|
|||||||
Reference in New Issue
Block a user