dtneeded*: More parallel.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 Aug 2020 09:12:42 +0000 (11:12 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 Aug 2020 09:12:42 +0000 (11:12 +0200)
dtneeded
dtneededone

index 9347947..16b1808 100755 (executable)
--- a/dtneeded
+++ b/dtneeded
@@ -6,4 +6,5 @@ set -ex
 d=$PWD/dtneeded.out
 rm -rf $d
 mkdir $d
 d=$PWD/dtneeded.out
 rm -rf $d
 mkdir $d
-parallel -j64 -l192 ./dtneededone $repos $d -- $all
+# 61970/192 = 322
+echo $all|xargs -P192 -n128 ./dtneededone $repos $d
index 023338e..f14cb58 100755 (executable)
@@ -4,23 +4,26 @@ repos=$1
 shift
 d=$1
 shift
 shift
 d=$1
 shift
+t=/tmp/dtneeded.$$
+rm -rf $t
+mkdir $t
+cd $t
+if ! dnf --disablerepo='*' --enablerepo=$repos download $@;then
+  echo $@ >>$d/error-dnf
+  exit 1
+fi
 for pkg in "$@";do
 for pkg in "$@";do
-  t=/tmp/dtneeded.$$
-  rm -rf $t
-  mkdir $t
   cd $t
   cd $t
-  if ! dnf --disablerepo='*' --enablerepo=$repos download $pkg;then
-    echo $pkg >>$d/error-dnf
-    continue
-  fi
   if ! test -e $pkg.rpm;then
     echo $pkg >>$d/error-e
     continue
   fi
   rpm2archive $pkg.rpm
   rm -f $pkg.rpm
   if ! test -e $pkg.rpm;then
     echo $pkg >>$d/error-e
     continue
   fi
   rpm2archive $pkg.rpm
   rm -f $pkg.rpm
-  tar xzf $pkg.rpm.tgz
-  rm -f $pkg.rpm.tgz
+  mkdir x
+  cd x
+  tar xzf ../$pkg.rpm.tgz
+  rm -f $../pkg.rpm.tgz
   find -type f|while read -r i;do
     llvm-readelf --dynamic-table $i >xxx 2>/dev/null || :
     if test -s xxx;then
   find -type f|while read -r i;do
     llvm-readelf --dynamic-table $i >xxx 2>/dev/null || :
     if test -s xxx;then
@@ -28,5 +31,7 @@ for pkg in "$@";do
       mv -f xxx $d/$i
     fi
   done
       mv -f xxx $d/$i
     fi
   done
-  rm -rf $t
+  cd $t
+  rm -rf x
 done
 done
+rm -rf $t