[pacman-dev] [PATCH] makepkg: Set the working copy destination explicitly when cloning in extract_git

Allan McRae allan at archlinux.org
Fri Jan 23 00:13:21 UTC 2015


On 23/01/15 05:52, Lukáš Jirkovský wrote:
> This fixes the issue where if the user explicitly set the name of the cloned source
> to eg. foo.git, the directory name in $SRCDEST would be foo.git as expected, but the
> clone in $srcdir would be stripped of the .git suffix.
> 
> Signed-off-by: Lukáš Jirkovský <l.jirkovsky at gmail.com>

OK.  This looks fine for maint.

> ---
>  scripts/makepkg.sh.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 00beb76..028cc60 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -605,7 +605,7 @@ extract_git() {
>  			exit 1
>  		fi
>  		cd_safe "$srcdir"
> -	elif ! git clone "$dir"; then
> +	elif ! git clone "$dir" "${dir##*/}"; then
>  		error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git"
>  		plain "$(gettext "Aborting...")"
>  		exit 1
> 


More information about the pacman-dev mailing list