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