]> git.ipfire.org Git - people/ric9/pakfire.git/commitdiff
scripts: Don't extract sources in the strip script any more
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Dec 2024 18:43:57 +0000 (18:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Dec 2024 18:43:57 +0000 (18:43 +0000)
This has been moved to the stripper.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/strip

index 3d82beb5a066514b5ed7017dc65c0ed3974c7e74..18e6728311f2c62bcab1044e04ab50b6ff4e40de 100644 (file)
@@ -35,30 +35,6 @@ build_id() {
        LANG=C readelf -n "${file}" | sed -n "/Build ID/ { s/.*: //p; q; }"
 }
 
-list_sources() {
-       local file="${1}"
-
-       LANG=C readelf "${file}" --debug-dump 2>/dev/null | \
-               awk '/DW_AT_name +:/{name=$NF}/DW_AT_comp_dir +:/{{if (name == "<artificial>") next}{if (name !~ /^[<\/]/) {printf "%s/", $NF}}{print name}}'
-}
-
-extract_sources() {
-       local file="${1}"
-
-       local source
-       for source in $(list_sources "${file}"); do
-               local destination="${source/${SOURCE_DIR}/${debug_source_dir}}"
-               if [ -e "${source}" -a ! -e "${destination}" ]; then
-                       mkdir -p "${destination%/*}"
-                       if ! install -m 444 -o root -g root "${source}" "${destination}"; then
-                               return 1
-                       fi
-               fi
-       done
-
-       return 0
-}
-
 process_file() {
        local file="${1}"
 
@@ -84,12 +60,6 @@ process_file() {
        local capabilities="$(getfattr --no-dereference --name="security.capability" \
                --absolute-names --dump "${file}" 2>/dev/null)"
 
-       # Extract sources
-       if ! extract_sources "${file}"; then
-               error "Could not extract sources from ${file}"
-               return 1
-       fi
-
        mkdir -p "${debug_dir}${path%/*}"
 
        # Copy all debug sections to the debug directory