Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 334790 Details for
Bug 450410
dev-java/maven-bin and app-eselect/eselect-java should install /usr/bin/mvnDebug symlink
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
maven.eselect.patch
maven.eselect.patch (text/plain), 2.48 KB, created by
Stefan Zwanenburg
on 2013-01-08 13:38:15 UTC
(
hide
)
Description:
maven.eselect.patch
Filename:
MIME Type:
Creator:
Stefan Zwanenburg
Created:
2013-01-08 13:38:15 UTC
Size:
2.48 KB
patch
obsolete
>--- app-admin/eselect-maven/files/maven-0.2.eselect 2010-02-28 20:31:04.000000000 +0100 >+++ app-admin/eselect-maven/files/maven-0.3.eselect 2013-01-05 17:26:26.511902394 +0100 >@@ -8,6 +8,7 @@ > VERSION="0.2" > > MVN="${EROOT}/usr/bin/mvn" >+MVNDEBUG="${EROOT}/usr/bin/mvnDebug" > > # find a list of mvn symlink targets, best first. > find_targets() { >@@ -35,11 +36,32 @@ > fi > } > >+# get a named or numbered target for the debug script. >+find_debug_target() { >+ local target=$(find_target ${1} | sed -r 's/(mvn)(-.*)/\1Debug\2/') >+ >+ if [[ -n "${target}" ]] && [[ -f "${EROOT}/usr/bin/${target}" ]] ; then >+ echo ${target} >+ else >+ die -q "Target \"${1}\" doesn't appear to be valid!" >+ fi >+} >+ > # try to remove the mvn symlink. > remove_symlink() { > rm "${MVN}" &>/dev/null > } > >+# try to remove the mvnDebug symlink. >+remove_debug_symlink() { >+ rm "${MVNDEBUG}" &>/dev/null >+} >+ >+# try to remove the mvn symlink. >+remove_symlinks() { >+ remove_symlink && remove_debug_symlink >+} >+ > # determine the current target. > get_target() { > local canonicalised=$(canonicalise "${MVN}") >@@ -53,6 +75,13 @@ > ln -s "${target}" "${MVN}" || die "Couldn't set ${target} symlink." > } > >+# set the Maven debug (mvnDebug) symlink. >+set_debug_symlink() { >+ local target=$(find_debug_target "${1}") >+ remove_debug_symlink >+ ln -s "${target}" "${MVNDEBUG}" || die "Couldn't set ${target} symlink." >+} >+ > ### show action ### > > describe_show() { >@@ -122,16 +151,12 @@ > > if [[ -z "${target}" ]] ; then > die -q "You didn't give me a target name or number." >- elif [[ -L "${MVN}" ]] ; then >- if ! remove_symlink ; then >- die -q "Can't remove existing Maven provider." >- elif ! set_symlink "${1}" ; then >- die -q "Can't set new Maven provider." >- fi >- elif [[ -e "${MVN}" ]] ; then >+ elif [[ -e "${MVN}" && ! -L "${MVN}" ]] ; then > write_warning_msg "Can't set a new Maven provider. There's a file in the way at ${MVN}. You can try removing it manually, and then re-running this command." >- else >- set_symlink "${target}" || die -q "Wasn't able to set a new provider." >+ elif [[ -e "${MVNDEBUG}" && ! -L "${MVNDEBUG}" ]] ; then >+ write_warning_msg "Can't set a new Maven provider. There's a file in the way at ${MVNDEBUG}. You can try removing it manually, and then re-running this command." >+ elif ! set_symlink "${target}" || ! set_debug_symlink "${target}" ; then >+ die -q "Wasn't able to set a new provider." > fi > } > >@@ -156,7 +181,7 @@ > > # For pkg_postrm > if [[ ! $(find_targets) ]]; then >- remove_symlink >+ remove_symlinks > return > 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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 450410
:
334536
|
334538
|
334540
|
334542
|
334546
|
334788
| 334790 |
334792
|
334794
|
334796
|
335188
|
335190
|
335192