[Rpm-maint] broken filetriggers implementation when using a chroot
Thierry Vignaud
thierry.vignaud at gmail.com
Sat Jan 9 21:48:58 UTC 2016
On 9 January 2016 at 02:56, Thierry Vignaud <thierry.vignaud at gmail.com> wrote:
> On 6 January 2016 at 12:42, Thierry Vignaud <thierry.vignaud at gmail.com> wrote:
>> Sadly, the current filetriggers doesn't honour rpm's chroot.
>> Thus it works fine with our rpm front-end (urpmi which is like yum/dns
>> for FC) for online updates.
>>
>> But not with our installer (Drakx) which installs packages in a chroot
>> (like Anaconda does for FC)
>> See https://bugs.mageia.org/show_bug.cgi?id=17217
>> And urpmi can reproduce this too when using a chroot:
>
> The 3 attached patches fix this bug.
> I've split them into 3 parts:
> - add a new API for package state machine
> - use it in psm.c
> - fix the remaining issues in transaction.c
> (aka file triggers in _other_ packages)
>
> Please apply.
>
> Patches are against the rpm-4.13.x branch.
> When merged in HEAD, there'll be a trivial conflict in the last bit of
> the 3rd patch due to
> "Add possibility to disable file triggers" commit
>
> Thanks
Though we now have the following error:
error: cannot open Transfiletriggername index using db5 - No such file
or directory (2)
It wrongly include the chroot path in the rpmdb path where it's
already chrooted in:
chroot("/home/tv/TL2/") = 0
stat("/home/tv/TL2/var/lib/rpm/Transfiletriggername", 0x7ffefa1ac9b0)
= -1 ENOENT (No such file or directory)
stat("/home/tv/TL2/var/lib/rpm/Transfiletriggername", 0x7ffefa1aca60)
= -1 ENOENT (No such file or directory)
stat("/home/tv/TL2/var/lib/rpm/Transfiletriggername", 0x7ffefa1ac9b0)
= -1 ENOENT (No such file or directory)
stat("/home/tv/TL2/var/lib/rpm/Transfiletriggername", 0x7ffefa1aca60)
= -1 ENOENT (No such file or directory)
stat("/home/tv/TL2/var/lib/rpm/__db.Transfiletriggername",
0x7ffefa1ac8d0) = -1 ENOENT (No such file or directory)
open("/home/tv/TL2/var/lib/rpm/__db.Transfiletriggername",
O_RDWR|O_CREAT|O_EXCL, 0644) = -1 ENOENT (No such file or directory)
error: cannot open Transfiletriggername index using db5 - No such file
or directory (2)
chroot(".") = 0
Which means we'll fail to honor file triggers priority
More information about the Rpm-maint
mailing list