Patchwork [1/1] shadow: Fix rpm failed dependencies when install

login
register
mail settings
Submitter Zhai, Edwin
Date Aug. 30, 2011, 8:05 a.m.
Message ID <d241a9acdd1578fb711d6d7c113cc51eb1bea74c.1314691314.git.edwin.zhai@intel.com>
Download mbox | patch
Permalink /patch/10747/
State New, archived
Headers show

Comments

Zhai, Edwin - Aug. 30, 2011, 8:05 a.m.
From: Zhai Edwin <edwin.zhai@intel.com>

There are some links become invalid after rename, so that failed dependencies
detected when install rpm package. This commit update links to resolve it.

[YOCTO #1158] got fixed.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
---
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Richard Purdie - Aug. 31, 2011, 6:58 p.m.
On Tue, 2011-08-30 at 16:05 +0800, edwin.zhai@intel.com wrote:
> From: Zhai Edwin <edwin.zhai@intel.com>
> 
> There are some links become invalid after rename, so that failed dependencies
> detected when install rpm package. This commit update links to resolve it.
> 
> [YOCTO #1158] got fixed.
> 
> Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
> ---
>  meta/recipes-extended/shadow/shadow_4.1.4.3.bb |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
index 70d4cbb..e34895e 100644
--- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
@@ -9,7 +9,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
 
 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2 \
            file://login_defs_pam.sed \
@@ -97,6 +97,11 @@  do_install_append() {
 	mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw.${PN}
 	mv ${D}${bindir}/login ${D}${base_bindir}/login.${PN}
 
+	# Handle link properly after rename, otherwise missing files would
+	# lead rpm failed dependencies.
+	ln -sf vipw.${PN} ${D}${base_sbindir}/vigr.${PN}
+	ln -sf newgrp.${PN} ${D}${bindir}/sg
+
 	# Ensure we add a suitable securetty file to the package that has
 	# most common embedded TTYs defined.
 	if [ ! -z "${SERIAL_CONSOLE}" ]; then