Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 99036 Details for
Bug 150370
$ROOT and $PORTAGE_CONFIGROOT support for etc-update
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add support to etc-update for ROOT and PORTAGE_CONFIGROOT
etc-update-root-configroot-support.diff (text/plain), 1.94 KB, created by
gent_bz
on 2006-10-07 04:04:13 UTC
(
hide
)
Description:
Add support to etc-update for ROOT and PORTAGE_CONFIGROOT
Filename:
MIME Type:
Creator:
gent_bz
Created:
2006-10-07 04:04:13 UTC
Size:
1.94 KB
patch
obsolete
>--- /usr/sbin/etc-update 2006-10-05 01:15:30.000000000 +1100 >+++ /old/usr/sbin/etc-update 2006-10-07 21:50:39.000000000 +1100 >@@ -21,7 +21,7 @@ > # item. If there's more than one of the same configuration item, > # then allow the last setting to take precedence. > local result >- result=$(cut -d'#' -f1-1 /etc/etc-update.conf | \ >+ result=$(cut -d'#' -f1-1 ${PORTAGE_CONFIGROOT}/etc/etc-update.conf | \ > sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d') > eval echo $result > } >@@ -43,6 +43,7 @@ > fi > > for path in ${CONFIG_PROTECT} ; do >+ path="${ROOT}/${path}" > find_opts="-iname ._cfg????_*" > if [ ! -d "${path}" ]; then > [ ! -f "${path}" ] && continue >@@ -59,6 +60,7 @@ > rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::") > rfile=$(echo "${file/\/\///}" | sed -e "s:^.*/::") > for mpath in ${CONFIG_PROTECT_MASK}; do >+ mpath="${ROOT}/${path}" > if [[ "${rpath}" == "${mpath}"* ]]; then > mv ${rpath}/${rfile} ${rpath}/${rfile:10} > break >@@ -187,14 +189,14 @@ > } > > function user_special() { >- if [ -r /etc/etc-update.special ]; then >+ if [ -r ${PORTAGE_CONFIGROOT}/etc/etc-update.special ]; then > if [ -z "$1" ]; then > echo "ERROR: user_special() called without arguments" > return 1 > fi > while read pat; do > echo ${1} | grep "${pat}" > /dev/null && return 0 >- done < /etc/etc-update.special >+ done < ${PORTAGE_CONFIGROOT}/etc/etc-update.special > fi > return 1 > } >@@ -434,10 +436,11 @@ > > trap die term > >-[ -w /etc ] || die "Need root priviledges for write access to /etc" 1 > >-eval $(/usr/lib/portage/bin/portageq envvar -v PORTAGE_TMPDIR CONFIG_PROTECT CONFIG_PROTECT_MASK) >+eval $(/usr/lib/portage/bin/portageq envvar -v PORTAGE_TMPDIR CONFIG_PROTECT CONFIG_PROTECT_MASK ROOT PORTAGE_CONFIGROOT) > export PORTAGE_TMPDIR >+ >+[ -w ${PORTAGE_CONFIGROOT}/etc ] || die "Need root priviledges for write access to ${PORTAGE_CONFIGROOT}/etc" 1 > #echo $PORTAGE_TMPDIR > #echo $CONFIG_PROTECT > #echo $CONFIG_PROTECT_MASK
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 150370
: 99036