public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kea] rawhide: Run scriptlet in %pre instead of %pretrans
@ 2026-08-10  9:16 Beniamino Galvani
  0 siblings, 0 replies; only message in thread
From: Beniamino Galvani @ 2026-08-10  9:16 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/kea
            Branch : rawhide
            Commit : db7990d7d6bf308736d40efcfeee06a53a81615d
            Author : Beniamino Galvani <bgalvani@redhat.com>
            Date   : 2026-08-10T08:21:01+02:00
            Stats  : +1/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/kea/c/db7990d7d6bf308736d40efcfeee06a53a81615d?branch=rawhide

            Log:
            Run scriptlet in %pre instead of %pretrans

From the rpm documentation:

  Note that the %pretrans scriptlet will, in the particular case of
  system installation, run before anything at all has been
  installed. This implies that it cannot have any dependencies at
  all. For this reason, %pretrans is best avoided, but if used it MUST
  (by necessity) be written in Lua.

When kea is part of the initial installation, if fails with:

  Transaction failed: Rpm transaction failed.
    - /bin/sh is needed by kea-3.2.0-3.fc45.x86_64

To fix this, run the scriptlet in %pre instead which is still executed
before the old package is removed.

---
diff --git a/kea.spec b/kea.spec
index 23fa711..e54a397 100644
--- a/kea.spec
+++ b/kea.spec
@@ -229,7 +229,7 @@ install -dm 0750 %{buildroot}%{_rundir}/kea/
 mkdir -p %{buildroot}%{_localstatedir}/log
 install -dm 0750 %{buildroot}%{_localstatedir}/log/kea/
 
-%pretrans
+%pre
 if [ $1 -ge 2 ]; then
     # kea-ctrl-agent was removed in 3.2.0; stop any running instance on upgrade
     systemctl disable --now kea-ctrl-agent.service >/dev/null 2>&1 || :

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10  9:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10  9:16 [rpms/kea] rawhide: Run scriptlet in %pre instead of %pretrans Beniamino Galvani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox