]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
expect: use u-a for mkpasswd
authorMartin Jansa <martin.jansa@gmail.com>
Sat, 17 Jun 2017 17:45:30 +0000 (19:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Jun 2017 19:54:53 +0000 (20:54 +0100)
* when busybox is built with CONFIG_CRYPTPW=y, then it will provide
  alternative for mkpasswd, which will fail in postinst, because
  mkpasswd from expect wasn't using u-a:
  update-alternatives: Error: not linking rootfs/usr/bin/mkpasswd to
  /bin/busybox.nosuid since rootfs/usr/bin/mkpasswd exists and is not
  a link

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/expect/expect_5.45.bb

index 630f2e46492b950d673aa0d562e65135ed44251f..e2d24e8d8582b09a4fe7882ee057844f5ab135cc 100644 (file)
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
 DEPENDS += "tcl"
 RDEPENDS_${PN} = "tcl"
 
-inherit autotools
+inherit autotools update-alternatives
 
 PR = "r1"
 
@@ -57,6 +57,11 @@ EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
                 "
 EXTRA_OEMAKE_install = " 'SCRIPTS=' "
 
+ALTERNATIVE_${PN}  = "mkpasswd"
+ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
+# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
+ALTERNATIVE_PRIORITY[mkpasswd] = "40"
+
 FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
                    ${includedir}/expect.h \
                    ${includedir}/expect_tcl.h \