Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: Teach git support to use 'git describe'. (http://www.linux-archive.org/archlinux-pacman-development/607744-makepkg-teach-git-support-use-git-describe.html)

John Sumsion 12-07-2011 11:28 PM

makepkg: Teach git support to use 'git describe'.
 

Dan McGee 12-08-2011 01:25 AM

makepkg: Teach git support to use 'git describe'.
 
On Wed, Dec 7, 2011 at 6:28 PM, John Sumsion <john@sumsion.org> wrote:
> From ebecca0cd0760e3e808b5f411f336930b8ac8152 Mon Sep 17 00:00:00 2001
> From: John Sumsion <john@sumsion.org>
> Date: Sat, 3 Dec 2011 09:36:47 -0700
> Subject: [PATCH 2/3] makepkg: Teach git support to use 'git describe'.
>
> Signed-off-by: John Sumsion <john@sumsion.org>
> ---
> *scripts/makepkg.sh.in | * *3 ++-
> *1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 2a92f99..8a5eca0 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1701,7 +1701,8 @@ devel_check() {
> * * * * * * * * * * * * * * * *return 0
> * * * * * * * * * * * *fi
> * * * * * * * * * * * *msg "$(gettext "Determining latest %s revision...")" 'git'
> - * * * * * * * * * * * newpkgver=${_gitref:-$(date +%Y%m%d)}
> + * * * * * * * * * * * newpkgver=${_gitref:-origin/master}
> + * * * * * * * * * * * newpkgver=$(git describe --always ${newpkgver} | sed -e 's/-/_/g')
There is a pretty clear-cut reason we haven't and don't do this- what
repo are you describing right now? Unless your current directory is a
git checkout, this will never work. Not only that, but the location of
said git checkout is not standard, so this doesn't work for both brand
new builds and builds with an existing git checkout.

Can these problems be addressed? Definitely. However, it is going to
take more than this to do it correctly in all cases and be reasonably
compatible with the git PKGBUILDs in the wild.

> * * * * * * * *elif [[ -n ${_svntrunk} && -n ${_svnmod} ]] ; then
> * * * * * * * * * * * *if ! type -p svn >/dev/null; then
> * * * * * * * * * * * * * * * *warning "$(gettext "Cannot find the %s binary required to
> determine latest %s revision.")" "svn" "svn"
> --
> 1.7.8
>


All times are GMT. The time now is 12:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.