in Shared_Processors/InstallsArrayFineTuning.py [0:0]
def main(self):
"""Magic."""
current = self.env["additional_pkginfo"]["installs"]
changes = self.env["changes"]
for change in changes:
path = change.get("path", None)
if not path:
raise ProcessorError("No path found in change!")
newtype = change.get("type", None)
if not newtype:
raise ProcessorError("No type found in change!")
# Replace the installs
for install in current:
if install["path"] == path:
install["type"] = newtype
self.output("Replacing type for %s to %s" % (path, newtype))
self.env["changed_pkginfo"] = current