Hi Marc,

Marc Espie wrote on Mon, May 09, 2016 at 04:06:06PM +0200:

> Source has been wiped out of extraneous links... looks like some ports
> could be too (just took a random sample: bzip2)
> 
> No idea whether we need some automated tool, or just @commenting out
> the extra entry in PLIST would be enough.

That looks a bit like a make-work project to me, and not a very
small one.

Right now, porters don't need to worry about this at all, and
nothing is broken.

If we recommend commenting such entries out, they must learn which
entries are needed and which are not (which is not completely
trivial: for example, a name in .Dt, .TH, or .Nm, .Fn, .Fo in NAME
or SYNOPSIS is sufficient, but .Nm, .Fn, .Fo elsewhere is not; and
rules differ for mdoc(7) and man(7)).  Then they must do the
additional maintenance work of commenting them out, again and again
for every update.

Part of the point of removing these links from the base system was
that it made stuff simpler:  thousands of lines removed from Makefiles
and thousands of lines removed from /usr/src/distrib/sets/lists/.
Less maintenance effort, fewer opportunities for bugs.

In ports, nothing gets shorter, not even the PLISTs, maintenance
effort and opportunities for bugs seem to grow rather than shrink.

Even in Xenocara, we kept the links simply to spare matthieu@ the
ordeal of tweaking third-party build systems - and i suspect stuff
in ports is even less systematic and more diverse than in Xenocara.

I'm not saying i'm strongly opposed to exploring the possibilities,
but right now, i'm not quite sure i see many benefits.

> If anything, we can probably write something that looks at packages
> and says whether there are links/extra copies that are not actually
> needed ?

The best we have for that purpose so far is makewhatis -DDt:

  schwarze@isnote $ makewhatis -DDt /usr/local/man/man1/bunzip2.1
  /usr/local/man/man1/bunzip2.1: Adding key sec=1
  /usr/local/man/man1/bunzip2.1: Adding key sec=1
  /usr/local/man/man1/bunzip2.1: Adding key arch=any
  /usr/local/man/man1/bunzip2.1: Adding name bunzip2, bits=16
  /usr/local/man/man1/bunzip2.1: Adding name bzip2, bits=6
  /usr/local/man/man1/bunzip2.1: Adding name bzip2, bits=8
  /usr/local/man/man1/bunzip2.1: Adding name bunzip2, bits=2

The "Adding name" lines - that one could grep for -
tell you that an MLINK for that name is not needed.

So, bzip2(1) is actually an excellent example.

These lines are required:

  @man man/man1/bzcat.1
  @man man/man1/bzcmp.1
  @man man/man1/bzdiff.1
  @man man/man1/bzegrep.1
  @man man/man1/bzfgrep.1
  @man man/man1/bzgrep.1
  @man man/man1/bzip2recover.1
  @man man/man1/bzless.1
  @man man/man1/bzmore.1

These two could be commented out:

  @man man/man1/bzip2.1
  @man man/man1/bunzip2.1

You think any porter would get that right?
You feel like coding magic to automate that?
You want to deal with bug reports in case it breaks?

Part of the reason stuff works so smoothly in the base system is
the high quality of base system manuals.  They just don't contain
weirdness of the kind found in bzip2(1).

Yours,
  Ingo

Reply via email to