diff options
author | Ulrich Müller <ulm@gentoo.org> | 2013-06-17 17:25:42 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2013-06-17 17:25:42 +0200 |
commit | 6cf0931afd8a47eebd1b8f9fefe33327957c41a1 (patch) | |
tree | 759572339bb94f75950dbf580e6291932e30ac61 /libs | |
parent | Document the "unset" action in developer guide. (diff) | |
download | eselect-6cf0931afd8a47eebd1b8f9fefe33327957c41a1.tar.gz eselect-6cf0931afd8a47eebd1b8f9fefe33327957c41a1.tar.bz2 eselect-6cf0931afd8a47eebd1b8f9fefe33327957c41a1.zip |
Workaround for ARCH in prefix/linux profiles, bug 473542.
* libs/package-manager.bash.in (arch): Workaround for incorrect
definition of ARCH in prefix/linux profiles, bug 473542.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/package-manager.bash.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/package-manager.bash.in b/libs/package-manager.bash.in index 886e3b7..7cf31b5 100644 --- a/libs/package-manager.bash.in +++ b/libs/package-manager.bash.in @@ -44,6 +44,19 @@ run_paludis() { arch() { local ret=$(envvar sys-devel/gcc ARCH) + if [[ -n ${EPREFIX} && -n ${ret} && ${ret%-*} = "${ret}" ]]; then + # prefix/linux profiles lie about their ARCH + case $(envvar sys-devel/gcc KERNEL) in + linux) ret+="-linux" ;; + *) + write_warning_msg \ + "Failed to determine \${ARCH}." \ + "Please submit a bug report." + return 1 + ;; + esac + fi + # $arch will be null if there's no current make.profile symlink. # We cannot get a list of valid profiles without it. if [[ -z ${ret} ]]; then |