Listing files twice and %lang behavior

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


Hello RPM list.

I've recently discovered a little quirk and would like to know what is the proper behavior and whether we can make it so if there is none.

For many times, I have used an equivalent of this:

    %lang(de) /xxx/foo/locale/de/LC_MESSAGES/
    %lang(es) /xxx/foo/locale/es/LC_MESSAGES/

It gives a warning:

  warning: File listed twice: /xxx/foo/locale/de/LC_MESSAGES/
  warning: File listed twice: /xxx/foo/locale/es/LC_MESSAGES/

But achieves the goal I need:

1) I don't have to carefully expand the directory structure of /xxx/foo/ and %dir-dance around the .mo files.
2) The files end up being marked as %lang at the end.

However, it seems that it is not always the case. I have a spec file at

That produces a list of files of this sort (hidden in %{pyproject_files}, but the file is cat'ed in %check for easier inspection).

The file list contains:

  %lang(de) /usr/lib/python3.9/site-packages/mu/locale/de_DE/LC_MESSAGES/

The warnings happen:

warning: File listed twice: /usr/lib/python3.9/site-packages/mu/locale/de_DE/LC_MESSAGES/

But the files are not marked as %lang:

  $ rpm -q --qf "[%-36{FILENAMES} %{FILELANGS}\n]" -p mu-1.0.3-6.fc34.noarch.rpm

I have not yet figured out when this happens. The order in %files apparently makes no difference.

Is this one of the "it only works by accident" cases? And if so, can we maybe support it? it is really convenient.

Miro Hrončok
Phone: +420777974800
IRC: mhroncok

Rpm-list mailing list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux