Skip to content

Commit

Permalink
Move rpmlintrc handling to the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
Olf0 authored Apr 9, 2023
1 parent c47f6c9 commit d39c208
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions bin/buildrpms
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,20 @@ do
then sNVR="${sNam}*-${sVer}*-${sRel}*"
else sNVR="$p"
fi
uIco=N
if [ -n "$v" ] # Path to .rpmlintrc file exists
then
cd "$t"
if tar -xof "${t}.lnk" "$v"
then
cd "$MyPWD"/SOURCES
cp -sf "$t/$v" "$w"
cd "$MyPWD"
else
cd "$MyPWD"
printf %s "$sPre" | grep '^Source[0-9]*:.*\.rpmlintrc' && sed -i 's/\(^Source[0-9]*:.*\.rpmlintrc.*$\)/#\1/' "$t/$o"
fi
fi
uIco=N # RPM's "Icon:" tag handling
if sIco="$(printf %s "$sPre" | grep '^[[:blank:]]*Icon:' | tail -1 | cut -s -d ':' -f 2 | cut -d '#' -f 1 | tr -d '[[:blank:]]' | grep -x '[[:alnum:]][+.[:alnum:]_~^]*\.[GgXx][IiPp][FfMm]')"
then : # Icon tag with path detected, fetch the path of the last hit
elif sIco="$(printf %s "$sPre" | grep -m 1 '^#Icon:' | cut -s -d ':' -f 2 | cut -d '#' -f 1 | tr -d '[[:blank:]]' | grep -x '[[:alnum:]][+.[:alnum:]_~^]*.[GgXx][IiPp][FfMm]')"
Expand Down Expand Up @@ -389,19 +402,6 @@ do
Xrpm=""
Srpm=""
fi
if [ -n "$v" ] # Path to .rpmlintrc file exists
then
cd "$t"
if tar -xof "${t}.lnk" "$v"
then
cd "$MyPWD"/SOURCES
cp -sf "$t/$v" "$w"
cd "$MyPWD"
else
cd "$MyPWD"
printf %s "$sPre" | grep '^Source[0-9]*:.*\.rpmlintrc' && sed -i 's/\(^Source[0-9]*:.*\.rpmlintrc.*$\)/#\1/' "$t/$o"
fi
fi
case "$(printf '%s' "$Xrpm" | wc -w)_$(printf '%s' "$Srpm" | wc -w)" in
0_0)
printf '%s ' "Building RPM(s) & SRPM from archive" | tee -a "$LogFile" >&2
Expand Down

0 comments on commit d39c208

Please sign in to comment.