[Buildroot] [git commit] infra: permissions/users/device tables: avoid adding empty entries

Peter Korsgaard peter at korsgaard.com
Wed May 28 19:19:45 UTC 2014


commit: http://git.buildroot.net/buildroot/commit/?id=4d5bf929a62b41519f5470d7ea20567e0061277f
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

In pkg-generic.mk, an entry would be added to each of the permissions,
devices and users tables, even if FOO_PERMISSIONS/DEVICES/USERS is empty. In
that last case, the entry would contain only the separator, which is
substituted to '\n' in fs/common.mk.
For configurations with many packages, this would render the build output a
bit odd, containing many \n instances (even though the end result in the
target would of course be the same).

This patch cleans up the build output by only adding to these tables when
the package actually specified contents for them.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
Tested-by: Romain Naour <romain.naour at openwide.fr>
Acked-by: Romain Naour <romain.naour at openwide.fr>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/pkg-generic.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 260f374..5116ed9 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -653,9 +653,16 @@ $$(foreach pkg,$$($(2)_PROVIDES),\
 endif
 
 TARGETS += $(1)
+
+ifneq ($$($(2)_PERMISSIONS),)
 PACKAGES_PERMISSIONS_TABLE += $$($(2)_PERMISSIONS)$$(sep)
+endif
+ifneq ($$($(2)_DEVICES),)
 PACKAGES_DEVICES_TABLE += $$($(2)_DEVICES)$$(sep)
+endif
+ifneq ($$($(2)_USERS),)
 PACKAGES_USERS += $$($(2)_USERS)$$(sep)
+endif
 
 ifeq ($$($(2)_SITE_METHOD),svn)
 DL_TOOLS_DEPENDENCIES += svn


More information about the buildroot mailing list