[Rpm-maint] [PATCH v2] Unbreak short-circuited binary builds (RhBug:1434235)

Mark Wielaard mjw at redhat.com
Wed Mar 22 11:34:15 UTC 2017


On Tue, 2017-03-21 at 14:15 +0200, Panu Matilainen wrote:
> Commit bbfe1f86b2e4b5c0bd499d9f3dd9de9c9c20fff2 broke short-circuited
> binary builds (which can be handy for testing when working on large
> packages), eg:
>      rpmbuild -bi foo.spec; rpmbuild -bb --short-circuit foo.spec
> 
> The problem is that in a short-circuited build all the links already
> exist and point to the right place, but the code doesn't realize this
> and creates new links instead, which leaves the old links unowned
> in the buildroot which ultimately causes the build to fail with
> "Installed (but unpackaged) file(s) found" for the previously created
> build-id links.
> 
> When checking for pre-existing links see if they already point to
> the right file and in that case just reuse it instead of creating new
> ones, IFF %install did not execute (which means we must be in
>  --short-circuited build)

It bothered me that we need to special case the --short-circuit case
since in theory your original fix should have worked.

The reason it didn't work for duplicate build-ids when using compat
links is that the compat links themselves are symlinks. So when checking
that the existing link points to the expected target we need to resolve
both the link path and the target path before comparing.

Which is what the attached patch (applied on top of your original patch)
does. With that I get zero fail again on make check.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: short-circuit.patch
Type: text/x-patch
Size: 1601 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170322/54e30d4b/attachment.bin>


More information about the Rpm-maint mailing list