Commit 01cea01b authored by Vitaly Lipatov's avatar Vitaly Lipatov

repl: introduce trans_rpmdeps_to_pkgname function (just converts deps list to…

repl: introduce trans_rpmdeps_to_pkgname function (just converts deps list to target), rewrite print_target_buildreq with it
parent 90eba974
...@@ -120,15 +120,25 @@ print_grprepl_list() ...@@ -120,15 +120,25 @@ print_grprepl_list()
} }
# Converts ALT Linux Sisyphus dependencies to target notation
# and print out result dependencies
# needs DISTRVENDOR, BUILDARCH, PKGFORMAT and so one
# call with package list
convert_pkgreqs_to_target()
{
local listdep=$@ TARGETPKGNAME
repl_list=$(print_pkgrepl_list)
local j
for j in $listdep; do
tolocal_anyrepl $j $repl_list && echo "$TARGETPKGNAME" || echo $j
done | sort -u
}
# Prints out buildreqs in target notation for SPEC (1st arg) # Prints out buildreqs in target notation for SPEC (1st arg)
print_target_buildreq() print_target_buildreq()
{ {
local i SPACE="" TARGETPKGNAME local listdep=$(print_buildreq ${1})
# Build list in target ($VENDOR) notation for package's buildreqs echo $(convert_pkgreqs_to_target $listdep)
for i in `print_buildreq ${1}` ; do
# get target name or just print out original one
tolocal_anyrepl $i `print_pkgrepl_list` || TARGETPKGNAME="$i"
echo -n "$SPACE${TARGETPKGNAME}"
SPACE=" "
done
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment