From: Wang Mingyu <[email protected]>

Error: Transaction test error:
  file /usr/bin/lastlog2 conflicts between attempted installs of 
lastlog2-1.2.0-r0.core2_64 and util-linux-lastlog2-2.40.1-r0.core2_64
  file /usr/lib/security/pam_lastlog2.so conflicts between attempted installs 
of lastlog2-1.2.0-r0.core2_64 and util-linux-lastlog2-2.40.1-r0.core2_64

util-linux also uses the file '/usr/bin/lastlog2' and 
'/usr/lib/security/pam_lastlog2.so'.
util-linux has a priority of 80.

Signed-off-by: Wang Mingyu <[email protected]>
---
 meta-oe/recipes-extended/lastlog2/lastlog2_1.3.1.bb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta-oe/recipes-extended/lastlog2/lastlog2_1.3.1.bb 
b/meta-oe/recipes-extended/lastlog2/lastlog2_1.3.1.bb
index ebabcfd40..fb7d877e2 100644
--- a/meta-oe/recipes-extended/lastlog2/lastlog2_1.3.1.bb
+++ b/meta-oe/recipes-extended/lastlog2/lastlog2_1.3.1.bb
@@ -22,6 +22,15 @@ SYSTEMD_SERVICE:${PN} = "lastlog2-import.service"
 
 EXTRA_OEMESON = " -Dpamlibdir=${base_libdir}/security"
 
+inherit update-alternatives
+ 
+ALTERNATIVE:${PN} += "lastlog2 pam_lastlog2"
+ALTERNATIVE_LINK_NAME[lastlog2] = "${bindir}/lastlog2"
+ALTERNATIVE_TARGET[pam_lastlog2] = "${libdir}/security/pam_lastlog2.so"
+ALTERNATIVE_LINK_NAME[pam_lastlog2] = "${libdir}/security/pam_lastlog2.so"
+ 
+ALTERNATIVE_PRIORITY = "100"
+
 do_install:append () {
       if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname 
${D}${systemd_unitdir}` ]; then
           # Fix makefile hardcoded path assumptions for systemd (assumes 
$prefix)
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#112025): 
https://lists.openembedded.org/g/openembedded-devel/message/112025
Mute This Topic: https://lists.openembedded.org/mt/108138518/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to