Skip to contentSkip to conversation

fs: build host-mkpasswd when BR2_ROOTFS_USERS_TABLES is used

PATCH New Thomas Petazzoni 2 participants 3 messages Jul 21, 2015 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: build host-mkpasswd when BR2_ROOTFS_USERS_TABLES is used

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.

---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/common.mk +1 -1
index 4387d06..ad1bcf3 100644
@@ -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
Signature · 1 line
2.4.6
#1 lore raw

PATCH 1/1 fs: build host-mkpasswd when BR2_ROOTFS_USERS_TABLES is used

Thomas, All,

On 2015-07-21 17:36 +0200, Thomas Petazzoni spake thusly:

Quoted 7 lines

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.

Quoted 8 lines

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.

Regards,
Yann E. MORIN.

Quoted 20 lines
---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/common.mk +1 -1
index 4387d06..ad1bcf3 100644
@@ -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
Signature · 1 line
2.4.6
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
author Applied
#2 lore raw

PATCH 1/1 fs: build host-mkpasswd when BR2_ROOTFS_USERS_TABLES is used

In reply to Thomas Petazzoni

Hello,

Quoted 11 lines · Thomas Petazzoni

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.

Quoted 7 lines
---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com