RPM

rpm does not create a directory when all files inside it are not installed cuz %lang

Bug #634100 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
Triaged
Low
Jeff Johnson
Fedora
Fix Released
Medium
Mandriva
Unknown
Medium

Bug Description

tracker

Tags: i18n mandriva
Revision history for this message
In , Art (art-redhat-bugs) wrote :

With the --excludedocs install option RPM-4.0 creates empty
%{name}-%{version} dirs under %{_defaultdocdir}:

rpm -i --excludedocs -vv sysvinit-2.78-1art.i686.rpm:

> D: file: /usr/share/doc/sysvinit-2.78 action: create
> D: file: /usr/share/doc/sysvinit-2.78/HISTORY action: skipnstate
> D: file: /usr/share/doc/sysvinit-2.78/Install action: skipnstate
> D: file: /usr/share/man/en/man1/last.1.bz2 action: skipnstate

There should be a 'skipnstate' instead of 'create' in the first line.

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

You're correct, this will be fixed in rpm-4.1.

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

This issue depends on whether a directory can/should have the attribute %doc.
The current
implementation of file attributes in rpm forbids directories to have either %doc
or %config
attributes because directories may contain files other than documentation (and
so should not
be excluded with --excludedocs). Identifying whether a directory has contents
other than
documentation is non-local and expensive (read: it's not just a single bit
test).

I've marked the code, but I don't believe that the implementation is justified
at this time.

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

Fixed in rpm CVS, should be in rpm-4.0.3-0.4 and later.

Jeff Johnson (n3npq)
tags: added: i18n mandriva
Changed in rpm:
importance: Undecided → Low
summary: - pm does not create a directory when all files inside it are not
+ rpm does not create a directory when all files inside it are not
installed cuz %lang
Revision history for this message
Jeff Johnson (n3npq) wrote :

RPM has never had a concept of %doc or %config applied to directories.
The attributes can only be meaningfully applied to a file, there are too many
issues enforcing rules like
    All files in a %doc directory must also be %doc

And with %config its even trickier because its not possible to
devise a semantic equivalent to a digest applied a file that
is needed to determine what action rpm performs when upgrading.

The original problem is likely related to an "orphan directory" i.e. a
directory that MUST be created because its in the path, but that
is not packaged. So when the policy for including %lang marked files
does not match an file in the orphan directory, the directory is not
lazily created when needed.

Changed in rpm:
status: New → Triaged
assignee: nobody → Jeff Johnson (n3npq)
Changed in mandriva:
status: Unknown → Confirmed
Changed in mandriva:
importance: Unknown → Medium
Changed in mandriva:
status: Confirmed → Unknown
Revision history for this message
devzero2000 (pinto-elia) wrote :

Sounds like something discussed a long time ago. Really is it still useful resubmit it?

Changed in fedora:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.