Blame SOURCES/0001-populate-initrd-drop-unused-local-variable.patch

a802d9
From f31312257094b3336c38cc8bdce1ded9188d37c3 Mon Sep 17 00:00:00 2001
a802d9
From: Ray Strode <rstrode@redhat.com>
a802d9
Date: Mon, 15 Oct 2018 21:02:50 -0400
a802d9
Subject: [PATCH 1/6] populate-initrd: drop unused local variable
a802d9
a802d9
the inst_library function declares a variable `_lib`
a802d9
that's completely unused.
a802d9
a802d9
This commit removes the declaration.
a802d9
---
a802d9
 scripts/plymouth-populate-initrd.in | 2 +-
a802d9
 1 file changed, 1 insertion(+), 1 deletion(-)
a802d9
a802d9
diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in
a802d9
index e3326e9..5f3bb85 100755
a802d9
--- a/scripts/plymouth-populate-initrd.in
a802d9
+++ b/scripts/plymouth-populate-initrd.in
a802d9
@@ -141,61 +141,61 @@ inst_simple() {
a802d9
 
a802d9
 # find symlinks linked to given library file
a802d9
 # $1 = library file
a802d9
 # Function searches for symlinks by stripping version numbers appended to
a802d9
 # library filename, checks if it points to the same target and finally
a802d9
 # prints the list of symlinks to stdout.
a802d9
 #
a802d9
 # Example:
a802d9
 # rev_lib_symlinks libfoo.so.8.1
a802d9
 # output: libfoo.so.8 libfoo.so
a802d9
 # (Only if libfoo.so.8 and libfoo.so exists on host system.)
a802d9
 rev_lib_symlinks() {
a802d9
     [[ ! $1 ]] && return 0
a802d9
 
a802d9
     local fn="$1" orig="$(readlink -f "$1")" links=''
a802d9
 
a802d9
     [[ ${fn} =~ .*\.so\..* ]] || return 1
a802d9
 
a802d9
     until [[ ${fn##*.} == so ]]; do
a802d9
         fn="${fn%.*}"
a802d9
         [[ -L ${fn} && $(readlink -f "${fn}") == ${orig} ]] && links+=" ${fn}"
a802d9
     done
a802d9
 
a802d9
     echo "${links}"
a802d9
 }
a802d9
 
a802d9
 # Same as above, but specialized to handle dynamic libraries.
a802d9
 # It handles making symlinks according to how the original library
a802d9
 # is referenced.
a802d9
 inst_library() {
a802d9
-    local _src="$1" _dest=${2:-$1} _lib _reallib _symlink
a802d9
+    local _src="$1" _dest=${2:-$1} _reallib _symlink
a802d9
     strstr "$1" "/" || return 1
a802d9
     [[ -e $initdir/$_dest ]] && return 0
a802d9
     if [[ -L $_src ]]; then
a802d9
         # install checksum files also
a802d9
         if [[ -e "${_src%/*}/.${_src##*/}.hmac" ]]; then
a802d9
             inst "${_src%/*}/.${_src##*/}.hmac" "${_dest%/*}/.${_dest##*/}.hmac"
a802d9
         fi
a802d9
         _reallib=$(readlink -f "$_src")
a802d9
         inst_simple "$_reallib" "$_reallib"
a802d9
         inst_dir "${_dest%/*}"
a802d9
         [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/}
a802d9
         ln -sfn $(convert_abs_rel "${_dest}" "${_reallib}") "${initdir}/${_dest}"
a802d9
     else
a802d9
         inst_simple "$_src" "$_dest"
a802d9
     fi
a802d9
 
a802d9
     # Create additional symlinks.  See rev_symlinks description.
a802d9
     for _symlink in $(rev_lib_symlinks $_src) $(rev_lib_symlinks $_reallib); do
a802d9
         [[ ! -e $initdir/$_symlink ]] && {
a802d9
             ddebug "Creating extra symlink: $_symlink"
a802d9
             inst_symlink $_symlink
a802d9
         }
a802d9
     done
a802d9
 }
a802d9
 
a802d9
 # find a binary.  If we were not passed the full path directly,
a802d9
 # search in the usual places to find the binary.
a802d9
 find_binary() {
a802d9
     if [[ -z ${1##/*} ]]; then
a802d9
         if [[ -x $1 ]] || { strstr "$1" ".so" && ldd $1 &>/dev/null; };  then
a802d9
-- 
a802d9
2.17.1
a802d9