diff options
author | 2022-03-08 07:20:42 +0000 | |
---|---|---|
committer | 2022-03-09 03:01:25 -0500 | |
commit | 6ba123b5046d9310e0e23050d736e696d2c30b98 (patch) | |
tree | d673ffc2ebc710ca2a6a74972f3b817218cb7591 | |
parent | README: attempt to fix github build status badge (diff) | |
download | pax-utils-6ba123b5046d9310e0e23050d736e696d2c30b98.tar.gz pax-utils-6ba123b5046d9310e0e23050d736e696d2c30b98.tar.bz2 pax-utils-6ba123b5046d9310e0e23050d736e696d2c30b98.zip |
lddtree: add --skip-missing
Allow explicitly ignoring missing files.
$ lddtree --root=/build/$BOARD --copy-to-tree=. --copy-non-elfs /sbin/lvm /sbin/lvmdump
lddtree: warning: /build/brya/sbin/lvm: did not match any paths
$ echo $?
1
lddtree --root=/build/$BOARD --copy-to-tree=. --copy-non-elfs --skip-missing /sbin/lvm /sbin/lvmdump
lddtree: warning: /build/brya/sbin/lvm: did not match any paths
$ echo $?
0
Signed-off-by: Jae Hoon Kim <kimjae@chromium.org>
Signed-off-by: Mike Frysinger <vapier@chromiium.org>
-rwxr-xr-x | lddtree.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -702,6 +702,9 @@ def GetParser(): parser.add_argument('--skip-non-elfs', action='store_true', default=False, help='Skip plain (non-ELF) files instead of warning') + parser.add_argument('--skip-missing', + action='store_true', default=False, + help='Skip missing files instead of failing') parser.add_argument('-V', '--version', action='version', version='lddtree by Mike Frysinger <vapier@gentoo.org>', @@ -844,7 +847,8 @@ def main(argv): _ActionCopy(options, elf) if not matched: - ret = 1 + if not options.skip_missing: + ret = 1 warn('%s: did not match any paths' % (path,)) return ret |