This came up in discussion about task-abicheck, but I expect this to be more common in the future and something we should offer. The tasks should be able to decide whether they want to run not only based on package name, but also based on package contents. I imagine the task would specify a whitelist and/or a blacklist of file names and we would compare that against the list of all files in all RPMs for a particular build, and decide whether to run the task or not.
For example, task-abicheck wants to run only on packages containing shared libraries (files ending with .so, .so.1, .so.1.0.25 etc). The task would specify (probably in the formula, but for the time being probably in the trigger) something like this:
.so
.so.1
.so.1.0.25
required_files: - regexp: '\.so[0-9.]*$'
In the trigger, we would then retrieve a file list for all RPMs in that build and compare. Now, how do we retrieve that file list?
listRPMFiles()
If we implement this, I imagine this could be very useful in general. Python checks could only run on packages containing python files (even though in this case we could also look at "require" deps), man page linters can only run on packages containing man pages, etc.
This ticket had assigned some Differential requests: D223 D232
@sinnykumari told me yesterday that there are certain packages which contain shared libraries, but their files do not end with .so. This is something that would complicate our detection. Sinny, can you provide some examples of such packages? Thanks.
! In #811#11543, @kparal wrote: @sinnykumari told me yesterday that there are certain packages which contain shared libraries, but their files do not end with .so. This is something that would complicate our detection. Sinny, can you provide some examples of such packages? Thanks.
I tried to find out shared libraries which may not end with .so but so far didn't find any. I think, I might have some wrong memory about it. We can go ahead with using regexp: '.so[0-9.]$' to find out whether an rpm content has shared library or not.
Log in to comment on this ticket.