Notes...that flash by and are gone...(was Re: any good audio/video editing apps in macports?)

Jan Stary hans at stare.cz
Wed Feb 27 00:57:51 PST 2013


On Feb 26 22:01:36, ctreleaven at cogeco.ca wrote:
> At 11:56 PM +0100 2/26/13, Chris Jones wrote:
> > > A simple "notes happened above" message would be ideal.
> >>
> >>>> Conversely, we'd be spewing twice as many messages
> >>>> if the install isn't interrupted.
> >>>
> >>> Why? If the messages were _only_ printed at the end?
> >>
> >> Why move where we're printing them when a simple "hey, scroll
> >>up" will suffice?
> >
> >Not everyone has their scroll history set to a reasonable size (in
> >fact the default is often quite small) so if a lot of ports where
> >installed, it may not even be possible to scroll up enough to see
> >them... So I don't think you can just assume this will always
> >work.

It won't.

> >I think the messages should probably be printed at the end, in one
> >place. I don't particularly care either way if they are printed as
> >well when the port in question is installed, but would tend toward
> >yes, they should.
> 
> So, my observation and proposal generated a substantial volume of discussion...
> 
> The good:  this seems to indicate that a number of people recognize
> the current situation is less-than-ideal.

Yes.

> The bad:  no clear consensus on how to improve.
> 
> For consideration:  it was a user's problem with the port kdenlive
> that prompted the discussion.  Of its 270 dependencies, 6 use Notes
> (aspell, dbus, ffmpeg, kdelibs4, hunspell and python27; thanks
> pixilla) or approximately 2%.  [1]  So, for a new user who comes
> here specifically to install kdenlive as their first--maybe
> only--port, it would be a miracle if they actually noticed ANY of
> these messages.

Yes. That is one part of the problem:

(I) The user does not even know that some of the installs
that happened above produced install messages he should read.

The second part is:

(II) Even if the user does know about the messages above,
he has no _convenient_ way to go read them:

(II.1) They are interspersed among all the other output.
     The user needs to _look_for_them_ in the other output.

(II.2) The messages exist after the install finishes in
     a. the scroll buffer of the terminal window where the install
       happened. It is suggested that the user scrolls this buffer,
       possibly back to package one. This means proper 'port install'
       functionality relies on the user's terminal window's scroll buffer
       being large enough (and it assumes the user is in a 'window'
       in the first place). That's just plain wrong.
     b. the 'notes' of the installed/updated packages.
        To see those, it requires the user to take further action
	(namely, run 'port notes' with the right package's names).
	That's also less then ideal, and some packages don't even
	use notes, they use ui_msg (which is another thing we need
	to get rid of).

The solution I propose solves all af the above:
just print all the install notes at the end of the port run,
possibly followed by a line 'read the install notes above'.

It solves (I) because it's what the user sees
when the port job finishes.

It solves (II.1) because the notes are all in one place.

As for (II.2), if the messages fit one screen, which is
the majority of cases: just read them.
If they don't fit on screen (what would be an example?),
you have to either scroll back _BUT_ scroll back the few lines
that didn't fit the screen (as opposed to scrolling back
to package 7 of 270!) or run the port job through less
or tee or whatever and see the bottom of it (as opposed
to searching for it among other output).

Another possibility is to just inform the user that
certain packages have install notes, and simply name
those packages. 25 lines should be enough for that.

For comparison, the OpenBSD package system recognizes
'install messages' that get printed at the bottom of
an install output, and 'package readmes' - longer texts
that are just mentioned to exist in /usr/local/doc/pkgname
at the bottom of the install output (example: the document
that comes with  a DB server describing how to set the DB up).


> Using a TextEdit window--for the 2% of ports needing to pass
> post-activation information to the user--would act much like the
> ReadMe window many .dmg installers finish with.

God, no. Do not _open_a_window_ to display text.
(1) It's completely unneeded.
(2) It won't work for remote installs.

> To be clear, I was
> suggesting one window containing all the notes from that install
> run. It won't happen that often but it sure highlights important
> info for new users.

That's desirable, but not via _opening_a_window_.
It's text for christsakes! Printf it out and be done with it.

> For MacPorts experts, a command line switch and/or configuration
> setting could suppress these abominations.  (Jan, please don't
> bother reiterating your opinion...you've made yourself crystal
> clear.  I'd like to hear from others.)

Ah, too late; sorry :-)
However, I believe I have only made the argument crystal clear above.

> That said, just printing all the Notes messages at the end of an
> install run would be a huge improvement.

Hooray!

> Doesn't matter if only 1
> dependency installed or everything; if a port with a Note installed,
> presumably the user needs to address that requirement.

Of course.

> [1] Also checked the rdeps for another sizable package I have
> installed: gramps.  It has 192 dependencies of which 4 use Notes;

Thanks for the example.
On my system, 'port rdeps gramps' mentions 180 rdeps,
and the sum of their install notes amounts to these 18 lines:

--- cut ---
python27 has the following notes:
To make python 2.7 the default (i.e. the version you get when you run 'python'), please run:

sudo port select --set python python27
dbus has the following notes:
############################################################################
# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
# and to cause them to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
############################################################################
aspell has the following notes:
You must install (at least) one of the language dictionaries after installing this port in order for it to work.
hunspell has the following notes:
You must install (at least) one of the language dictionaries after installing this port in order for it to work.
--- cut ---

See? Print those 18 lines out. Solved.
Don't tell me you want to launch a window
to display those 18 lines.

Looking at the original example with kdenlive:
269 rdeps, whose install notes amount to 43 lines of text.

> again about 2%.

Just to be clear: this is irrelevant. We cannot miss one.
If a single package of the 192 had two lines to say,
the user is supposed to see it. If, on the other hand,
the install notes amount to 256k of text, the user is
still supposed to see it all.



More information about the macports-users mailing list