[pacman-dev] [PATCH] repo-add: bash implementation of realpath

Dan McGee dpmcgee at gmail.com
Sun Feb 15 22:20:21 EST 2009


On Sun, Feb 15, 2009 at 8:44 PM, Allan McRae <allan at archlinux.org> wrote:
> Dan McGee wrote:
>>
>> On Sun, Feb 15, 2009 at 9:21 AM, Yun Zheng Hu <yunzheng.hu at gmail.com>
>> wrote:
>>
>>>
>>> Replaced readlink -f / realpath with a more portable bash implementation.
>>>
>>> Signed-off-by: Yun Zheng Hu <yunzheng.hu at gmail.com>
>>> ---
>>>
>>
>> Looks good, but:
>>
>> $ git am -3 -s < /tmp/repo-add-realpath.patch
>> Applying: repo-add: bash implementation of realpath
>> error: patch failed: scripts/repo-add.sh.in:326
>> error: scripts/repo-add.sh.in: patch does not apply
>> Using index info to reconstruct a base tree...
>> error: patch failed: scripts/repo-add.sh.in:326
>> error: scripts/repo-add.sh.in: patch does not apply
>> Did you hand edit your patch?
>> It does not apply to blobs recorded in its index.
>> Cannot fall back to three-way merge.
>> Patch failed at 0001.
>> When you have resolved this problem run "git am -3 --resolved".
>> If you would prefer to skip this patch, instead run "git am -3 --skip".
>> To restore the original branch and stop patching run "git am -3 --abort".
>>
>> Can you resubmit? I'm not sure if you actually hand-edited this,
>> causing the sha1sum values to be off, but I'm curious why I've had two
>> patches fail on me tonight when applying them.
>>
>> -Dan
>
> Did anyone provide differences in speed when using the bash "realpath"  to
> the actual binary one?  My guess is that the speed difference will be
> minimal, even when regenerating an entire repo db, but it would pay to
> check.

I agree, especially after the speed differences Xavier pointed out
with my other repo-add patch.

-Dan


More information about the pacman-dev mailing list