[pacman-dev] makepkg creates bad .FILELIST

Andrew Fyfe andrew at neptune-one.net
Wed Jun 27 12:15:20 EDT 2007


Dan McGee wrote:
> On 6/27/07, Roman Kyrylych <roman.kyrylych at gmail.com> wrote:
>> 2007/6/27, Dan McGee <dpmcgee at gmail.com>:
>>> On 6/27/07, Andrew Fyfe <andrew at neptune-one.net> wrote:
>>>> Roman Kyrylych wrote:
>>>>> 2007/6/23, Andrew Fyfe <andrew at neptune-one.net>:
>>>>>> This patch[1] breaks the creation of .FILELIST, directories don't end
>>>>>> with / so pacman treats them as files and does conflict checks and bails
>>>>>> out because /usr (or any other dir) has already been installed by
>>>>>> another package.
>>>>>>
>>>>>> Posted a patch[2] to my ready_to_pull branch.
>>>>>>
>>>>>> [1]
>>>>>> http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=430a19c604e474e90451e6421448a04abe348e6d
>>>>>> [2] http://repo.or.cz/w/pacman.git?a=shortlog;h=ready_to_pull
>>>>>>
>>>>> Please remove from ready_to_pull branch and replace with:
>>>>> http://bugs.archlinux.org/task/7485#comment17443
>>>>>
>>>> Done :)
>>>>
>>>> Andrew
>>> Apparently my comment there was missed?
>>>
>>> I wasn't fixing the directory issue, I was fixing the prefix issue. We
>>> should stay with the old format and leave './' off of there. Your fix
>>> doesn't work for that, although I'm sure we can do something to fix
>>> it. We also don't want the current directory entry './'.
>>>
>> What is wrong here?
>>
>> [rk at server foobar]$ find * -exec ls -dp {} \; | sort
>> test1/
>> test1/test01
>> test1/test02
>> test1/test03
>> test2/
>> test2/.test
>>
>> I think you've got my first comment notification by e-mail, which was
>> worng (without *), then I quickly corrected it.
>>
>> BTW, Andrew, you've missed sort ;-)
>>
>> -       find * 2>/dev/null | sort >.FILELIST
>> +       find * -exec ls -dp {} \; 2>/dev/null >.FILELIST
>>
>> should be
>> +       find * -exec ls -dp {} \; 2>/dev/null | sort >.FILELIST
> 
> Did you see how slow this is, by the way? We have to fork an ls call
> for every single file in the tree. There has to be a better way. The
> only thing that ls call is doing is adding a trailing slash to
> directories. At this point, Andrew's solution is a whole lot faster,
> and it wasn't all that bad.
> 
> -Dan
> 
> _______________________________________________
> pacman-dev mailing list
> pacman-dev at archlinux.org
> http://archlinux.org/mailman/listinfo/pacman-dev


tar -cvf /dev/null *
real    0m0.043s
user    0m0.012s
sys     0m0.028s

find * -exec ls -dp {} \; 2>/dev/null
real    0m4.552s
user    0m1.648s
sys     0m2.872s

find \( -type d -printf '%P/\n' \) ,  \( ! -type d -printf '%P\n' \)
real    0m0.017s
user    0m0.012s
sys     0m0.004s

The last one suggested here 
(http://bugs.archlinux.org/task/7485#comment17450) seems to be the best, 
I've updated the patch.

Andrew




More information about the pacman-dev mailing list