When executing multiple services, different versions of the same .spec
might be generated. Before this patch, download_files downloaded files
from all of them, which however could cause problems for example for
deb/ubuntu builds that may automatically detect the orig archive (e.g.
if set_version changes the URL to download files from).
This patch fixes the problem by looking at all the *.spec files
referencing the same base spec file and by considering only the longest
file name, because it is the one where the more services were applied.
When executing multiple services, different versions of the same .spec might be generated. Before this patch, download_files downloaded files from all of them, which however could cause problems for example for deb/ubuntu builds that may automatically detect the orig archive (e.g. if set_version changes the URL to download files from).
This patch fixes the problem by looking at all the *.spec files referencing the same base spec file and by considering only the longest file name, because it is the one where the more services were applied.