Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 586286 Details for
Bug 686350
savedconfig.eclass: Configuration file schemes with ${CTARGET} / ${CHOST} should not be used when ${CTARGET} / ${CHOST} are empty
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
savedconfig.eclass.patch (text/plain), 3.30 KB, created by
Arfrever Frehtes Taifersar Arahesis
on 2019-08-09 05:04:37 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis
Created:
2019-08-09 05:04:37 UTC
Size:
3.30 KB
patch
obsolete
>From 5abc37b1651980a008601cd818fdd4c85902e0d1 Mon Sep 17 00:00:00 2001 >From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> >Date: Fri, 9 Aug 2019 04:56:33 +0000 >Subject: [PATCH] savedconfig.eclass: Fix handling of ${CTARGET} and ${CHOST}. > >Use configuration file schemes containing ${CTARGET} / ${CHOST} >(e.g. /etc/portage/savedconfig/${CTARGET}/${CATEGORY}/${PN} or >/etc/portage/savedconfig/${CHOST}/${CATEGORY}/${PN}) only when >${CTARGET} / ${CHOST} are not empty. > >Fixes: https://bugs.gentoo.org/686350 >Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> >--- > eclass/savedconfig.eclass | 38 +++++++++++++++++++------------------- > 1 file changed, 19 insertions(+), 19 deletions(-) > >diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass >index b2be715630a..8ab42b5eed3 100644 >--- a/eclass/savedconfig.eclass >+++ b/eclass/savedconfig.eclass >@@ -1,4 +1,4 @@ >-# Copyright 1999-2019 Gentoo Authors >+# Copyright 2007-2019 Gentoo Authors > # Distributed under the terms of the GNU General Public License v2 > > # @ECLASS: savedconfig.eclass >@@ -113,24 +113,24 @@ restore_config() { > > use savedconfig || return > >- local found check checked configfile >+ local checked=() configfile found package_dependency_spec > local base=${PORTAGE_CONFIGROOT%/}/etc/portage/savedconfig >- for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do >- configfile=${base}/${CTARGET:+"${CTARGET}/"}${check} >- [[ -r ${configfile} ]] || configfile=${base}/${CHOST:+"${CHOST}/"}${check} >- [[ -r ${configfile} ]] || configfile=${base}/${check} >- [[ "${checked}" == *"${configfile} "* ]] && continue >- einfo "Checking existence of \"${configfile}\" ..." >- if [[ -r "${configfile}" ]] ; then >- einfo "Found \"${configfile}\"" >- found=${configfile} >- _SAVEDCONFIG_CONFIGURATION_FILE=${configfile#${base}/} >- break >- fi >- >- checked+="${configfile} " >+ for package_dependency_spec in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do >+ for configfile in ${CTARGET:+"${base}/${CTARGET}/${package_dependency_spec}"} \ >+ ${CHOST:+"${base}/${CHOST}/${package_dependency_spec}"} \ >+ "${base}/${package_dependency_spec}"; do >+ has "${configfile}" "${checked[@]}" && continue >+ einfo "Checking existence of \"${configfile}\" ..." >+ if [[ -r ${configfile} ]] ; then >+ einfo "Found \"${configfile}\"" >+ found=${configfile} >+ _SAVEDCONFIG_CONFIGURATION_FILE=${configfile#${base}/} >+ break 2 >+ fi >+ >+ checked+=("${configfile}") >+ done > done >- > if [[ -f ${found} ]]; then > elog "Building using saved configfile \"${found}\"" > if [ $# -gt 0 ]; then >@@ -145,13 +145,13 @@ restore_config() { > treecopy . "${dest}" || die "Failed to restore ${found} to $1" > popd > /dev/null > else >- # maybe the user is screwing around with perms they shouldnt #289168 >+ # maybe the user is screwing around with perms they shouldn't #289168 > if [[ ! -r ${base} ]] ; then > eerror "Unable to read ${base} -- please check its permissions." > die "Reading config files failed" > fi > ewarn "No saved config to restore - please remove USE=savedconfig or" >- ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT%/}/etc/portage/savedconfig/${CATEGORY}/${PN}" >+ ewarn "provide a configuration file in \"${base}/${CATEGORY}/${PN}\"" > ewarn "Your config file(s) will not be used this time" > fi > } >-- >2.22.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 686350
:
577334
| 586286