
Martin Wilck <martin.wilck@suse.com> writes:
On Mon, 2021-08-30 at 10:51 -0400, Neal Gompa wrote:
On Mon, Aug 30, 2021 at 10:42 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
Отправлено с iPhone
30 авг. 2021 г., в 16:46, Martin Wilck <Martin.Wilck@suse.com> написал(а):
On Mon, 2021-08-30 at 09:59 +0200, Dan Čermák wrote:
Hi list,
now that boo#1041742 [1] appears to be resolved in Tumbleweed, is there anything stopping us from adding transaction file triggers into glibc to run ldconfig automatically?
I've read through this bug, and I have to say I fail to grok it. When exactly does a %transfiletrigger get executed if libzypp installs multiple packages at the same time?
Yes, I was confused as well. I do not understand what exact feature in current RPM allows libzypp integration.
https://bugzilla.suse.com/show_bug.cgi?id=1041742#c19 makes it sound as if the %transfiletrigger was executed by rpm directly after the installation of a package, i.e. before libzypp calls rpm to install other packages:
libzypp rpm --noposttrans install A %post of A %filetriggerin triggered by A %transfiletriggerin triggered by A (*) rpm --noposttrans install B %post of B -> %posttrans of A, B, ... (#)
where (*), according to the BZ comments, would only be executed by rpm 4.16 and higher.
As far as I understand current RPM code, it still skips triggers on —noposttrans.
But that would still be very different from what rpm itself does according to our late discussion on packaging ( https://lists.opensuse.org/archives/list/packaging@lists.opensuse.org/thread... ) where the %transfiletriggerin would be called after (#).
Or am I misunderstanding?
Martin
Footnotes: [1] https://bugzilla.suse.com/show_bug.cgi?id=1041742
The fundamental flaw of Zypper here is that it *doesn't* let RPM run the scriptlets in the first place. It also doesn't allow RPM to do the transaction itself. This is why Zypper struggles with some of the more advanced features of RPM: RPM expects that these things are run as part of one unified transaction with RPM *itself* ordering and executing things. Zypper collects the packages, installs the RPMs with rpm -Uvh --noscripts, and then turns around and scans for scripts and manually executes them. There was no effort to introduce delayed script execution to RPM, and no effort to properly integrate the higher level and lower level package managers properly.
This is actually a fundamental difference between Zypper and *all* other RPM package managers. In particular, DNF executes transactions by collecting up the RPMs and passing it to librpm to apply the transaction. It then listens to a callback from librpm so that it can print out progress to the user.
Understood. I'm sure there are good (probably historic?) reasons why zypper does this the way it does.
My question is what this means for %transfiletriggerin with zypper/libzypp. Can we do it at all, and if yes, how?
Yes we can do it on Tumbleweed and maybe on the next Leap if the changes to rpm and libzypp get backported.
What will be the semantic differences to plain rpm and/or dnf?
I guess that the order of the scripts will be different, but otherwise it should just work (yes I know, famous last words…). Cheers, Dan -- Dan Čermák <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director: Felix Imendörffer