Hi,

I just realised that I totally forgot to send the nmudiff for this one, sorry. I've attached it now, hope that is ok.

Cheers Jochen
diff -Nru trscripts-1.18+nmu1/debian/changelog trscripts-1.18+nmu2/debian/changelog
--- trscripts-1.18+nmu1/debian/changelog	2021-01-07 15:01:30.000000000 +0100
+++ trscripts-1.18+nmu2/debian/changelog	2021-06-05 20:08:15.000000000 +0200
@@ -1,3 +1,12 @@
+trscripts (1.18+nmu2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Make trbdf awk script portable (Closes: #979599).
+    POSIX awk does not specify the order in a for(i in array) loop, so
+    switching to a for loop with an increment.
+
+ -- Jochen Sprickerhof <jspri...@debian.org>  Sat, 05 Jun 2021 20:08:15 +0200
+
 trscripts (1.18+nmu1) unstable; urgency=medium
 
   * Non maintainer upload by the Reproducible Builds team.
diff -Nru trscripts-1.18+nmu1/gen_trbdf trscripts-1.18+nmu2/gen_trbdf
--- trscripts-1.18+nmu1/gen_trbdf	2009-05-02 12:43:11.000000000 +0200
+++ trscripts-1.18+nmu2/gen_trbdf	2021-06-05 20:08:15.000000000 +0200
@@ -312,15 +312,15 @@
 EOF
 
 if [ "$usefb" = yes ]; then
-    printf "	split(tu[i] \" \" alt1[tu[i]] \" \" alt2[tu[i]], a);\n"
+    printf "	an = split(tu[i] \" \" alt1[tu[i]] \" \" alt2[tu[i]], a);\n"
     printf "	split(0 \" \" weight1[tu[i]] \" \" weight2[tu[i]], w);\n"
 else
-    printf "	split(tu[i] \" \" alt1[tu[i]], a);\n"
+    printf "	an = split(tu[i] \" \" alt1[tu[i]], a);\n"
     printf "	split(0 \" \" weight1[tu[i]], w);\n"
 fi
 
 cat <<"EOF"
-	for(j in a)
+	for(j=1; j <= an; ++j)
 	  {
 	    if(ut[a[j]]!="")
 	      {
@@ -339,7 +339,7 @@
 	      }
 	  }
 	k=0;
-	for(j in a)
+	for(j=1; j <= an; ++j)
 	  {
 	    if(ut[a[j]]!="")
 	      {
@@ -356,7 +356,7 @@
 	    printf "\";\n";
 	  }
 	k=0;
-	for(j in a)
+	for(j=1; j <= an; ++j)
 	  {
 	    if(ut[a[j]]!="")
 	      {

Attachment: signature.asc
Description: PGP signature

Reply via email to