Re: automatically include files in %doc only if they are not empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 28 Nov 2008 11:14:29 +0100, Till Maas wrote:

> I would like to avoid breaking the build in this case. I hoped there was some 
> macro, e.g. named exclude_empty, that would allow to exclude files only if 
> they are empty. This is what I came up with:
> 
> %define exclude_empty() %(test -s %1 && echo %1)
> 
> It should then be used somehow like this:
> %files
> %doc %exclude_empty TODO
> 
> But it seems to always exclude the file.

That's because the -s check happens in %_sourcedir not $RPM_BUILD_DIR.

Constructing a %files list file in %install would require more than
one line, but there you are inside the build dir. I dunno whether
that's worth it. %doc files don't toggle between empty/not-empty so
often.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux