[pacman-dev] [PATCH v2] paccache: adding the possibility for multiple cachedirs

Maxim Andersson thesilentboatman at gmail.com
Tue Aug 26 04:58:11 EDT 2014


>> +
>> +       # note that these results are returned in an arbitrary order from
> awk, but
>> +       # they'll be resorted (in summarize) iff we have a verbosity
> level set.
>> +       IFS=$'\n' read -r -d '' -a cand < \
>> +               <(printf '%s\n' *.pkg.tar?(.+([^.])) | pacsort --files |
>> +                       pkgfilter "$keep" "$scanarch" \
>> +                               "${#whitelist[*]}" "${whitelist[@]}" \
>> +                               "${#blacklist[*]}" "${blacklist[@]}")
>> +
>> +       candidates+=("${cand[@]}")
>> +       unset cand
>> +done
>
>>
>>  if (( ! ${#candidates[*]} )); then
>>         msg 'no candidate packages found for pruning'
>> --
>> 2.0.3
>>
>
> I have my doubts about how this works across multiple dirs because we rely
> on PWD being the cachedir. I'm not in a position to test this (on a phone
> hours away from home).
>

Yes, it broke. Strange that I didn't notice that when I tested it
before, I must have missed something..
I added the full path to the "candidates" to solve that problem. I
will post an updated patch.

Thanks again.

//Maxim


More information about the pacman-dev mailing list