Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 799260 - =sys-apps/portage-3.0.20-r6: dostrip -x prevents FEATURES=installsources from installing sources
Summary: =sys-apps/portage-3.0.20-r6: dostrip -x prevents FEATURES=installsources from...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 799017
  Show dependency tree
 
Reported: 2021-06-29 17:15 UTC by Sergei Trofimovich (RETIRED)
Modified: 2023-07-05 00:46 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 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-29 17:15:17 UTC
Initially observed on bug #799017 where glibc avoid stripping libpthread.so to allow gdb accessing it's internals.

Here is the minimal reproducer ebuild:

$ cat app-0.ebuild
EAPI=7

inherit flag-o-matic toolchain-funcs

IUSE="trigger-bug"
DEPEND=""
RDEPEND=${DEPEND}
SLOT=0

src_unpack() {
        mkdir "${S}" || die
        cat >>"${S}"/app-tool.c<<EOF
        int main() { return 0; }
EOF
}

src_compile() {
        tc-export CC
        append-flags -ggdb3
        emake app-tool
}

src_install() {
        dobin app-tool
        use trigger-bug && dostrip -x /usr/bin/app-tool
}


Here is the effect:

Good:

$ USE=-trigger-bug FEATURES='installsources' emerge -v1 app

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /usr/bin/app-tool
installsources: rsyncing source files
 * checking 5 files for package collisions
>>> Merging app/app-0 to /
>>> /usr/bin/app-tool
>>> /usr/src/debug/app/app-0/app-0/app-tool.c

Bad:

$ USE=trigger-bug FEATURES='installsources' emerge -v1 app

>>> Merging app/app-0 to /
--- /usr/
--- /usr/bin/
>>> /usr/bin/app-tool
>>> Safely unmerging already-installed instance...
No package files given... Grabbing a set.
<<<          obj /usr/src/debug/app/app-0/app-0/app-tool.c
<<<          obj /usr/lib/debug/usr/bin/app-tool.debug
--- replaced obj /usr/bin/app-tool

Note: app-tool.c was removed from installation. Probablya side-effect of bin/estrip implementation.