[Rpm-ecosystem] lua, unprivileged rpm, and rpm-ostree

Colin Walters walters at verbum.org
Fri Aug 12 17:31:36 UTC 2016


On Fri, Aug 12, 2016, at 12:16 PM, Miroslav Suchý wrote:

> And as Neal stated, the %pretrans is executed always. No matter if it is 
> upgrade or clean install. So you need to do the check if it is upgrade 
> inside of that scriptlet.

Observe though that it's not necessary to execute %pretrans if
it is a fresh install.  And hence RPM could learn to do that. 

Now an important aspect of things is that rpm-ostree *always*
constructs a new root.   Installing a package is:

 - re-checkout base via hardlinks into new target dir
 - re-overlay all package trees via hardlinks
 - execute %post and %posttrans

So basically, workarounds for bugs in earlier package versions
or bugs in RPM like the one you reference:
http://pkgs.fedoraproject.org/cgit/rpms/httrack.git/tree/httrack.spec#n81
become unnecessary.  The filesystem is *always*
exactly the same as a fresh install.

Therefore, since rpm-ostree doesn't execute %pretrans today,
there's no reason for it to do so.

And if RPM learned to not execute %pretrans for new installs,
the rationale for writing it in lua drops away.


More information about the Rpm-ecosystem mailing list