Commit 96f71623 authored by Vitaly Lipatov's avatar Vitaly Lipatov

repl: move common code for repl_list to standalone func

parent eb764caa
......@@ -55,31 +55,38 @@ print_pkgreq()
eval_spec ${1} | grep "Requires" | sed -e "s|^.*:||g" | clean_pkgreq
}
print_pkgrepl_list()
# internal
print_replbased_list()
{
local REPLBASE=$PKGREPLBASE/pkgrepl.
# VENDOR, TARGET is defined in detect_target_env() func
local REPLBASE="$1"
# VENDOR, TARGET is already defined in detect_target_env() func
[ -z "$DISTRVERSION" ] && DISTRVERSION=`distr_vendor -v`
# Get list of replacement rules files
#[ -r "$REPLBASE$VENDOR.$DISTRVERSION" ] &&
echo -n "$REPLBASE$VENDOR.$DISTRVERSION $REPLBASE$VENDOR "
#[ -r "$REPLBASE$VENDOR" ] &&
echo -n "$REPLBASE$VENDOR "
[ "$VENDOR" != "alt" ] && echo -n "$REPLBASE$TARGET"
}
print_grprepl_list()
# TODO: list in alph. order and use if <= then our version
print_pkgrepl_list()
{
local REPLBASE=$PKGREPLBASE/../grprepl/grprepl.
print_replbased_list $PKGREPLBASE/pkgrepl.
}
# VENDOR, TARGET is defined in detect_target_env() func
[ -z "$DISTRVERSION" ] && DISTRVERSION=`distr_vendor -v`
# Get list of replacement rules files
echo -n "$REPLBASE$VENDOR.$DISTRVERSION $REPLBASE$VENDOR "
[ "$VENDOR" != "alt" ] && echo -n "$REPLBASE$TARGET"
print_grprepl_list()
{
print_replbased_list $PKGREPLBASE/../grprepl/grprepl.
}
# Prints out buildreqs in target notation for SPEC
# Prints out buildreqs in target notation for SPEC (1st arg)
print_target_buildreq()
{
local i
# Build list in target ($VENDOR) notation for package's buildreqs
for i in `print_buildreq ${1}` ; do
# get target name or just print out original one
......
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