From d5f85718c7a81667c07dc27f3b45759f67bae257 Mon Sep 17 00:00:00 2001 From: Dominika Hodovska Date: Apr 04 2017 15:44:20 +0000 Subject: Add source repo to relevand cmds, remove duplicities" --- diff --git a/brt_dep_solver.sh b/brt_dep_solver.sh index e83174a..a258b3e 100755 --- a/brt_dep_solver.sh +++ b/brt_dep_solver.sh @@ -5,6 +5,8 @@ pkg=${1} CLEAN=${CLEAN:-true} VERBOSE=${VERBOSE:-false} +REPO_F26="http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/26/Everything/x86_64/os/" +REPO_F26_SOURCE="http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/26/Everything/source/tree/" function verbose_echo { [ "$VERBOSE" != "true" ] && return @@ -47,7 +49,13 @@ function resolve-deps { # TODO: use remote path for fedora repository SRPM_FLAG= [ "${runtime}" = "true" ] || SRPM_FLAG=--srpm - dnf --disablerepo='*' --repofrompath f26,http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/26/Everything/x86_64/os/ --enablerepo=f26 repoquery $SRPM_FLAG --requires -q ${pkg} > ${pkg}-caps.txt && verbose_echo "DONE" + dnf repoquery --requires $SRPM_FLAG -q \ + --disablerepo='*' \ + --repofrompath=f26,${REPO_F26} \ + --repofrompath=f26-source,${REPO_F26_SOURCE} \ + --enablerepo=f26 \ + --enablerepo=f26-source ${pkg} > ${pkg}-caps.txt && verbose_echo "DONE" + while read cap; do if [[ $cap != *" = "* ]]; then grep -wq "^${cap}*" ${provided_caps} || echo ${cap} >> ${pkg}-filtered-caps.txt @@ -57,13 +65,18 @@ function resolve-deps { done < ${pkg}-caps.txt while read cap; do - dnf --disablerepo='*' --repofrompath f26,http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/26/Everything/x86_64/os/ --enablerepo=f26 repoquery --whatprovides "${cap}" -q --latest-limit=1 >> cap2rpm.txt + dnf repoquery -q --latest-limit=1 --srpm \ + --disablerepo='*' \ + --repofrompath f26,${REPO_F26} \ + --repofrompath=f26-source,${REPO_F26_SOURCE} \ + --enablerepo=f26 \ + --enablerepo=f26-source --whatprovides "${cap}" >> cap2rpm.txt done < ${pkg}-filtered-caps.txt if [ "$runtime" = "true" ]; then - sort -u cap2rpm.txt | sed -e "s/-[^-]*-[^-]*$//" > ../${pkg}-runtime-deps.txt + sed -e "s/-[^-]*-[^-]*$//" cap2rpm.txt | sort -u > ../${pkg}-runtime-deps.txt else - sort -u cap2rpm.txt | sed -e "s/-[^-]*-[^-]*$//" > ../${pkg}-build-deps.txt + sed -e "s/-[^-]*-[^-]*$//" cap2rpm.txt | sort -u > ../${pkg}-build-deps.txt fi cd ..