Bug 475359 - %files directive doesn't support multiple -f options
Summary: %files directive doesn't support multiple -f options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-08 22:43 UTC by Sylvain Beucler
Modified: 2013-07-02 23:33 UTC (History)
5 users (show)

Fixed In Version: 4.7.1-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-18 11:25:59 UTC
Type: ---


Attachments (Terms of Use)

Description Sylvain Beucler 2008-12-08 22:43:39 UTC
Description of problem:
I'd like to specify several '-f' options to %files in a spec file.

Version-Release number of selected component (if applicable):
$ rpmbuild --version
RPM version 4.4.2.3

How reproducible:
%install
%find_lang %{name}
%find_lang %{name}-gnulib
[...]
%files engine -f %{name}.lang -f %{name}-gnulib.lang


Steps to Reproduce:
1. Create a .spec file as shown hereinbefore
2. rpmbuild -ba ./test.spec
  
Actual results:
The last '-f' option is used, the first one is ignored. As a result the specfile missed installed files:
  Erreur de construction de RPM:
    Fichier(s) installé(s) (mais non empaquetés):
   /usr/share/locale/de/LC_MESSAGES/freedink.mo
   /usr/share/locale/en@boldquot/LC_MESSAGES/freedink.mo
   /usr/share/locale/en@quot/LC_MESSAGES/freedink.mo
   /usr/share/locale/fr/LC_MESSAGES/freedink.mo

Expected results:
Both files would be be taken into account.
Or to the least, I would get an error stating that this isn't supported, to avoid spending time playing around with the syntax to no avail.

Additional info:
The work-around is pretty ugly:
  # %files only support one '-f' argument (see below)
  cat %{name}-gnulib.lang >> %{name}.lang
It sounds more intuitive to accept multiple '-f' options directly.

I asked around at #fedora-devel and the answer was either to like the work-around or file a bug - so I guess this truly is something to fix :)

Comment 1 Jeff Johnson 2008-12-09 21:57:03 UTC
While multiple -f options might be useful (to you), there is
nothing stopping you from merging the manifests generated
at the end of %install. E.g. the snippet
   cat %{name}.lang %{name}-gnulib.lang > mergedmanifest
   ...
   %files -f mergedmanifest
accomplishes your goal without having to wait for an implementation to
appear in rpm. Even if the implementation existed Right Now, it would
be years before multiple %file -f manifests were widely/reliably deployed.

Comment 2 Sylvain Beucler 2008-12-09 22:12:12 UTC
As I mentioned, I know about this work-around.
I'm currently using it since there's no choice indeed right now.

The point, however, is that it would be quite nice to fix it, either by printing an error, or actually supporting multiple '-f' option. The absence of either one made me waste time figure out what was wrong.

I'm aware that the implementation will take one Fedora release or two to reach the autobuilders, but hopefully this won't prevent fixes from being made :)

Comment 3 Bug Zapper 2009-06-09 10:10:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Panu Matilainen 2009-06-18 11:25:59 UTC
This is now tracked upstream: http://rpm.org/ticket/70

Comment 5 Fedora Update System 2009-07-24 05:16:46 UTC
rpm-4.7.1-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/rpm-4.7.1-1.fc11

Comment 6 Fedora Update System 2009-08-05 00:40:27 UTC
rpm-4.7.1-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.