Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-config/
Date: Fri, 22 May 2020 13:38:28
Message-Id: 1590154668.455b48c17d7a98aa173b2260523f00a604b44ef3.slyfox@gentoo
1 commit: 455b48c17d7a98aa173b2260523f00a604b44ef3
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 22 13:37:31 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Fri May 22 13:37:48 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=455b48c1
7
8 sys-devel/binutils-config: always reregster all toolchains
9
10 New binutils-config version can affects list and positions
11 of symlinks installed. Always perform reregistration.
12
13 Package-Manager: Portage-2.3.99, Repoman-2.3.22
14 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
15
16 sys-devel/binutils-config/binutils-config-9999.ebuild | 17 +++++++----------
17 1 file changed, 7 insertions(+), 10 deletions(-)
18
19 diff --git a/sys-devel/binutils-config/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild
20 index fdc08708627..d284d9330ec 100644
21 --- a/sys-devel/binutils-config/binutils-config-9999.ebuild
22 +++ b/sys-devel/binutils-config/binutils-config-9999.ebuild
23 @@ -33,14 +33,11 @@ src_install() {
24 use prefix && eprefixify "${ED}"/usr/bin/${PN}
25 }
26
27 -pkg_preinst() {
28 - # Force a refresh when upgrading from an older version that symlinked
29 - # in all the libs & includes that binutils-libs handles. #528088
30 - if has_version "<${CATEGORY}/${PN}-5" ; then
31 - local bc current
32 - bc="${ED}/usr/bin/binutils-config"
33 - if current=$("${bc}" -c) ; then
34 - "${bc}" "${current}"
35 - fi
36 - fi
37 +pkg_postinst() {
38 + # Re-register all targets. USE flags or new versions can change
39 + # installed symlinks.
40 + local x
41 + for x in $(binutils-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
42 + binutils-config ${x}
43 + done
44 }