mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
Don't try to generate symbols for symbolic links
In our build environment, we have lots of symbolic links such as "debug/.build-id/5c/a06545ff3812557dc5fd259db4e905c5dc3484.debug" that just link to another .debug file. In our case, those links don't actually point to the right place, so we've just been seeing lots of "Binary does not exist" warnings. But it would also be undesirable to actually generate symbols for these even if their targets *did* exist. BUG=None TEST=Ran cros_generate_breakpad_symbols Change-Id: I050c349f7fefbdf922d54250379bad9b3db073d7 Reviewed-on: https://gerrit.chromium.org/gerrit/19182 Commit-Ready: Michael Krebs <mkrebs@chromium.org> Tested-by: Michael Krebs <mkrebs@chromium.org> Reviewed-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
bf41543707
commit
68da4439ff
@ -122,6 +122,14 @@ function dump_file() {
|
||||
function process_file() {
|
||||
local debug_file="$1"
|
||||
local text_file="$(get_text_for_debug ${debug_file})"
|
||||
if [ -h "${debug_file}" ]; then
|
||||
# Don't follow symbolic links. In particular, we don't want to bother
|
||||
# with the *.debug links in the "debug/.build-id/" directory.
|
||||
if [ ${FLAGS_verbose} -eq ${FLAGS_TRUE} ]; then
|
||||
info "Skipping symbolic link: ${debug_file}"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
if [ "${text_file##*.}" == "ko" ]; then
|
||||
# Skip kernel objects. We can't use their symbols and they sometimes
|
||||
# have objects with empty text sections which trigger errors in dump_sym.
|
||||
@ -175,7 +183,7 @@ function main() {
|
||||
for either_file in ${FLAGS_ARGV}; do
|
||||
either_file=${either_file#\'}
|
||||
either_file=${either_file%\'}
|
||||
if [ ! -f "${either_file}" ]; then
|
||||
if [ ! -h "${either_file}" -a ! -f "${either_file}" ]; then
|
||||
error "Specified file ${either_file} does not exist"
|
||||
ANY_ERRORS=1
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user