From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-iy0-f175.google.com ([209.85.210.175]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1Re81Z-0004ee-Oj for openembedded-core@lists.openembedded.org; Fri, 23 Dec 2011 17:31:14 +0100 Received: by iakh37 with SMTP id h37so11856538iak.6 for ; Fri, 23 Dec 2011 08:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:message-id:subject:x-mailer:mime-version:content-type; bh=rgc8CDFbApF9Inlhs/VBLT4be5qL4PDOcpg8z2Go4Wo=; b=QFBNvyH1AT2FGzk2vm0BM5MFymqtXQ/0hkCcc+ZiCLVdCpAPt1wSdBKRgRvwRVESmm 532LJAz70UGkh/f+7LzkTgqDRc/Uw9UtWzUO8UYbuUuNaPJbMHh6dgIixDz4QmaVvJfg a8kadkmJto8kU/EXnldAL9B+WxOxnfaQISr2c= Received: by 10.50.188.166 with SMTP id gb6mr14460054igc.18.1324657441247; Fri, 23 Dec 2011 08:24:01 -0800 (PST) Received: from frey.local (ip24-251-167-38.ph.ph.cox.net. [24.251.167.38]) by mx.google.com with ESMTPS id wp7sm20571642igc.6.2011.12.23.08.23.59 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Dec 2011 08:24:00 -0800 (PST) Date: Fri, 23 Dec 2011 09:23:57 -0700 From: Christopher Larson To: Patches and discussions about the oe-core layer Message-ID: <3443259C5BCC4C21B2D92CD4C4B9AC73@gmail.com> X-Mailer: sparrow 1.5 (build 1043.1) MIME-Version: 1.0 Subject: [PATCH] buildhistory: avoid quoting issues with the layer list for build-id X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 16:31:14 -0000 Content-Type: multipart/alternative; boundary="4ef4ab1d_66334873_12d0c" --4ef4ab1d_66334873_12d0c Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline The layer list is multiline, and includes quotes, so including it within quotes is problematic, particularly if the revision includes characters which are not valid outside of a quoted string in shell. To reproduce this failure: do a build with an scm layer not on a branch. Signed-off-by: Christopher Larson --- meta/classes/buildhistory.bbclass | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 39f5ff6..6a08db4 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -325,7 +325,10 @@ buildhistory_get_imageinfo() { # Add some configuration information echo "${MACHINE}: ${IMAGE_BASENAME} configured for ${DISTRO} ${DISTRO_VERSION}" > ${BUILDHISTORY_DIR_IMAGE}/build-id - echo "${@buildhistory_get_layers(d)}" >> ${BUILDHISTORY_DIR_IMAGE}/build-id + + cat >> ${BUILDHISTORY_DIR_IMAGE}/build-id <The layer list is multiline, and includes quotes, so including it wi= thin
quotes is problematic, particularly if the revision includ= es characters which
are not valid outside of a quoted string in= shell. To reproduce this failure:
do a build with an scm layer= not on a branch.

Signed-off-by: Christopher Lar= son <chris=5Flarson= =40mentor.com>
---
meta/classes/buildhistory.= bbclass =7C 5 ++++-
1 files changed, 4 insertions(+), 1 del= etions(-)

diff --git a/meta/classes/buildhistory= .bbclass b/meta/classes/buildhistory.bbclass
index 39f5ff6..6a0= 8db4 100644
--- a/meta/classes/buildhistory.bbclass
+= ++ b/meta/classes/buildhistory.bbclass
=40=40 -325,7 +325,10 =40= =40 buildhistory=5Fget=5Fimageinfo() =7B
=23 Add = some configuration information
echo =22=24=7BMACHINE=7D: =24=7B= IMAGE=5FBASENAME=7D configured for =24=7BDISTRO=7D =24=7BDISTRO=5FVERSION= =7D=22 > =24=7BBUILDHISTORY=5FDIR=5FIMAGE=7D/build-id
- echo= =22=24=7B=40buildhistory=5Fget=5Flayers(d)=7D=22 >> =24=7BBUILDHIS= TORY=5FDIR=5FIMAGE=7D/build-id
+
+ cat >> =24=7B= BUILDHISTORY=5FDIR=5FIMAGE=7D/build-id <<END
+=24=7B=40bu= ildhistory=5Fget=5Flayers(d)=7D
+END
=7D
=
=23 By prepending we get in before the removal of packaging f= iles
--
1.7.8
--4ef4ab1d_66334873_12d0c--