[pacman-dev] makepkg enhancements: globstar and variable expansions in PURGE_TARGETS, MAN_DIRS, etc.

Allan McRae allan at archlinux.org
Sat Nov 14 18:46:24 EST 2009


Ciprian Dorin, Craciun wrote:
> On Sat, Nov 14, 2009 at 4:39 PM, Allan McRae <allan at archlinux.org> wrote:
>> Ciprian Dorin, Craciun wrote:
>>>    Sorry, indeed it works, but, the find invocation is still odd:
>>>
>>> ~~~~
>>> ++> printf '  -> Compressing man and info pages...\n'
>>>  -> Compressing man and info pages...
>>> ++> local manpage ext file link hardlinks hl
>>> ++> read manpage
>>> ++> find usr/man usr/info usr/share/man usr/share/info usr/local/man
>>> usr/local/info usr/local/share/man usr/local/share/info 'opt/*/man'
>>> 'opt/*/info' 'package/*/usr/man' 'package/*/usr/info'
>>> package/foobar-2.1/usr/share/man 'package/*/usr/share/info'
>>> 'package/*/usr/local/man' 'package/*/usr/local/info'
>>> 'package/*/usr/local/share/man' 'package/*/usr/local/share/info'
>>> 'package/*/opt/*/man' 'package/*/opt/*/info' usr/man usr/info
>>> usr/share/man usr/share/info usr/local/man usr/local/info
>>> usr/local/share/man usr/local/share/info 'opt/*/man' 'opt/*/info'
>>> -type f
>>> ++> '[' -f package/foobar-2.1/usr/share/man/man1/test.1 ']'
>>> ++> ext=1
>>> ++> file=test.1
>>> ++> '[' 1 '!=' gz -a 1 '!=' bz2 ']'
>>> ...
>>> ~~~~
>> You are going to have to clarify exactly what you think is odd here.
> 
> 
>     In the find arguments we can find some that have a '*' in there...
> They are clearly not valid folder names. (See below. The `...` are
> cuts from the command line.)
> 
> find ... \
>     'opt/*/man' ... \
>     'opt/*/info' 'package/*/usr/man' 'package/*/usr/info' ... \
>     'package/*/usr/share/info' ...  \
>     'package/*/usr/local/man' \
>     'package/*/usr/local/info' \
>     ...

You are allowed to use wildcards in -name arguements provided the names 
are quoted.  See "man find".

Allan


More information about the pacman-dev mailing list