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

Maxim Andersson thesilentboatman at gmail.com
Tue Aug 26 09:41:04 EDT 2014


2014-08-26 15:32 GMT+02:00 Dave Reisner <d at falconindy.com>:
> On Tue, Aug 26, 2014 at 03:15:09PM +0200, Lukas Fleischer wrote:
>> On Tue, 26 Aug 2014 at 15:11:12, Lukas Fleischer wrote:
>> > On Tue, 26 Aug 2014 at 14:52:10, Dave Reisner wrote:
>> > > [...]
>> > > Again with the lack of quoting...
>> > >
>> > >   <(printf "$PWD/%s\n" *.pkg.tar?(.+([^.])) | pacsort --files |
>> > >
>> > > I'm somewhat concerned about this because we're injecting a path into
>> > > the format string (yes, we've done this elsewhere and it's equally
>> > > concerning). Since it's pre-existing, we can probably ignore this bug
>> > > for now. Could you leave a TODO to address it, though? It's probably
>> > > sufficient to just escape % and \ chars in $PWD, but it needs testing.
>> > > [...]
>> >
>> > I did not look at the code but can't you use something like
>> >
>> >     pkgs=(*.pkg.tar?(.+([^.])))
>> >     printf "%s\n" ${file[@]/#/$PWD/} | pacsort --files | [...]
>>
>> Whoops.
>>
>>      pkgs=(*.pkg.tar?(.+([^.])))
>>      printf "%s\n" "${pkgs[@]/#/$PWD/}" | pacsort --files | [...]
>>
>
> Yes, this ought to be sufficient.
>

Another way that also works is:

  <(printf '%s\n' "$PWD"/*.pkg.tar?(.+([^.])) | pacsort --files |

is that an ok way of doing it?

>> >
>> > ...?
>> >
>> >
>> >
>>
>


More information about the pacman-dev mailing list