Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 739298 - econf: undocumented gnuconfig magic
Summary: econf: undocumented gnuconfig magic
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Package Manager Specification
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-27 16:56 UTC by Ulrich Müller
Modified: 2022-11-30 14:24 UTC (History)
3 users (show)

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 Ulrich Müller gentoo-dev 2020-08-27 16:56:41 UTC
econf() contains the following snippet of code:

if [ -e "${EPREFIX}"/usr/share/gnuconfig/ ]; then
    find "${WORKDIR}" -type f '(' \
    -name config.guess -o -name config.sub ')' -print0 | \
    while read -r -d $'\0' x ; do
        __vecho " * econf: updating ${x/${WORKDIR}\/} with ${EPREFIX}/usr/share/gnuconfig/${x##*/}"
        # Make sure we do this atomically incase we're run in parallel. #487478
        cp -f "${EPREFIX}"/usr/share/gnuconfig/"${x##*/}" "${x}.${pid}"
        mv -f "${x}.${pid}" "${x}"
    done
fi

This is neither mentioned in PMS nor in Portage documentation. AFAICS, it was added back in 2004 to fix an issue with uclibc:
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-src/portage/bin/ebuild.sh?r1=1.184&r2=1.185
Originally it was optional (FEATURES=autoconfig) but was made unconditional later.

Not sure how to proceed. Note that the same code exists in Pkgcore and Paludis.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-30 08:23:49 UTC
This poses a problem in cases like bug 883201 where we actually want to disable it.
Comment 2 Ulrich Müller gentoo-dev 2022-11-30 14:24:05 UTC
(In reply to Ulrich Müller from comment #0)
> This is neither mentioned in PMS nor in Portage documentation. AFAICS, it
> was added back in 2004 to fix an issue with uclibc:
> https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-src/portage/bin/ebuild.sh?r1=1.184&r2=1.185

Updated link: https://gitweb.gentoo.org/archive/proj/portage-cvs.git/commit/bin/ebuild.sh?id=4169ff3e11c5fbbc5c31d7d116a67f9308a7478c