Subject: gawk as essential...

From: Yves Arrouye <[email-masked]>
Date: Thu, 6 Jun 1996 18:26:54 +0200

Since some sensible alternatives to gawk are allowed, why is it marked as
essential? If I want to install mawk or another nawk, I ought to be able
to remove gawk since I don't really want to have both installed.

I think it would be nice to have gawk and mawk (and any other nawk) providing
a virtual package nawk (if this is not already done, but it's not the case
on my system with gawk_3.0.0-2 and mawk_1.2.2-1, nor does my (maybe outdated)
virtual packages list mention an nawk package), and other packages would
depend on nawk when needed (or on a really specific gawk/mawk if they do
have special features needed).

Is gawk really essential, or can it be replaced by mawk for all its
actual uses?

Yves.

---

From: Ian Jackson <[email-masked]>
Date: Mon, 10 Jun 96 02:11 BST

> Is gawk really essential, or can it be replaced by mawk for all its

This is a good point.

If we want to make gawk nonessential in favour of mawk perhaps, we
should make sure that the base package depends on `awk' or `nawk' or
whatever the virtual package name is.

Then dselect/dpkg/&c will DTRT.

Ian.

---

From: Chris Fearnley <[email-masked]>
Date: Sun, 9 Jun 1996 04:59:52 -0400 (EDT)

"Yves Arrouye wrote:"
> to remove gawk since I don't really want to have both installed.

Hmm, interesting point.  I don't think there is any way to have a
virtual package marked as essential.  So one of the awk packages may
need to be marked essential.  Ian?

> have special features needed).

Since awk/nawk are part of base, programs can just assume that they are
there.  Hence the virtual package mechanism isn't necessary.  However,
it may be useful and/or safer (e.g., inn doesn't depend on gawk|mawk).
In fact, many packages are including explicit dependencies on base
packages (mainly libc5, ncurses3.0, perl, sysvinit and so on).  I
think this approach is safer, but Ian once explained to me that
packages should just assume that base packages are installed.

> Is gawk really essential, or can it be replaced by mawk for all its

awk is essential as there are many scripts that use it (so far noone uses
it in Debian package management scripts).  And every system administrator
who has been around the block expects awk to be there.

I plan to replace gawk with mawk in a future release (Debian 1.2).
Already mawk replaces the awk and nawk links from gawk if it is installed.
The only problem with mawk is actually a kernel bug: namely, the kernel
expects gawk to be present for the 'make dep' step.  I have edited my
kernel Makefile and mawk outperfoms gawk and produces identical output.
But Linus hasn't been persuaded by my arguments to fix this small bug.
I have asked Simon to make the Debian kernel packages support mawk
or gawk.  Once this is done (and I get a bit caught up in life :), I'll
release new versions of mawk and gawk where mawk is essential and gawk
is optional/devel (does that sound right?).  Then Bruce will have 200k
more for his bootdisks (I have replaced gawk with mawk on the boot disks
that I made using Bruce's Boot_floppies package with no ill effects).

Here is my kernel patch:

$ diff -u Makefile.old Makefile
--- Makefile.old        Mon May 13 01:14:46 1996
+++ Makefile    Mon May 13 00:57:00 1996
@@ -38,7 +38,9 @@
 NM     =$(CROSS_COMPILE)nm
 STRIP  =$(CROSS_COMPILE)strip
 MAKE   =make
-AWK    =gawk
+AWK    := $(shell if [ -x /usr/bin/awk ]; then echo awk; \
+               else if [ -x /usr/bin/mawk ]; then echo mawk; \
+               else echo gawk; fi ; fi)

-- 
Christopher J. Fearnley            |    Linux/Internet Consulting
[email-masked]                     |    UNIX SIG Leader at PACS
http://www.netaxs.com/~cjf         |    (Philadelphia Area Computer Society)
ftp://ftp.netaxs.com/people/cjf    |    Design Science Revolutionary
"Dare to be Naive" -- Bucky Fuller |    Explorer in Universe