[Rpm-ecosystem] RFC #417 %optional file attribute
James Antill
james at fedoraproject.org
Mon Mar 26 16:00:46 UTC 2018
On Mon, 2018-03-26 at 12:43 +0200, Florian Festi wrote:
> Hi!
>
> We are currently pondering about #417 [1]. For adding a %optional
> file attribute that would allow adding file to to %files sections
> that may not be built under some circumstances (e.g. some
> architectures).
So the normal workarounds would be:
1. %ifarch in the files section.
2. %ghost
3. touch the file in %build so it's always there.
...I assume this would work like #1, so --verify would complain about
it (indeed you couldn't tell it wasn't a normal file at install phase)?
How about something like:
%ghost(buster) /path/foo
...and if that file exists at build time then it becomes a real file,
otherwise it's ignored (this drops the keyword problem).
On the other hand, I'm not sure it's a good idea ... generally it's
not random if the file will exist or not, so using %ifarch or %ifdef
%{_fedora} etc. is much better than just marking the file as optional.
More information about the Rpm-ecosystem
mailing list