]> git.pld-linux.org Git - packages/setup.git/commitdiff
go back to joinpasswd in %post auto/th/setup-2.10.1-1
authorJan Palus <atler@pld-linux.org>
Sat, 10 Apr 2021 20:21:12 +0000 (22:21 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 10 Apr 2021 20:21:12 +0000 (22:21 +0200)
%triggerpostun is way too late at least with rpm4.

suppose packageA in version 2 requires group G during installation and G
is provided by setup version 2. packageA has R: setup >= 2. user has old
versions of packageA 1 and setup 1 installed and upgrades packageA
pulling new version of setup. both are part of same transaction. rpm4
first installs setup 2 (until %post), than packageA 2 (until %post) and
only then starts cleanup seemingly in reverse dependency order so first
packageA and then setup. that makes %triggerpostun of setup package to
be one of the very last operation while the group G was required at the
very beginning during packageA installation. new group needs to be added
at the point of %post.

joinpasswd used to be part of %post, but moved to %triggerpostun back in
2003 without explanation in commit message. perhaps binary was not
static back then?

setup.spec

index 732755c13d9fe0c3ec5737508ed7cc23f314201e..9e15961f0570bcac35acea0569830a8b9404bc99 100644 (file)
@@ -119,13 +119,13 @@ rm -rf $RPM_BUILD_ROOT
 -/bin/sh -c '/usr/bin/test -L /etc/mtab || /bin/mv -v /etc/mtab /etc/mtab.rpmsave'
 
 %triggerpostun -p /sbin/postshell -- %{name} < %{version}-%{release}
-%{_sbindir}/joinpasswd
 %{_sbindir}/delpasswd -g ttyS cdwrite
 
 %triggerin -p %{_sbindir}/update-fstab -- %{name} < 2.4.10-1
 
 %post -p /sbin/postshell
 -/sbin/env-update -u
+%{_sbindir}/joinpasswd
 
 %postun -p /sbin/postshell
 -/sbin/env-update -u
This page took 0.165558 seconds and 4 git commands to generate.