mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: jon@ringle.org
To: ptxdist@pengutronix.de
Cc: Jon Ringle <jringle@gridpoint.com>
Subject: [ptxdist] [PATCH v3] image_tgz: Make label optional
Date: Tue, 22 Apr 2014 12:21:59 -0400	[thread overview]
Message-ID: <1398183719-30466-1-git-send-email-jon@ringle.org> (raw)

From: Jon Ringle <jringle@gridpoint.com>

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 platforms/image_tgz.in    | 14 ++++++++++++--
 rules/post/image_tgz.make |  8 ++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
index 17b0aed..8cda6f6 100644
--- a/platforms/image_tgz.in
+++ b/platforms/image_tgz.in
@@ -1,8 +1,18 @@
 ## SECTION=image
 
-config IMAGE_TGZ
+menuconfig IMAGE_TGZ
 	bool
-	prompt "Generate images/root.tgz"
+	prompt "Generate images/root.tgz      "
 	help
 	  Build a tar.gz archive of the root filesystem, containing the
 	  right owner/group and access permissions.
+
+if IMAGE_TGZ
+config IMAGE_TGZ_LABEL
+	string
+	prompt "label"
+	default "${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"
+	help
+	  This string gets expanded to form the label. An empty string produces no label.
+
+endif
diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
index 019077d..bbf3edf 100644
--- a/rules/post/image_tgz.make
+++ b/rules/post/image_tgz.make
@@ -11,11 +11,15 @@
 SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)		+= $(IMAGEDIR)/root.tgz
 
 ifdef PTXCONF_IMAGE_TGZ
+ifneq ($(call remove_quotes,$(PTXCONF_IMAGE_TGZ_LABEL)),)
+IMAGE_TGZ_LABEL="--label $(PTXCONF_IMAGE_TGZ_LABEL)"
+endif
+
 $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
-	@echo -n "Creating root.tgz from working dir with label..."
+	@echo -n "Creating root.tgz from working dir: ${IMAGE_TGZ_LABEL} "
 	@cd $(image/work_dir);							\
 	(awk -F: $(DOPERMISSIONS) $(image/permissions) &&		\
-	(	echo -n "tar --label '${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}' -zcf ";	\
+	(	echo -n "tar ${IMAGE_TGZ_LABEL} -zcf ";	\
 		echo -n "$@ ." )					\
 	) | $(FAKEROOT) --
 	@echo "done."
-- 
1.8.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2014-04-22 16:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 16:21 jon [this message]
2014-04-23  6:52 ` Michael Olbrich
2014-04-23 12:00   ` Jon Ringle
2014-05-21 15:03   ` Alexander Dahl
2014-05-26  7:13     ` Alexander Dahl
2014-06-02  9:17       ` Michael Olbrich
  -- strict thread matches above, loose matches on Subject: below --
2014-04-17 15:11 jon
2014-04-22 15:58 ` Jon Ringle
2014-04-22 16:08 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1398183719-30466-1-git-send-email-jon@ringle.org \
    --to=jon@ringle.org \
    --cc=jringle@gridpoint.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox