Skip to content

Commit

Permalink
toolchain.eclass: drop info/dir index, bug #672408
Browse files Browse the repository at this point in the history
As explained by Zac in #672408 prepinfo() was used to drop 'info/dir'
index to allow portage regenerate it.

gcc package does not always install 'info/dir' files (USE-dependent).
This causes nondeterminism for 'info/dir' to be owned or be an orphan
file.

This change drops 'info/dir' unconditionally to avoid owned/orphan
collisions and always make it an orphan file.

Reported-by: Michal Jakubowski
Bug: https://bugs.gentoo.org/672408
Bug: https://bugs.gentoo.org/587316
Signed-off-by: Sergei Trofimovich <[email protected]>
  • Loading branch information
Sergei Trofimovich committed Dec 4, 2018
1 parent 370dace commit d266c61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eclass/toolchain.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,14 @@ toolchain_src_install() {
fi
fi
fi

# portage regenerates 'dir' files on it's own: bug #672408
# Drop 'dir' files to avoid collisions.
if [[ -f "${D}${DATAPATH}"/info/dir ]]; then
einfo "Deleting '${D}${DATAPATH}/info/dir'"
rm "${D}${DATAPATH}"/info/dir || die
fi

# prune empty dirs left behind
find "${ED}" -depth -type d -delete 2>/dev/null

Expand Down

0 comments on commit d266c61

Please sign in to comment.