Date: Sun, 8 Aug 2010 09:32:05 +0200 From: David DEMELIER <demelier.david@gmail.com> To: Garrett Cooper <yanefbsd@gmail.com> Cc: Freddie Cash <fjwcash@gmail.com>, freebsd-ports <freebsd-ports@freebsd.org> Subject: Re: New pkg-message[.in] guideline idea Message-ID: <AANLkTikgTCRYiLtR_iTHTagTq7Wp=jeATygpt60qd3y_@mail.gmail.com> In-Reply-To: <AANLkTimO3VSeqAvvB79YW2MnK1X5eyACtS-X7m8Zy3ad@mail.gmail.com> References: <AANLkTimAhMpVuTIj10XKW65Wl2c6zplyyjD83OO1Y-1I@mail.gmail.com> <alpine.BSF.2.00.1006231636010.22303@tiktik.epipe.com> <AANLkTikl45HPa0qPn99ywCX_TI5Y3k2xcysQc8PLW6AO@mail.gmail.com> <alpine.BSF.2.00.1006240204290.22303@tiktik.epipe.com> <AANLkTinpbHAJB1XpvOiMO5uBCvTOuLNWjEGvjiHJ8dHt@mail.gmail.com> <AANLkTikmI5oiE_NJ78uEAfHye9xfAbalzDOK7HCj451O@mail.gmail.com> <AANLkTinIibFjwufo0OcW5VsaXQ1qmUUca6u0-E6rg6Y2@mail.gmail.com> <AANLkTimO3VSeqAvvB79YW2MnK1X5eyACtS-X7m8Zy3ad@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2010/6/24 Garrett Cooper <yanefbsd@gmail.com>: > On Thu, Jun 24, 2010 at 9:43 AM, David DEMELIER > <demelier.david@gmail.com> wrote: >> 2010/6/24 Freddie Cash <fjwcash@gmail.com>: >>> On Thu, Jun 24, 2010 at 12:04 AM, David DEMELIER >>> <demelier.david@gmail.com> wrote: >>>> 2010/6/24 Janne Snabb <snabb@epipe.com>: >>>>> On Wed, 23 Jun 2010, David DEMELIER wrote: >>>>> >>>>>> 2010/6/23 Janne Snabb <snabb@epipe.com>: >>>>>>> >>>>>>> I find it completely useless and plainly stupid to edit the >>>>>>> pkg-messages of all ports to include lots of equal signs for tty-ba= sed >>>>>>> formatting purposes. >>>>>> >>>>>> We can take a long time to do that (we don't have to do it quickly), >>>>>> but it could be useful to standardize it for one reason : >>>>>> You will see that it's a message from the port maintainer/submitter >>>>>> and not from the program itself! Sometimes configure scripts stage s= ay >>>>>> some useless things to the user. >>>>> >>>>> You obviously did not get my point. >>>>> >>>>> I fully agree with you that displaying a line of equals signs on >>>>> tty based interfaces to make the messages stand out from other crap >>>>> when installing ports makes sense, but I STRONGLY oppose to the >>>>> idea of putting this visual formatting in the actual message files. >>>>> It is just not the right place to put it in. >>>>> >>>> I see, so maybe in the future you would like some tools that can print >>>> the message, like a GTK+ dialog, QT dialog, or an other tool, if it's >>>> your point I agree. I don't specially want a equal "=3D=3D" line, I wo= uld >>>> just something consistent, why not : nothing ? Yes we can just print >>>> the text without any visual characters, and the [future] tool will >>>> print the message as it want. >>> >>> No, what he's saying is: >>> =C2=A0- put the logic to print the separators into the appropriate bsd.= *.mk file >>> =C2=A0- remove all separators from all pkg-message* files >>> >>> That way, you can update the separators at any time by editing a >>> single file, instead of editing 20,000+ pkg-message files. =C2=A0And, t= hat >>> way, future tools can override the separator set in the mk file. >>> >>> Leave the pkg-message files as unformatted text. =C2=A0Put the formatti= ng >>> into the mk file. >>> >>> Separate content from style. >>> >> >> Yes, that was I said, sorry if you did not understand well :-) > > The only problem is that pushing all of this logic into bsd.*.mk only > solves half the problem: from source installations. It doesn't cover > binary installations via pkg_install. > > I think Doug and Phillip were on the right track with pushing the data > into a pkg_install consumable format, but the only problem is that > creating additional code that handles one more corner case for > @comment will serve to only slow down the plist parser unnecessarily. > That's why I was suggesting a scripting infrastructure, like so: > > pkgmsg() { > =C2=A0 =C2=A0local message=3D$1 > =C2=A0 =C2=A0pkgmsg_separator > =C2=A0 =C2=A0echo "$message" > =C2=A0 =C2=A0pkgmsg_separator > } > > Example: > > echo "This is an install message for my awesome new package > foo-<BLAH>" > +DISPLAY > pkgmsg `cat +DISPLAY` > > And considering that you almost get the functionality for free via > pkg_install (from pkg_create(8)): > > =C2=A0 =C2=A0 -D displayfile > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Display the file (by concatenat= ing it to stdout) after installing > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 the package. =C2=A0Useful for t= hings like legal notices on almost-free > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 software, etc. > > The thing about using a script function like pkgmsg too is that it can > be dynamically overwritten by certain groups in order to tailor the > messages (or mute output for customer purposes after everything has > passed QA if they use pkg_install in a product) to the meet their > needs when doing localized installations or deployments as well. > > So, why not just add the relevant bits as I described? > > Thanks, > -Garrett > I like this idea, in fact the best thing to do would be to remove any kind of decoration and just keeping the text in the pkg-message. Then we could write something like the SECURITY REPORT. So it would be something like that : =3D=3D=3D> SECURITY REPORT: This port has installed the following files which may act as network servers and may therefore pose a remote security risk to the system. /usr/local/lib/libtorrent-rasterbar.so.5 If there are vulnerabilities in these programs there may be a securit= y risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: http://www.rasterbar.com/products/libtorrent/index.html =3D=3D=3D> Message for <pkg_name_here>: Text here... =3D=3D=3D> Registering installation for <pkg_name_here> Then if the pkg-message is clean, only text and white line, the Mk/* infrastructure can write any kind of useless decoration, same for the GUI tools. --=20 Demelier David
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikgTCRYiLtR_iTHTagTq7Wp=jeATygpt60qd3y_>