Re: pkg_info message display [Re: cups-enable]

2008-12-14 Thread Marc Espie
On Sat, Dec 13, 2008 at 10:38:10AM -0700, Theo de Raadt wrote:
   .It Fl M
   Show the install-message file (if any) for each package.
  +If any step not documented in the manual must be taken before a package
  +can be used, this file will often mention it.
 
 That is an attempt to entirely push the problem under the table.
 
 The default message should be relevant.  Noone will use special
 options to go look for relevant information.  As an option, it would
 be much more realistic if -M did not EXIST.
 
 The basics + by-hand-setup information for most things is 2 lines
 long, because it points at a file.  That is what should be printed
 everytime.  Making people go dig for the important information they
 need is retarded.

Yeah, you're right, and that corresponds to what I was thinking. Giving
further messages to people such as oh, you also need to look there is
stupid.

I'm of the opinion I'm going to consider INSTALL messages as part of the
description (a part that gets shown during installation), and show them
whenever we ask for the description (unless we're in the special programmer's
mode that shows stuff in a way not suitable for humans).

That said, as we discussed already, I'm quite aware that package tools are
often too wordy, and I hope to be able to address that in the not so distant
future.

One thing people can definitely do to help is track down useless verbiage:
DESCR don't have to mention obvious things. Neither do MESSAGES. If you can
remove useless stuff, then USEFUL things will jump at the face of the user,
and that's always a good thing. ;-)



Re: pkg_info message display [Re: cups-enable]

2008-12-13 Thread Landry Breuil
On Fri, Dec 12, 2008 at 11:27:44PM -0600, Marco Peereboom wrote:
 Ted is right.  I do know about -M but I use it so frequently that I
 always have to find it in the man.  pkg_info could should be able to
 display this info like pkg_info cups.  That makes intuitive sense to me
 and I think others as well.

pkg_info displays package _information_, which is terse. pkg_info -M
displays additional information about how to use the given package, only
if it's needed, and it can be sometimes big (and when too big, separated
in a given README.OpenBSD, which pkg_info -M points to).

To me, it doesn't make any sense to display both when running pkg_info
without funky flags. I just want to know what is the given package
about. But i think sthen@'s proposal to add a message like 'This package
has additional information, view it with pkg_info -M' is the most
'user-friendly'.

Landry



Re: pkg_info message display [Re: cups-enable]

2008-12-13 Thread Marc Balmer
* Landry Breuil wrote:

[...]

 about. But i think sthen@'s proposal to add a message like 'This package
 has additional information, view it with pkg_info -M' is the most
 'user-friendly'.

Yes, I'd second that.



Re: pkg_info message display [Re: cups-enable]

2008-12-13 Thread Jacob Meuser
On Sat, Dec 13, 2008 at 10:10:26AM +0100, Landry Breuil wrote:
 On Fri, Dec 12, 2008 at 11:27:44PM -0600, Marco Peereboom wrote:
  Ted is right.  I do know about -M but I use it so frequently that I
  always have to find it in the man.  pkg_info could should be able to
  display this info like pkg_info cups.  That makes intuitive sense to me
  and I think others as well.
 
 pkg_info displays package _information_, which is terse. pkg_info -M
 displays additional information about how to use the given package, only
 if it's needed,

there are 300 MESSAGE files in ports ...

 and it can be sometimes big 

I think some is outright bloat.  take the cups MESSAGE for example:

To enable CUPS, execute '${PREFIX}/sbin/cups-enable' as root.
To disable CUPS, execute '${PREFIX}/sbin/cups-disable' as root.

To start cups at boot time, add the following to
/etc/rc.local:

if [ -x ${PREFIX}/sbin/cupsd ]; then
echo -n ' cupsd';   ${PREFIX}/sbin/cupsd
fi

Starting cupsd will overwrite /etc/printcap. A backup copy of this file
is saved as /etc/printcap.pre-cups by '${PREFIX}/sbin/cups-enable'
and will be restored when you run '${PREFIX}/sbin/cups-disable'.


is it really necessary to have an example for rc.local?  isn't it going
to be more-or-less the same for all daemons?  sometimes there are
exceptions, but shouldn't this stuff be covered in manuals?  is all
the info in these MESSAGE files really needed?

couldn't the CUPS message be shortened to something like:
Starting cupsd will overwrite /etc/printcap. CUPS has replacement
programs for some system programs.  ${PREFIX}/sbin/cups-enable
can be used to backup the current printcap and system programs.
${PREFIX}/sbin/cups-enable can be used to restore them.

 (and when too big, separated

how is too big defined?  is the above abbreviated CUPS message too
big to add to the default pkg_info output?

 in a given README.OpenBSD, which pkg_info -M points to).

how about a standard directory for README.OpenBSD files?
${PREFIX}/share/README.OpenBSD/port-x.y ?  and then move the majority
of this stuff there?  I think this would make such files much easier
to find.

of course, I'm responsible for some of these MESSAGE files.  I really
do see the noise during install/upgrade as a problem, as people
(including myself) probably don't always read it, even though
ignoring it can lead to problems ...

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: pkg_info message display [Re: cups-enable]

2008-12-13 Thread Antoine Jacoutot
On Sat, 13 Dec 2008, Jacob Meuser wrote:
 how is too big defined?  is the above abbreviated CUPS message too
 big to add to the default pkg_info output?

At one point I was told that too big = 15 lines.

 how about a standard directory for README.OpenBSD files?
 ${PREFIX}/share/README.OpenBSD/port-x.y ?  and then move the majority
 of this stuff there?  I think this would make such files much easier
 to find.

This is interesting idea actually.

 of course, I'm responsible for some of these MESSAGE files.  I really
 do see the noise during install/upgrade as a problem, as people
 (including myself) probably don't always read it, even though
 ignoring it can lead to problems ...

If pkg tools could be changed so that the spam from running @exec 
command in PLIST could be removed, it would already be an improvement. I 
understand the purpose of these warnings but I think the tools are now 
mature enough to remove the warnings and only enable them when -v is 
used for e.g.

-- 
Antoine



Re: pkg_info message display [Re: cups-enable]

2008-12-13 Thread Ingo Schwarze
Ted Unangst wrote on Fri, Dec 12, 2008 at 05:20:19PM -0500:

 Why would I know to use -M?  Because I read the man page and want to
 see the install-message file?  I already installed the damn thing,
 so obviously I don't want to see that file.

The install message is not a message explaining how to install,
but a message to read after install, in order to put the damn thing
in production.

Strangely, there is little information in the man pages
 (1) What a ports maintainer should put into pkg/MESSAGE, except for half
 a sentence in pkg_create(1), option -M: Useful for things like
 legal notices on almost-free software, etc.
 The porting checklist on the web page says little, either.
 (2) What a user might expect to find in an install message.
 In particular, this might be useful to decide whether or not
 to use -M.

I'm aware of the ongoing discussion concerning merits and problems
of +DISPLAY files (and i agree some are rather bloaty, and i share
the bad habit of heeding them little because they are so numerous),
but for the time being, it might help to tell users (like tedu@ ;-)
what to expect with the current state of affairs:


Index: pkg_info.1
===
RCS file: /cvs/src/usr.sbin/pkg_add/pkg_info.1,v
retrieving revision 1.30
diff -u -r1.30 pkg_info.1
--- pkg_info.1  26 Oct 2008 16:16:37 -  1.30
+++ pkg_info.1  13 Dec 2008 17:15:14 -
@@ -138,6 +138,8 @@
 This lets you add a special token to the start of each field.
 .It Fl M
 Show the install-message file (if any) for each package.
+If any step not documented in the manual must be taken before a package
+can be used, this file will often mention it.
 .It Fl P
 Show the pkgpath for each package.
 You can easily build a subdirlist with this.



Re: pkg_info message display [Re: cups-enable]

2008-12-13 Thread Theo de Raadt
  .It Fl M
  Show the install-message file (if any) for each package.
 +If any step not documented in the manual must be taken before a package
 +can be used, this file will often mention it.

That is an attempt to entirely push the problem under the table.

The default message should be relevant.  Noone will use special
options to go look for relevant information.  As an option, it would
be much more realistic if -M did not EXIST.

The basics + by-hand-setup information for most things is 2 lines
long, because it points at a file.  That is what should be printed
everytime.  Making people go dig for the important information they
need is retarded.

Documenting that they need to do such a ridiculous process is not
right.



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Jacob Meuser
On Fri, Dec 12, 2008 at 09:50:15AM +, Stuart Henderson wrote:
 On 2008/12/12 08:06, Marc Balmer wrote:
   
   It's also not mentioned by pkg_info as something of interest.  It
   should be, right?
  
  Your are wrong.  When you install CUPS, a message is displayed.
  That message can be redisplayed at any time using 'pkg_info -M cups'.
 
 These are too easy to miss at some point after installation.
 What does anyone think about doing something like this?

seems simple and helpful to me.

 ...
 Index: pkg_info
 ===
 RCS file: /data/cvsroot/open/anoncvs/cvs/src/usr.sbin/pkg_add/pkg_info,v
 retrieving revision 1.70
 diff -u -p -r1.70 pkg_info
 --- pkg_info  26 Oct 2008 16:16:37 -  1.70
 +++ pkg_info  12 Dec 2008 09:44:17 -
 @@ -139,6 +139,10 @@ sub print_description
   print;
   }
   close $fh;
 +
 + if (-f $dir.DISPLAY) {
 + print This package has an installation message.;
 + }
  }
  
  sub get_line
 ...
 
 I didn't put too much thought into the wording, I intend it as
 a quick diff to illustrate the discussion rather than to commit
 directly - maybe we want to also mention other things like
 UNDISPLAY, etc. Or maybe it /is/ fine just like this.
 

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



pkg_info message display [Re: cups-enable]

2008-12-12 Thread Stuart Henderson
On 2008/12/12 08:06, Marc Balmer wrote:
  
  It's also not mentioned by pkg_info as something of interest.  It
  should be, right?
 
 Your are wrong.  When you install CUPS, a message is displayed.
 That message can be redisplayed at any time using 'pkg_info -M cups'.

These are too easy to miss at some point after installation.
What does anyone think about doing something like this?

...
Index: pkg_info
===
RCS file: /data/cvsroot/open/anoncvs/cvs/src/usr.sbin/pkg_add/pkg_info,v
retrieving revision 1.70
diff -u -p -r1.70 pkg_info
--- pkg_info26 Oct 2008 16:16:37 -  1.70
+++ pkg_info12 Dec 2008 09:44:17 -
@@ -139,6 +139,10 @@ sub print_description
print;
}
close $fh;
+
+   if (-f $dir.DISPLAY) {
+   print This package has an installation message.;
+   }
 }
 
 sub get_line
...

I didn't put too much thought into the wording, I intend it as
a quick diff to illustrate the discussion rather than to commit
directly - maybe we want to also mention other things like
UNDISPLAY, etc. Or maybe it /is/ fine just like this.



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Marc Balmer
* Stuart Henderson wrote:
 On 2008/12/12 08:06, Marc Balmer wrote:
   
   It's also not mentioned by pkg_info as something of interest.  It
   should be, right?
  
  Your are wrong.  When you install CUPS, a message is displayed.
  That message can be redisplayed at any time using 'pkg_info -M cups'.
 
 These are too easy to miss at some point after installation.
 What does anyone think about doing something like this?

They obviously are...  I think we should maybe indeed have such
an indication of some sort.

 
 ...
 Index: pkg_info
 ===
 RCS file: /data/cvsroot/open/anoncvs/cvs/src/usr.sbin/pkg_add/pkg_info,v
 retrieving revision 1.70
 diff -u -p -r1.70 pkg_info
 --- pkg_info  26 Oct 2008 16:16:37 -  1.70
 +++ pkg_info  12 Dec 2008 09:44:17 -
 @@ -139,6 +139,10 @@ sub print_description
   print;
   }
   close $fh;
 +
 + if (-f $dir.DISPLAY) {
 + print This package has an installation message.;
 + }
  }
  
  sub get_line
 ...
 
 I didn't put too much thought into the wording, I intend it as
 a quick diff to illustrate the discussion rather than to commit
 directly - maybe we want to also mention other things like
 UNDISPLAY, etc. Or maybe it /is/ fine just like this.
 
-- 
Marc Balmer, Micro Systems, Wiesendamm 2a, Postfach, CH-4019 Basel, Switzerland
http://www.msys.ch/ http://www.vnode.ch/   In God we trust, in C we code.



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Marc Espie
On Fri, Dec 12, 2008 at 09:50:15AM +, Stuart Henderson wrote:
 On 2008/12/12 08:06, Marc Balmer wrote:
   
   It's also not mentioned by pkg_info as something of interest.  It
   should be, right?
  
  Your are wrong.  When you install CUPS, a message is displayed.
  That message can be redisplayed at any time using 'pkg_info -M cups'.
 
 These are too easy to miss at some point after installation.
 What does anyone think about doing something like this?

Blech

The issue is mostly to have less stuff displayed during installation, which
is not yet done, but should be.

If packages show useless messages, then they're bad.

You can always do
pkg_info -M /var/db/pkg/*
to make sure you didn't miss anything.
 

jikes' message is ways too long, btw, and not even right, since *users* will
not see it.



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Ted Unangst
On Fri, Dec 12, 2008 at 2:31 PM, Marc Espie es...@nerim.net wrote:
 These are too easy to miss at some point after installation.
 What does anyone think about doing something like this?

 Blech

 The issue is mostly to have less stuff displayed during installation, which
 is not yet done, but should be.

The problem wasn't that I missed the message during installation, it's
that I couldn't find the message 8 months later.  Now that I know
about -M, I can probably remember to use it, but it's a lot less
intuitive than plain pkg_info providing me with what I'd consider some
pretty critical information about the port.



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Jacob Meuser
On Fri, Dec 12, 2008 at 08:31:07PM +0100, Marc Espie wrote:
 On Fri, Dec 12, 2008 at 09:50:15AM +, Stuart Henderson wrote:
  On 2008/12/12 08:06, Marc Balmer wrote:

It's also not mentioned by pkg_info as something of interest.  It
should be, right?
   
   Your are wrong.  When you install CUPS, a message is displayed.
   That message can be redisplayed at any time using 'pkg_info -M cups'.
  
  These are too easy to miss at some point after installation.
  What does anyone think about doing something like this?
 
 Blech
 
 The issue is mostly to have less stuff displayed during installation, which
 is not yet done, but should be.
 
 If packages show useless messages, then they're bad.
 
 You can always do
 pkg_info -M /var/db/pkg/*
 to make sure you didn't miss anything.
  
 
 jikes' message is ways too long, btw, and not even right, since *users* will
 not see it.
 

might it be beter to just display this all by default with pkg_info,
and not at all with pkg_add, leaving pkg_add messages truely about
packaging issues instead of both packaging issues and operational
issues?

along with trimming out the useless stuff, of course.

just an idea.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Marc Espie
On Fri, Dec 12, 2008 at 04:40:23PM -0500, Ted Unangst wrote:
 On Fri, Dec 12, 2008 at 2:31 PM, Marc Espie es...@nerim.net wrote:
  These are too easy to miss at some point after installation.
  What does anyone think about doing something like this?
 
  Blech
 
  The issue is mostly to have less stuff displayed during installation, which
  is not yet done, but should be.
 
 The problem wasn't that I missed the message during installation, it's
 that I couldn't find the message 8 months later.  Now that I know
 about -M, I can probably remember to use it, but it's a lot less
 intuitive than plain pkg_info providing me with what I'd consider some
 pretty critical information about the port.

Wow.

Like, gcc tells you to use -W -Wall if you forget to mention them ?
Or sh tells you to use set -e whenever it runs a shell script ?



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Ted Unangst
On Fri, Dec 12, 2008 at 5:00 PM, Marc Espie es...@nerim.net wrote:
 Like, gcc tells you to use -W -Wall if you forget to mention them ?
 Or sh tells you to use set -e whenever it runs a shell script ?

Duh, of course not.  But why am I running pkg_info?  Because I want
*info*.  That's the whole freaking purpose of the program.  So why
does it make me beg pretty please to print some basic info?

Of all the reasons I might have to run pkg_info cups after
installation, to find out about cups-enable is the #1 reason I would
do so.

Why would I know to use -M?  Because I read the man page and want to
see the install-message file?  I already installed the damn thing,
so obviously I don't want to see that file.



Re: pkg_info message display [Re: cups-enable]

2008-12-12 Thread Marco Peereboom
Ted is right.  I do know about -M but I use it so frequently that I
always have to find it in the man.  pkg_info could should be able to
display this info like pkg_info cups.  That makes intuitive sense to me
and I think others as well.

On Fri, Dec 12, 2008 at 11:00:20PM +0100, Marc Espie wrote:
 On Fri, Dec 12, 2008 at 04:40:23PM -0500, Ted Unangst wrote:
  On Fri, Dec 12, 2008 at 2:31 PM, Marc Espie es...@nerim.net wrote:
   These are too easy to miss at some point after installation.
   What does anyone think about doing something like this?
  
   Blech
  
   The issue is mostly to have less stuff displayed during installation, 
   which
   is not yet done, but should be.
  
  The problem wasn't that I missed the message during installation, it's
  that I couldn't find the message 8 months later.  Now that I know
  about -M, I can probably remember to use it, but it's a lot less
  intuitive than plain pkg_info providing me with what I'd consider some
  pretty critical information about the port.
 
 Wow.
 
 Like, gcc tells you to use -W -Wall if you forget to mention them ?
 Or sh tells you to use set -e whenever it runs a shell script ?