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

Allan McRae allan at archlinux.org
Wed Aug 15 23:12:27 EDT 2012


On 14/08/12 06:42, Gary van der Merwe wrote:
> On 13/08/2012 09:57, Allan McRae wrote:
>> 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?
> 
> I think you understood me correctly. Let me try again:
> 
> 
> code for vcs url:
> 
>         git*|hg*|svn*)
>             filename=${netfile##*/}
>             filename=${filename%%#*}
>             # fall-through
>             ;;&
> 
> code for std url:
> 
>     *)
>         # if it is just an URL, we only keep the last component
>         filename="${netfile##*/}"
>         ;;
> 
> If proto is hg*|svn*|bzr*, then the code for vcs url runs, but so does
> code for std url.
> 
> Hence the fragment is striped in the code for vcs url, but the code for
> std url overwrites the value filename value, and the end result is the
> fragment is left on.
> 
>> The svn and hg urls I tried both removed the fragment.
> 
> My experience was different. To double check myself, I have since
> created a minimal test case to check this. This is my test case and
> results: http://dpaste.com/hold/785819/
> 

Ah... crap!

My testcases all had the folder name specified before the url so I
completely missed that.

>From here it appears that git URLs can end in a "/" too, so that will
need to be modified.

Can you resend the patch with that fixed based on current master (i.e.
before your bzr patch)?

Thanks,
Allan



More information about the pacman-dev mailing list