[Buildroot] [git commit branch/next] fs: build host-mkpasswd when BR2_ROOTFS_USERS_TABLES is used

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Aug 8 10:57:09 UTC 2015


commit: http://git.buildroot.net/buildroot/commit/?id=95bd0ad351fe03450f28699f80434539f3764438
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/next

The code in fs/common.mk properly triggers the build of host-mkpasswd
when at least one package specifies a <pkg>_USERS variable. However,
when no selected package specifies a <pkg>_USERS variable but the user
uses a custom users table through BR2_ROOTFS_USERS_TABLES, then we
forget to build host-mkpasswd, leading to build failures if you don't
have mkpasswd installed in your machine.

This commit fixes that by taking into account both the package users
table and the custom users table when deciding to depend or not on
host-mkpasswd.

Reported-by: Auke Willem Oosterhoff <oosterhoff at baopt.nl>
Cc: Auke Willem Oosterhoff <oosterhoff at baopt.nl>
Cc: Yann E. MORIN <yann.morin.1998 at free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
---
 fs/common.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/common.mk b/fs/common.mk
index 4387d06..ad1bcf3 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -41,7 +41,7 @@ define ROOTFS_TARGET_INTERNAL
 
 # extra deps
 ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
-	$$(if $$(PACKAGES_USERS),host-mkpasswd)
+	$$(if $$(PACKAGES_USERS)$$(ROOTFS_USERS_TABLES),host-mkpasswd)
 
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
 ROOTFS_$(2)_COMPRESS_EXT = .gz


More information about the buildroot mailing list