Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 167312 Details for
Bug 239529
sys-apps/portage changed 'doins' behaviour with version 2.1.5.6 till now (2.2_rc11)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix cases where arguments are symlinks to directories
doins_sym.patch (text/plain), 1.40 KB, created by
Zac Medico
on 2008-10-05 16:10:09 UTC
(
hide
)
Description:
fix cases where arguments are symlinks to directories
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2008-10-05 16:10:09 UTC
Size:
1.40 KB
patch
obsolete
>Index: bin/doins >=================================================================== >--- bin/doins (revision 11622) >+++ bin/doins (revision 11629) >@@ -25,14 +25,17 @@ > exit 1 > fi > >+TMP=$T/.doins_tmp >+mkdir "$TMP" >+ > [[ ! -d ${D}${INSDESTTREE} ]] && dodir "${INSDESTTREE}" > > _doins() { > local mysrc="$1" mydir="$2" cleanup="" rval > > if [ -L "$mysrc" ] ; then >- cp "$mysrc" "${T}" >- mysrc="${T}/${mysrc##*/}" >+ cp "$mysrc" "$TMP" >+ mysrc="$TMP/${mysrc##*/}" > cleanup=${mysrc} > fi > >@@ -64,13 +67,30 @@ > else > pushd "${x%/*}" >/dev/null > fi >- find "${x##*/}" -type d -exec dodir "${INSDESTTREE}/{}" \; >- find "${x##*/}" \( -type f -or -type l \) -print0 | _xdoins >- popd >/dev/null >+ x=${x##*/} >+ x_orig=$x >+ # Follow any symlinks recursively until we've got >+ # a normal directory for 'find' to traverse. >+ while [ -L "$x" ] ; do >+ pushd "$(readlink "$x")" >/dev/null >+ x=${PWD##*/} >+ pushd "${PWD%/*}" >/dev/null >+ done >+ if [[ $x != $x_orig ]] ; then >+ mv "$x" "$TMP/$x_orig" >+ pushd "$TMP" >/dev/null >+ fi >+ find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \; >+ find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins >+ if [[ $x != $x_orig ]] ; then >+ popd >/dev/null >+ mv "$TMP/$x_orig" "$x" >+ fi >+ while popd >/dev/null 2>&1 ; do true ; done > ((++success)) > else > _doins "${x}" && ((++success)) > fi > done >- >+rm -rf "$TMP" > [ $success -gt 0 ] && exit 0 || exit 1
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 239529
:
167242
| 167312