Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58605 - ebuild.sh - dyn_preinst - removal of /usr/share logic wrong
Summary: ebuild.sh - dyn_preinst - removal of /usr/share logic wrong
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-27 18:01 UTC by Daniel Black (RETIRED)
Modified: 2004-07-31 19:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Black (RETIRED) gentoo-dev 2004-07-27 18:01:34 UTC
The following code fragment in ebuild.sh (dyn_preinst function is incorrect)

# remove share dir if unnessesary
  if hasq nodoc $FEATURES -o hasq noman $FEATURES -o hasq noinfo $FEATURES; then
    rmdir  "${IMAGE}/usr/share" &> /dev/null
fi

1. Unless I'm wrong -o is an "or" when "and" seems more logical
2. /usr/share can contain files that are not related to doc, man or info. There are generally shared configation files of a particular package.

Logic shoud be (imho) if /usr/share is empty remove it.

rmdir --ignore-fail-on-non-empty "${IMAGE}/usr/share"

maybe?
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2004-07-31 19:12:55 UTC
If the directory is empty, it is removed...

The or'ing simply prevents it from attempting to
remove it without a reason. Above that code there
are conditions to remove the subcomponents.

It's not a forced unlink.