[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Howto use %exclude with %doc files
- From: Jos Vos <jos xos nl>
- To: rpm-list redhat com
- Subject: Re: Howto use %exclude with %doc files
- Date: Tue, 27 Mar 2007 14:56:07 +0200
On Tue, Mar 27, 2007 at 02:45:38PM +0200, Patrick wrote:
> I was in #rpm yesterday asking how to use %exclude with %doc files and
> from the information that jasonc gave me (thanks!) it seems I'll need to
> do this manually. Just checking in to see if anyone else has any
> suggestions. Basically what I would like to do is:
>
> %files
> %doc README-*
> %exclude README-package.txt
>
> %files package
> %doc README-package.txt
>
> This does not work. Google had several examples with %exclude but they
> all use non %doc files. Does anyone know how to handle this other than
> manually listing the files in the %doc section?
The %doc arguments are directly passed as arguments to "cp -fr" or so
AFAIK, so there is no way to use %exclude there.
Try to use shell-style regexps to minimize the list. I've used this
trick in the past and it usually is doable, e.g. something like:
%files
%doc README-[a-oq-z]* README-perhaps-something-else.txt
%files package
%doc README-package.txt
P.S.
Be aware of locale-specific ordering. I think the expressions are
evaluated with LANG=C, so [a-c] does not include "B" (luckily),
while in UTF-8 locales it does.
--
-- Jos Vos <jos xos nl>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]