X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=stdlib%2Ffedora.gl;h=cb518bc7ab12785b6454a0c4b7b079f32d464b59;hb=4a0f02d061d551fbf3275ca4a82f0cf94f16eee5;hp=bbc80d9697cc7418695fe788438b1ff978572724;hpb=c1b0373183f3fb4757981cb57ca163034fffdb3c;p=goals.git diff --git a/stdlib/fedora.gl b/stdlib/fedora.gl index bbc80d9..cb518bc 100644 --- a/stdlib/fedora.gl +++ b/stdlib/fedora.gl @@ -145,9 +145,15 @@ pure function fedora-source-dependencies (pkg) returning strings = @{ # list of binary packages they build, so work this out in advance. declare -A bin2src for p in %fedora-source-packages; do - for b in $(rpmspec -q --provides %fedora-dir/$p/%fedora-branch/$p.spec 2>/dev/null | awk '{print $1}'); do - bin2src[$b]=$p - done + p_specfile=%fedora-dir/$p/%fedora-branch/$p.spec + p_depcache=%fedora-dir/$p/%fedora-branch/.depcache + if ! test -f $p_depcache || test $p_specfile -nt $p_depcache; then + rm -f $p_depcache + for b in $(rpmspec -q --provides $p_specfile 2>/dev/null | awk '{print $1}'); do + echo "bin2src['$b']='$p'" >> $p_depcache + done + fi + source $p_depcache done for b in $(rpmspec -q --buildrequires $specfile 2>/dev/null |