Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 123767 Details for
Bug 181638
freebsd emerge: chown: operation not permitted
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
install wrapper
install (text/plain), 2.08 KB, created by
Sascha Lucas
on 2007-07-03 12:40:45 UTC
(
hide
)
Description:
install wrapper
Filename:
MIME Type:
Creator:
Sascha Lucas
Created:
2007-07-03 12:40:45 UTC
Size:
2.08 KB
patch
obsolete
>#!/bin/bash > ># rational: ># A gentoo/freebsd system shares ${PORTDIR} readonly from a linux partition. ># Ebuilds using do{bin,sbin,exe,man,doc,html,info} call install (/usr/bin/install) ># also on files from ${FILESDIR}, which is readonly and in case of freebsd has the ># uchg flag set. The BSD version of install is flag-aware and keeps this flag set ># on the destination file. Later any operation like chown/chmod etc. is not ># permitted on this files. > ># solution: ># a wrapper around install should check if we are working on ${FILESDIR} and if it ># is save to remove uchg flag. > >#set -x > >INSTALL="/usr/bin/install" >source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh > >if [[ "$(uname -s)" = "FreeBSD" ]]; then > # just parse any possible option from INSTALL(1) and save original options > while getopts "bB:Ccdf:g:Mm:o:pSsv" OPTION; do > case ${OPTION} in > f) SKIP_WRAPPING=true;; > d) SKIP_WRAPPING=true;; > esac > done > if [[ "${SKIP_WRAPPING}" = "true" ]]; then > #vecho "install called with -f or -d ... skipping the wrapper" 1>&2 > eval ${INSTALL} ${@} > else > # save original options > for (( i=1; i<=$(( ${OPTIND} - 1 )); i++ )); do > ORIGINAL_OPTIONS="${ORIGINAL_OPTIONS} ${!i}" > done > # check remaining parameters (sources) if they are onyl from ${FILESDIR} > shift $(( ${OPTIND} - 1 )) > for (( i=1; i<${#}; i++ )); do > FILE_TO_CHECK=${!i} > DIR=$(dirname ${FILE_TO_CHECK}) > if [[ "${DIR}" = "${FILESDIR}" ]]; then > if find ${FILE_TO_CHECK} -flags uchg > /dev/null 2>&1; then > vecho "${FILE_TO_CHECK} with uchg flag found... removing" 1>&2 > REMOVE_UCHG_FILES="${REMOVE_UCHG_FILES} ${FILE_TO_CHECK}" > else > OTHER_FILES="${OTHER_FILES} ${FILE_TO_CHECK}" > fi > else > OTHER_FILES="${OTHER_FILES} ${FILE_TO_CHECK}" > fi > done > shift $(( ${#} - 1 )) > DESTINATION=${1} > [[ -n ${REMOVE_UCHG_FILES} ]] && eval ${INSTALL} -f nouchg ${ORIGINAL_OPTIONS} ${REMOVE_UCHG_FILES} ${DESTINATION} > [[ -n ${OTHER_FILES} ]] && eval ${INSTALL} ${ORIGINAL_OPTIONS} ${OTHER_FILES} ${DESTINATION} > fi >else > eval ${INSTALL} ${@} >fi
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 Raw
Actions:
View
Attachments on
bug 181638
:
123765
| 123767