[pacman-dev] [PATCH 2/2] makepkg: Improvements to get_filename:

Allan McRae allan at archlinux.org
Mon Aug 13 03:57:56 EDT 2012


On 13/08/12 17:27, Gary van der Merwe wrote:
> * For any vcs other that git, the fall through resulted in being handled by the
>   code for std url, hence fragments were being left on.

I have tried...  but I can not parse that sentence.   Can you give an
example of what was wrong?  The svn and hg urls I tried both removed the
fragment.

> * Handle vcs urls than end in a slash correctly, eg http://example.com/project/
> ---
>  scripts/makepkg.sh.in | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 3460824..7284c12 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -236,12 +236,14 @@ get_filename() {
>  	local proto=$(get_protocol "$netfile")
>  
>  	case $proto in
> -		git*|hg*|svn*|bzr*)
> -			filename=${netfile##*/}
> -			filename=${filename%%#*}
> -			# fall-through
> -			;;&
> +		hg*|svn*|bzr*)
> +			filename=${netfile%%#*}
> +			filename=${filename%/}
> +			filename=${filename##*/}
> +			;;
>  		git*)
> +			filename=${netfile%%#*}
> +			filename=${filename##*/}
>  			filename=${filename%%.git*}
>  			;;
>  		*)
> 



More information about the pacman-dev mailing list