If merged this pull request will refactor the logic used for handling symlinks so that plugins do not run multiple times for the same file, along with changing the way symlink file names are added so they don't depend on the user specifying an install prefix.
Plugins will still run multiple times if there are separate files that happen to have identical hashes -- which could cause a similar problem with the cve-bin-tool plugin as this change solves for symlinks. Some plugins might need to gather information from other files relative to the one they are looking at.
Should an extra optional argument be added to the info extractor hook to tell the plugin if a file with the same hash has previously been seen, so it can adjust its behavior accordingly?
Should a separate info extraction hook be added for duplicate files in different locations?
Proposed changes
Refactor symlink handling to prevent plugins from running multiple time on the same file due to symlinks
Add file name symlinks (+ track them in the metadata section) regardless of the user supplied an install prefix
Summary
If merged this pull request will refactor the logic used for handling symlinks so that plugins do not run multiple times for the same file, along with changing the way symlink file names are added so they don't depend on the user specifying an install prefix.
Plugins will still run multiple times if there are separate files that happen to have identical hashes -- which could cause a similar problem with the cve-bin-tool plugin as this change solves for symlinks. Some plugins might need to gather information from other files relative to the one they are looking at.
Proposed changes
Resolves #215