diff mbox

[PATCHv2,8/8] scritps/common_pkg_build: don't create pkg's if no repo

Message ID 1446238668-15200-9-git-send-email-anders.roxell@linaro.org
State Superseded
Headers show

Commit Message

Anders Roxell Oct. 30, 2015, 8:57 p.m. UTC
We shouldn't support building packages from a tarball.

Suggested-by:Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 scripts/common_pkg_build.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Maxim Uvarov Nov. 2, 2015, 7:16 a.m. UTC | #1
scritps -> scripts

On 10/30/2015 23:57, Anders Roxell wrote:
> We shouldn't support building packages from a tarball.
>
> Suggested-by:Fathi Boudra <fathi.boudra@linaro.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>   scripts/common_pkg_build.sh | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/common_pkg_build.sh b/scripts/common_pkg_build.sh
> index cf4f6e3..eefc07d 100644
> --- a/scripts/common_pkg_build.sh
> +++ b/scripts/common_pkg_build.sh
> @@ -10,7 +10,13 @@ prepare_tarball() {
>   	./configure
>   	make dist
>   
> -	version=$(cat ${ROOT_DIR}/.scmversion)
> +	if [[ -d ${ROOT_DIR}/.git ]]; then
> +		version=$(cat ${ROOT_DIR}/.scmversion)
> +	else
> +		echo "This script isn't expected to be used without"
> +		echo "a git repository."
> +		exit 1
> +	fi
>   
>   	cp ${package}-${version}.tar.gz ${package}_${version}.orig.tar.gz
>   	tar xzf ${package}_${version}.orig.tar.gz
Anders Roxell Nov. 10, 2015, 9:21 p.m. UTC | #2
On 2015-11-02 10:16, Maxim Uvarov wrote:
>  scritps -> scripts

Will fix.

Thanks,
Anders

> 
> On 10/30/2015 23:57, Anders Roxell wrote:
> >We shouldn't support building packages from a tarball.
> >
> >Suggested-by:Fathi Boudra <fathi.boudra@linaro.org>
> >Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> >---
> >  scripts/common_pkg_build.sh | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> >diff --git a/scripts/common_pkg_build.sh b/scripts/common_pkg_build.sh
> >index cf4f6e3..eefc07d 100644
> >--- a/scripts/common_pkg_build.sh
> >+++ b/scripts/common_pkg_build.sh
> >@@ -10,7 +10,13 @@ prepare_tarball() {
> >  	./configure
> >  	make dist
> >-	version=$(cat ${ROOT_DIR}/.scmversion)
> >+	if [[ -d ${ROOT_DIR}/.git ]]; then
> >+		version=$(cat ${ROOT_DIR}/.scmversion)
> >+	else
> >+		echo "This script isn't expected to be used without"
> >+		echo "a git repository."
> >+		exit 1
> >+	fi
> >  	cp ${package}-${version}.tar.gz ${package}_${version}.orig.tar.gz
> >  	tar xzf ${package}_${version}.orig.tar.gz
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/scripts/common_pkg_build.sh b/scripts/common_pkg_build.sh
index cf4f6e3..eefc07d 100644
--- a/scripts/common_pkg_build.sh
+++ b/scripts/common_pkg_build.sh
@@ -10,7 +10,13 @@  prepare_tarball() {
 	./configure
 	make dist
 
-	version=$(cat ${ROOT_DIR}/.scmversion)
+	if [[ -d ${ROOT_DIR}/.git ]]; then
+		version=$(cat ${ROOT_DIR}/.scmversion)
+	else
+		echo "This script isn't expected to be used without"
+		echo "a git repository."
+		exit 1
+	fi
 
 	cp ${package}-${version}.tar.gz ${package}_${version}.orig.tar.gz
 	tar xzf ${package}_${version}.orig.tar.gz