Skip to content

Commit ccf2a7a

Browse files
committed
lddtree.*: Disable auto-root feature by default
It's counter-intuitive and doesn't play well with other programs that expect path arguments to work normally. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
1 parent a871611 commit ccf2a7a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

lddtree.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,12 +851,19 @@ def GetParser() -> argparse.ArgumentParser:
851851
action=_NormalizePathAction,
852852
help="Search for all files/dependencies in ROOT",
853853
)
854+
group.add_argument(
855+
"--auto-root",
856+
action="store_true",
857+
help="Automatically prefix input ELFs with ROOT",
858+
)
854859
group.add_argument(
855860
"--no-auto-root",
856861
dest="auto_root",
857862
action="store_false",
858-
default=True,
859-
help="Do not automatically prefix input ELFs with ROOT",
863+
help=argparse.SUPPRESS,
864+
)
865+
group.set_defaults(
866+
auto_root=False
860867
)
861868
group.add_argument(
862869
"-C",

lddtree.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ usage() {
1919
-a Show all duplicated dependencies
2020
-x Run with debugging
2121
-R <root> Use this ROOT filesystem tree
22-
--no-auto-root Do not automatically prefix input ELFs with ROOT
22+
--auto-root Automatically prefix input ELFs with ROOT
2323
-l Display output in a flat format
2424
-h Show this help output
2525
-V Show version information
@@ -226,7 +226,7 @@ if [[ $1 != "/../..source.lddtree" ]] ; then
226226
SHOW_ALL=false
227227
SET_X=false
228228
LIST=false
229-
AUTO_ROOT=true
229+
AUTO_ROOT=false
230230
LDD_MODE=false
231231

232232
[[ ${argv0} = *ldd ]] && LDD_MODE=true
@@ -241,6 +241,7 @@ while getopts haxVR:l-: OPT ; do
241241
l) LIST=true LDD_MODE=false;;
242242
-) # Long opts ftw.
243243
case ${OPTARG} in
244+
auto-root) AUTO_ROOT=true;;
244245
no-auto-root) AUTO_ROOT=false;;
245246
*) usage 1;;
246247
esac

0 commit comments

Comments
 (0)