`findmnt` (from sys-apps/util-linux) can be used to check mountpoints. Benefits: - No need to create temporary file(s) - More readable code Code using `ln` is preserved as fallback for systems without `findmnt`.
Created attachment 589154 [details, diff] Patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=4e5b7557ea50bc7e6b037e67ac222fb65766646d commit 4e5b7557ea50bc7e6b037e67ac222fb65766646d Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-09-06 00:59:02 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-09-06 06:53:10 +0000 gcc-config: Use findmnt for mountpoint check when available. Closes: https://bugs.gentoo.org/693588 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> gcc-config | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc51dde0d07754dd5ce1155424d730274372739f commit cc51dde0d07754dd5ce1155424d730274372739f Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-09-08 09:13:26 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-09-08 09:15:09 +0000 sys-devel/gcc-config: bump up to 2.1 - Don't cleanup /lib/libunwind.so (bug #667020) - Drop GCC_PATH reconstruction (bug #174422) - Use findmnt for mountpoint check when available (bug #693588) - drop /etc/env.d/gcc/.NATIVE symlink - drop /etc/env.d/gcc/config migration code - drop empty /etc/env.d/05gcc-${CTARGET} files - add einfo logging around library backup Bug: https://bugs.gentoo.org/667020 Bug: https://bugs.gentoo.org/174422 Bug: https://bugs.gentoo.org/693588 Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc-config/Manifest | 1 + sys-devel/gcc-config/gcc-config-2.1.ebuild | 54 +++++++++++++++++++++++++++++ sys-devel/gcc-config/gcc-config-9999.ebuild | 4 +-- 3 files changed, 57 insertions(+), 2 deletions(-)