dtneededsize: +SYMLINK
[massrebuild.git] / dtneededsizerpmsone
index 56e6a44..6427d91 100755 (executable)
@@ -16,12 +16,21 @@ for rpms in "$@";do
     # Ignore.
     continue
   fi
-  test -e $srcrpm.rpms || (echo >&2 "! $srcrpm.rpms";exit 1)
-  test -e $srcrpm.dt5.rpm.rpms || (echo >&2 "! $srcrpm.dt5.rpm.rpms";exit 1)
+  if [ ! -e $srcrpm.rpms ];then
+    echo >&2 "! $srcrpm.rpms"
+    continue
+  fi
+  if [ ! -e $srcrpm.dt5.rpm.rpms ];then
+    echo >&2 "! $srcrpm.dt5.rpm.rpms"
+    continue
+  fi
   if [ -e $srcrpm.dtneeded ];then
     continue
   fi
-  test ! -e $srcrpm.rpms.d || (echo >&2 "$srcrpm.rpms.d";exit 1)
+  if [ -e $srcrpm.rpms.d ];then
+    echo >&2 "! $srcrpm.rpms.d"
+    continue
+  fi
   t=/tmp/dtneededsizerpms.$$
   rm -f $t
   mkdir $srcrpm.rpms.d
@@ -74,15 +83,17 @@ for rpms in "$@";do
            exit 1
          fi
        fi
-       i2="${i#./usr/lib/debug/}"
+       i="${i#.}"
+       i2="${i#/usr/lib/debug/}"
        if [ "$i" = "$i2" ];then
-         echo >&2 "No ./usr/lib/debug/ prefix: $i"
+         echo >&2 "No /usr/lib/debug/ prefix: $i"
+         i="$i2"
+       else
+         i="/$i2"
        fi
-       i="/$i2"
        i2="$(echo "$i"|sed 's/-[^-]*-[^-]*$//')"
        if [ "$i2" = "$i" ];then
-         echo >&2" No VR suffix: $i"
-         exit 1
+         echo >&2 "No VR suffix: $i"
        fi
        i="$i2"
        echo "${i%.debug} $dwzcommonname $dwz $dt"|sed 's#^\./#/#' >>$t