Patchwork buildhistory.bbclass: Fix hostname print for 'No changes' case

login
register
mail settings
Submitter Otavio Salvador
Date Oct. 11, 2012, 9:46 p.m.
Message ID <1349992001-3965-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/38105/
State Accepted
Commit 9fe0f62411898d7ad07a77a9207dc156687864c3
Headers show

Comments

Otavio Salvador - Oct. 11, 2012, 9:46 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/buildhistory.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Saul Wold - Oct. 18, 2012, 8:59 p.m.
On 10/11/2012 02:46 PM, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>   meta/classes/buildhistory.bbclass |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index 49f2ea5..0a5753f 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -403,9 +403,9 @@ END
>   		fi
>   		# Check if there are new/changed files to commit (other than metadata-revs)
>   		repostatus=`git status --porcelain | grep -v " metadata-revs$"`
> +		HOSTNAME=`hostname 2>/dev/null || echo unknown`
>   		if [ "$repostatus" != "" ] ; then
>   			git add .
> -			HOSTNAME=`hostname 2>/dev/null || echo unknown`
>   			# porcelain output looks like "?? packages/foo/bar"
>   			# Ensure we commit metadata-revs with the first commit
>   			for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
>
Merged into OE-Core

Thanks
	Sau!

Patch

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 49f2ea5..0a5753f 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -403,9 +403,9 @@  END
 		fi
 		# Check if there are new/changed files to commit (other than metadata-revs)
 		repostatus=`git status --porcelain | grep -v " metadata-revs$"`
+		HOSTNAME=`hostname 2>/dev/null || echo unknown`
 		if [ "$repostatus" != "" ] ; then
 			git add .
-			HOSTNAME=`hostname 2>/dev/null || echo unknown`
 			# porcelain output looks like "?? packages/foo/bar"
 			# Ensure we commit metadata-revs with the first commit
 			for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do