Fix handling of double-percent in cgmanifest check (#616)
This commit is contained in:
parent
edebc07c3e
commit
6eddfe439e
|
@ -58,11 +58,11 @@ do
|
|||
version=$(rpmspec --srpm --define "with_check 0" --qf "%{VERSION}" -q $spec 2>/dev/null )
|
||||
|
||||
# Some source files have been renamed, look for a comment and also try that (while manually substituting the name/version)
|
||||
source0alt=$(grep "^#[[:blank:]]*Source0:" $spec | awk '{print $NF}' | sed "s/%{name}/$name/g" | sed "s/%{version}/$version/g" )
|
||||
source0alt=$(grep "^#[[:blank:]]*Source0:" $spec | awk '{print $NF}' | sed "s/%\?%{name}/$name/g" | sed "s/%\?%{version}/$version/g" )
|
||||
# Some packages define a %url as well
|
||||
# Use ' ' as delimiter to avoid conflict with URL characters
|
||||
specurl=$(rpmspec --srpm --define "with_check 0" --qf "%{URL}" -q $spec 2>/dev/null )
|
||||
[[ -z specurl ]] || source0alt=$(echo $source0alt | sed "s %{url} $specurl g" )
|
||||
[[ -z specurl ]] || source0alt=$(echo $source0alt | sed "s %\?%{url} $specurl g" )
|
||||
|
||||
# Pull the current registration from the cgmanifest file. Every registration should have a url, so if we don't find one
|
||||
# that implies the registration is missing.
|
||||
|
|
Loading…
Reference in New Issue