Merge "Add path to module"
am: 1df74e2607
Change-Id: I3b09e693aca4e63b506c2e1fe92fa2a4a6dc80d3
This commit is contained in:
@@ -135,18 +135,36 @@ def main():
|
|||||||
else:
|
else:
|
||||||
packages[package] = [file]
|
packages[package] = [file]
|
||||||
|
|
||||||
|
with open(os.path.join(args.out1, 'module-info.json')) as module_info_json:
|
||||||
|
module_info = json.load(module_info_json)
|
||||||
|
|
||||||
writer = csv.writer(sys.stdout, quoting = csv.QUOTE_NONNUMERIC,
|
writer = csv.writer(sys.stdout, quoting = csv.QUOTE_NONNUMERIC,
|
||||||
delimiter = ',', lineterminator = '\n')
|
delimiter = ',', lineterminator = '\n')
|
||||||
for package, files in packages.items():
|
for package, files in packages.iteritems():
|
||||||
for file in files:
|
for file in files:
|
||||||
|
# Group sources of the deltas.
|
||||||
if package in package_vendor_map:
|
if package in package_vendor_map:
|
||||||
vendor = package_vendor_map[package]
|
vendor = package_vendor_map[package]
|
||||||
else:
|
else:
|
||||||
vendor = "--unknown--"
|
vendor = "--unknown--"
|
||||||
# Get file size
|
# Get file size.
|
||||||
full_path = os.path.join(args.out1, 'system', file)
|
full_path = os.path.join(args.out1, 'system', file)
|
||||||
size = os.stat(full_path).st_size
|
size = os.stat(full_path).st_size
|
||||||
writer.writerow([vendor, package, file, size])
|
if package in module_info.keys():
|
||||||
|
module_path = module_info[package]['path']
|
||||||
|
else:
|
||||||
|
module_path = ''
|
||||||
|
writer.writerow([
|
||||||
|
# File that exists in out1 but not out2.
|
||||||
|
file,
|
||||||
|
# Module name that the file came from.
|
||||||
|
package,
|
||||||
|
# Path to the module.
|
||||||
|
module_path,
|
||||||
|
# File size.
|
||||||
|
size,
|
||||||
|
# Vendor owner.
|
||||||
|
vendor])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user