tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: awk infinite loop from maketars/getdirs
On Wed, Feb 08, 2012 at 04:01:04PM +0100, Joerg Sonnenberger wrote:
> On Wed, Feb 08, 2012 at 03:31:09PM +0100, Nicolas Joly wrote:
> > njoly@lanfeust [distrib/sets]> grep '\/\/' '/tmp/maketars.11476a/flist.comp'
> > ./usr/libdata/debug/usr/sbin//makemandb.debug
>
> Oops, sorry.
No worries. This found a bug in the toolchain to be fixed.
> > The attached patch fix this issue by making dirname() gsub call kill
> > all slashes before the name, not only the last one.
>
> Please just check for the case and bail out with error (and a proper
> diagnostics).
Indeed. Otherwise it will fail a little later in checkflist ...
What about this ?
njoly@lanfeust [distrib/sets]> /local/src/NetBSD/tool/bin/nbmake-amd64
makesetfiles
create set lists
Unsupported consecutive slashes in path:
./usr/libdata/debug/usr/sbin//makemandb.debug
*** Failed target: makesetfiles
[...]
--
Nicolas Joly
Projects and Developments in Bioinformatics
Institut Pasteur, Paris.
Index: distrib/sets/getdirs.awk
===================================================================
RCS file: /cvsroot/src/distrib/sets/getdirs.awk,v
retrieving revision 1.4
diff -u -p -r1.4 getdirs.awk
--- distrib/sets/getdirs.awk 30 Apr 2008 13:10:49 -0000 1.4
+++ distrib/sets/getdirs.awk 8 Feb 2012 15:33:48 -0000
@@ -50,6 +50,15 @@ function dirname(file) \
next
}
+# error if consecutive slashes are found
+#
+/\/\// \
+{
+ print "Unsupported consecutive slashes in path:" >"/dev/stderr"
+ print >"/dev/stderr"
+ exit 1
+}
+
# all other lines are parsed
#
{
Home |
Main Index |
Thread Index |
Old Index