Subject: pkg/28899: minor fixes for cdpack's cdgen.awk compatability problems
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Greg A. Woods <woods@weird.com>
List: pkgsrc-bugs
Date: 01/07/2005 22:42:01
>Number:         28899
>Category:       pkg
>Synopsis:       minor fixes for cdpack's cdgen.awk compatability problems
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 07 22:42:01 +0000 2005
>Originator:     Greg A. Woods
>Release:        NetBSD
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:

	The cdgen.awk script in the pkgtools/cdpack makes use of one
	non-portable GNU Awk feature which can trivially be changed to
	gain 100% portability and compatability with any POSIX AWK.

>How-To-Repeat:

	try running cdpack on any system with The One True AWK.

>Fix:

Index: pkgtools/cdpack/files/cdgen.awk
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/pkgtools/cdpack/files/cdgen.awk,v
retrieving revision 1.4
diff -u -r1.4 cdgen.awk
--- pkgtools/cdpack/files/cdgen.awk	5 Feb 2003 15:01:57 -0000	1.4
+++ pkgtools/cdpack/files/cdgen.awk	7 Jan 2005 22:34:21 -0000
@@ -116,7 +117,7 @@
     }
     
     
-    now = strftime("%a %b %d %H:%M:%S %Z %Y");
+    "date" | getline now;
     printf("%s starting %28s\n",prog,now);
     
@@ -406,7 +406,7 @@
 
     close(cdlist);
 
-    now = strftime("%a %b %d %H:%M:%S %Z %Y");
+    "date" | getline now;
     printf("%s finished on %28s\n",prog,now);
 
     printf("\n");