Wind River Support Network


LIN8-5653 : variable oldfile is used in binary_diff_rpms() in without having been set

Created: Feb 1, 2017    Updated: Dec 3, 2018
Resolved Date: Feb 8, 2017
Found In Version:
Fix Version:
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Build & Config


There is a small bug in the binary_diff_rpms function of the script: oldfile variable is not set but it is used in line 121:  

    debug "STAMP: $rpm identical to $oldfile"

which causes a confusing output like

   .. bash-4.3.30-r0.2.ppc603e.rpm identical to 

Steps to Reproduce

1. You first need a managed build project 
Follow the instruction from "Wind River Linux Toolchain and Build System User's Guide, 8.0"
2 Configuration and Build
Managed Build Project Image Workflow

2. Once the managed build environment is setup, you will get the following structure :

/wrl-8/managed-distro/my-project$ ls scripts/  projectgitignore        tmpgitignore

/wrl-8/managed-distro/my-project$ cat scripts/ |
 grep -ni oldfile
96:        oldfilewild="$name_version-r*.$arch.rpm"
100:            newest_rev=$(find "${metadir}/deploy/feed/${pkgarch}" -iname "${oldfilewild}" | \
101:                while read oldfile; do
102:                    oldfile_uc=$(echo ${oldfile##*/} | tr a-z A-Z)
103:                    oldfile_rev=${oldfile_uc#${name_version_uc}-R}
104:                    oldfile_rev=${oldfile_rev%.${arch_uc}.RPM}
105:                    debug "From $oldfile: revision '$oldfile_rev'"
106:                    oldfile_rev_split=$(echo $oldfile_rev | tr '.' ' ')
107:                    echo "$oldfile $oldfile_rev_split"
121:                debug "STAMP: $rpm identical to $oldfile"

Other Downloads

Live chat