INNER CODE UNIT · Python
add_info
secondlife/viewer · scripts/packages-formatter.py:72
def add_info(key, pkg, lines):
if pkg not in info[key]:
info[key][pkg] = '\n'.join(lines)
else:
dups[key].add(pkg)
versions=autobuild('install', '--versions', '--install-dir', args.install_dir)
copyrights=autobuild('install', '--copyrights', '--install-dir', args.install_dir)
viewer_copyright = copyrights.readline() # first line is the copyright for the viewer itself
# Two different autobuild outputs, but we treat them essentially the same way:
# populating each into a dict; each a subdict of 'info'.
for key, rawdata in ("versions", versions), ("copyrights", copyrights):
lines = iter(rawdata)
try:
line = next(lines)
except StopIteration:
# rawdata is completely empty? okay...