[Rpm-maint] [PATCH] Use a file list to add build-id files to pkgList and explicitly set attrs.

Panu Matilainen pmatilai at redhat.com
Mon Jun 26 11:01:05 UTC 2017

On 06/22/2017 04:31 PM, Mark Wielaard wrote:
> Hi,
> Panu sadi on irc he didn't like the duplication of code that parsed the
> spec file lists. So this updated patch extracts the setup and parsing
> loop in their own function and just calls them twice. I also reformatted
> the patch a little so the whitespace differences are minimal.

Hey, sorry for not responding to this earlier, been on PTOs on and off 
and between them just just forgot the whole thing.

For whatever reason the patch is was attached instead of inline so 
harder to comment, but I think we can make do:

Please do the refactor to helper function(s) in a separate patch from 
the rest of the changes, it'll be easier to review and bisect too if it 
ever comes to that.

mkattr() with non-NULL fn argument ceases to be meaningful here, and 
since it's not even used for anything, whether the mode should be 644 or 
755 nobody knows, certainly not that function. Better just drop 
non-defattr case from it entirely.

Finally, I've no particular objections to changing it this way, but it's 
not as obvious win (ends up actually being more code) as at least I 
initially thought. I've attached (apologies for dumb email clients) a 
more minimal version that should do just the same: enforce a sane 
%defattr across the generated files and directories. Might be nicer for 
Fedora backport if nothing else.

	- Panu -

-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildid-defattr-0.patch
Type: text/x-patch
Size: 1301 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170626/94e69cf3/attachment.bin>

More information about the Rpm-maint mailing list