Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 398295 - stage3-amd64-20120105 has PAGER=/usr/bin/less set but sys-apps/less not installed
Summary: stage3-amd64-20120105 has PAGER=/usr/bin/less set but sys-apps/less not insta...
Status: CONFIRMED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Stages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords: QAcanfix
: 398341 398343 398503 401643 406115 407119 (view as bug list)
Depends on: 393445
Blocks:
  Show dependency tree
 
Reported: 2012-01-09 21:06 UTC by Ben Kohler
Modified: 2024-03-03 22:10 UTC (History)
18 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix stage3 default PAGER variable (default-pager.patch,463 bytes, patch)
2012-01-18 15:47 UTC, rcold
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2012-01-09 21:06:31 UTC
I understand the recent change to virtual/pager has made util-linux[ncurses] satisfy the system dep, so sys-apps/less is not "needed".  But it's still active as the default pager on this week's amd64 stage3.  Not sure of the best fix here, but setting /bin/more as the default pager would be one way to go.

Reproducible: Always

Steps to Reproduce:
1. download stage3-amd64-20120105.tar.bz2
2. unpack, chroot
3. $PAGER sometextfile
Actual Results:  
bash: /usr/bin/less: No such file or directory

Expected Results:  
working pager
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2012-01-10 11:44:10 UTC
*** Bug 398341 has been marked as a duplicate of this bug. ***
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2012-01-10 11:44:35 UTC
*** Bug 398343 has been marked as a duplicate of this bug. ***
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2012-01-10 11:50:36 UTC
Looks to be a bug in the eselect package as per:

$ qfile pager.eselect
app-admin/eselect (/usr/share/eselect/modules/pager.eselect)

$ cat /etc/env.d/99pager 
# Configuration file for eselect
# This file has been automatically generated.
PAGER="/usr/bin/less"
Comment 4 Ulrich Müller gentoo-dev 2012-01-10 13:10:29 UTC
(In reply to comment #3)
> Looks to be a bug in the eselect package as per:
> 
> $ qfile pager.eselect
> app-admin/eselect (/usr/share/eselect/modules/pager.eselect)
> 
> $ cat /etc/env.d/99pager 
> # Configuration file for eselect
> # This file has been automatically generated.
> PAGER="/usr/bin/less"

This I will only believe if you show me how to set PAGER as above without /usr/bin/less being present. ;-)

Actually, the pager.eselect module will refuse to set the variable to a path that doesn't exist. So you can get such a result only by first setting PAGER and later removing /usr/bin/less.

Reassigning to release team.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-01-10 13:28:06 UTC
Maybe sys-apps/less is removed during a depclean.
Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2012-01-10 13:38:33 UTC
(In reply to comment #5)
> Maybe sys-apps/less is removed during a depclean.

It is removed by portage as sys-apps/util-linux[ncurses] satisfies the virtual/pager requirement.
I've talked to Mike and will add less to the system set after completing some tests.
Comment 7 Ulrich Müller gentoo-dev 2012-01-11 18:05:24 UTC
*** Bug 398503 has been marked as a duplicate of this bug. ***
Comment 8 John R. Graham gentoo-dev 2012-01-12 16:08:38 UTC
Note that, as you might expect, this bug appears to affect *all* the stages, not just amd64.
Comment 9 rcold 2012-01-18 15:47:33 UTC
Created attachment 299245 [details, diff]
Fix stage3 default PAGER variable

Gentoo stage3-amd64-20120105 tarball uses /usr/bin/less as default pager, but  less was not installed.

Formerly @system set depended on less, it doesn't matter use less as default pager. But it doesn't now. This is the cause of the bug.

If you want to use less, you should emerge it and run:
$ eselect pager set less
$ . /etc/profile
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-01-31 15:25:11 UTC
*** Bug 401643 has been marked as a duplicate of this bug. ***
Comment 11 Olliver Schinagl 2012-02-07 11:14:05 UTC
While working on a new install, I've ran into this aswell, no less available and trying to eselect pager list causes a fatal error.

Adding and removing less brings up a proper list of available pagers (more and free form).

I don't think less was ever installed, since I'm using git to track my /etc and checked in the stage3 tarball. env.d/70less was never in there. Also, and I don't know when, less was entirly removed or if it was ever installed.
Comment 12 Ben Kohler gentoo-dev 2012-02-07 15:14:52 UTC
You did not remove/depclean it, depclean is run as one of the final steps of stage3 (auto)builds, and it's removed there.
Comment 13 Ulrich Müller gentoo-dev 2012-02-07 17:43:47 UTC
(In reply to comment #11)
> While working on a new install, I've ran into this aswell, no less available
> and trying to eselect pager list causes a fatal error.

Even if there's no pager available, there shouldn't be a fatal error, but eselect should still display the "free form" entry.

Do you remember what has the exact error message?
Comment 14 Ulrich Müller gentoo-dev 2012-02-07 17:45:03 UTC
(In reply to comment #13)
> Do you remember what has the exact error message?

This should read of course:
... what *was* the exact error message?
Comment 15 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-02-09 17:36:18 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Maybe sys-apps/less is removed during a depclean.
> 
> It is removed by portage as sys-apps/util-linux[ncurses] satisfies the
> virtual/pager requirement.
> I've talked to Mike and will add less to the system set after completing some
> tests.

ping. Sounds trivial to me, let's pull the trigger on this one.
Comment 16 Ulrich Müller gentoo-dev 2012-02-09 23:09:19 UTC
I don't understand why virtual/pager should be treated differently from virtual/editor. We don't have nano in the system profile, so why should we have less?
Comment 17 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-02-09 23:19:06 UTC
(In reply to comment #16)
> I don't understand why virtual/pager should be treated differently from
> virtual/editor. We don't have nano in the system profile, so why should we have
> less?

virtual/editor doesn't have one of its RDEPEND in @system so you can actually adjust the 'default' that virtual/editor provides.

Since sys-apps/util-linux[ncurses] is in the RDEPEND of virtual/pager, you don't get a choice to set the 'default' - So, yes.. "/bin/more" is a valid PAGER, but not very useful given the popularity of /usr/bin/less

So, do we sacrifice a good first user experience for technical correctness or do we just install less?
Comment 18 Ben Kohler gentoo-dev 2012-02-09 23:26:34 UTC
Honestly I would prefer that util-linux[more] just be dropped from virtual/pager's list, would it even affect that many people (negatively)?

Or if there is a way that a positive action is required to allow util-linux[more] to satisfy the virtual, otherwise have it not even be considered.  I suppose a USE flag here would be a dirty no-no?
Comment 19 Ulrich Müller gentoo-dev 2012-02-09 23:55:40 UTC
(In reply to comment #18)
> Honestly I would prefer that util-linux[more] just be dropped from
> virtual/pager's list, would it even affect that many people (negatively)?

more is a valid pager (even the POSIX default) so there's no reason for dropping it from the virtual.

A user who specifically wants less can always add it to the world file. There's no need to impose it upon everybody.

(In reply to comment #17)
> So, do we sacrifice a good first user experience for technical correctness or
> do we just install less?

I'd much prefer the technically correct solution. Also I trust our users to be intelligent enough that they can handle it. ;-)
Comment 20 Ben Kohler gentoo-dev 2012-02-10 00:20:16 UTC
But it's basically an accident that "more" is now included in @system by util-linux, and satisfying the virtual.  If some package in @system started providing "ed", would you be in favor of dropping nano from stage3 and telling new users to use "ed"?  It would be "technically correct".

The previous (borderline antagonistic, sorry!) paragraph aside-- either way some action is needed here.  If you really think "more" is a suitable default pager, let's activate it as the default.
Comment 21 Ulrich Müller gentoo-dev 2012-02-10 07:39:50 UTC
IMHO, there's nothing wrong with including nano and less in stage3. However, they shouldn't be included in the system set.
Comment 22 Ben Kohler gentoo-dev 2012-02-14 20:34:41 UTC
I've been thinking about this, and the $EDITOR part too.  Just now in #gentoo someone let depclean remove their nano, so we checked "portageq expand_virtual / virtual/editor" and sure enough a random pacakge had pulled sys-apps/ed and that was now satisfying the virtual

It seems to me like the handbook needs to start making sure users have their preferred editor & pager in world.  Just assuming that the default-installed nano & less will remain the "preferred" one (according to portage & the virtuals' deps) until the user picks a new one, is not going to work.
Comment 23 avx 2012-02-22 12:39:23 UTC
Bug still active?

Currently doing an installation with the latest autobuild, problem with less is still existant - found out about it while I wanted to read a manpage.

There's no 99pager or something in env.d, but it's still set by default in profile
--snip--
# grep -i pager /etc/profile
export PAGER=${PAGER:-/usr/bin/less}
--snap--
Comment 24 Mike Doty (RETIRED) gentoo-dev 2012-02-26 20:50:08 UTC
(In reply to comment #21)
> IMHO, there's nothing wrong with including nano and less in stage3. However,
> they shouldn't be included in the system set.

seconded.
Comment 25 Mike Doty (RETIRED) gentoo-dev 2012-02-26 20:59:19 UTC
Also, it's absurd that we've let this bug sit and have been pushing broken stages for nearly 2 months while discussing the "right" way to fix it.  User experience, especially during install phase, trumps technical correctness in this context.

Just push the fix so we can push good stages out and then debate how to fix it properly.
Comment 26 Mike Doty (RETIRED) gentoo-dev 2012-02-26 21:23:07 UTC
(In reply to comment #25)
> Also, it's absurd that we've let this bug sit and have been pushing broken
> stages for nearly 2 months while discussing the "right" way to fix it.  User
> experience, especially during install phase, trumps technical correctness in
> this context.
> 
> Just push the fix so we can push good stages out and then debate how to fix it
> properly.

sys-apps/less put in base/packages until this bug is resolved properly.
Comment 27 Duncan 2012-02-28 11:39:17 UTC
*** Bug 406115 has been marked as a duplicate of this bug. ***
Comment 28 C W Rose 2012-03-02 18:43:28 UTC
A word of warning to whoever provides the fix - /bin/more
has problems formatting some man pages, though the actual
cause may be the man macros.  /usr/bin/less is fine.

Will
Comment 29 Paweł Rumian 2012-03-06 14:45:58 UTC
*** Bug 407119 has been marked as a duplicate of this bug. ***
Comment 30 Paweł Rumian 2012-03-06 14:55:03 UTC
I just want to add that from user's point of view it seems kinda weird.

I use most as PAGER, but I am 'forced' to have two more pagers installed (less and more from util-linux[ncurses]). TBH it feels more like Ubuntu-way than Gentoo-way...
Comment 31 Ulrich Müller gentoo-dev 2012-03-06 16:39:18 UTC
(In reply to comment #30)
> I use most as PAGER, but I am 'forced' to have two more pagers installed
> (less and more from util-linux[ncurses]).

I tend to remove that hack from base/packages again, before we get even more duplicate bugs. IMHO the cure is worse than the desease here.
Comment 32 Ben Kohler gentoo-dev 2012-03-06 16:51:20 UTC
> I just want to add that from user's point of view it seems kinda weird.
> 
> I use most as PAGER, but I am 'forced' to have two more pagers installed
> (less and more from util-linux[ncurses]). TBH it feels more like Ubuntu-way
> than Gentoo-way...

This is just a temporary fix, so we can ship non-broken stage3's.  I can see that this negatively affects existing/experienced users (with an extra half-MB package) but it's helping fix a glaring issue for new users.

I believe this is the correct fix UNTIL it's fixed in some other way.  Adding a handbook section for installing/activating a pager during install would be another option.
Comment 33 Mike Doty (RETIRED) gentoo-dev 2012-03-06 17:07:36 UTC
(In reply to comment #31)
> (In reply to comment #30)
> > I use most as PAGER, but I am 'forced' to have two more pagers installed
> > (less and more from util-linux[ncurses]).
> 
> I tend to remove that hack from base/packages again, before we get even more
> duplicate bugs. IMHO the cure is worse than the desease here.

I welcome the proper fix for the tree.  This way is "less broken" than it was before.
Comment 34 Sergey S. Starikoff 2012-03-10 06:40:08 UTC
(In reply to comment #28)
> A word of warning to whoever provides the fix - /bin/more
> has problems formatting some man pages, though the actual
> cause may be the man macros.  /usr/bin/less is fine.

It looks important.
Could you list some examples (of man pages, incorrectly  displayed by /bin/more)?


(In reply to comment #32)
> Adding a handbook section for installing/activating a pager during install
> would be another option.

Good idea.
But to my mind it will be better to write a guide, similiar to cron guide and others (something like 'Standard documentation guide', describing far not only PAGER, but entirely usage of man and info pages).
Just temporarily (until issue is not fixed) referred in handbook (here could be pinted more common question about rules of Handbook referring of temporarily actual guides, like openrc migration guide or the suggested one).
Comment 35 Ulrich Müller gentoo-dev 2014-07-26 10:21:43 UTC
The "temporary fix" is now in place for more than two years.

CCing QA. Can we please remove sys-apps/less from the system set again?
Comment 36 Rick Farina (Zero_Chaos) gentoo-dev 2014-07-26 19:37:01 UTC
(In reply to Ulrich Müller from comment #35)
> The "temporary fix" is now in place for more than two years.
> 
> CCing QA. Can we please remove sys-apps/less from the system set again?

Sure, right after bug 393445 is fixed.
Comment 37 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-07-28 01:57:53 UTC
(In reply to Rick Farina (Zero_Chaos) from comment #36)
> (In reply to Ulrich Müller from comment #35)
> > The "temporary fix" is now in place for more than two years.
> > 
> > CCing QA. Can we please remove sys-apps/less from the system set again?
> 
> Sure, right after bug 393445 is fixed.

As Rick said, if we remove less from the system set before we "fix" catalyst, we're going to provide a worse experience to users.
Brian has been working on merging his changes to catalyst into the master branch, so please give him more time to finish his work.
Comment 38 Ulrich Müller gentoo-dev 2016-06-18 15:38:35 UTC
(In reply to avx from comment #23)
> There's no 99pager or something in env.d, but it's still set by default in
> profile
> --snip--
> # grep -i pager /etc/profile
> export PAGER=${PAGER:-/usr/bin/less}
> --snap--

Right, baselayout shouldn't set the PAGER variable to an arbitrary value, without even checking for its validity.

How about the following: sys-apps/less could set the PAGER variable to a default value itself, by adding the following line to both its pkg_postinst() and pkg_postrm():

    eselect pager update

The eselect module would then initialise /etc/env.d/99pager, but only if that file doesn't exist yet (or if it doesn't set PAGER to a path of a valid binary).

The default assignment in /etc/profile could then be dropped, since /etc/env.d supersedes it in any case.

(All of the above could be said for EDITOR and app-editors/nano, too.)

CCing base-system.
Comment 39 Ulrich Müller gentoo-dev 2021-04-10 11:35:57 UTC
Another idea would be to split out "more" and "pg" as extra USE flags in util-linux, instead of enabling their installation with USE="ncurses". This is supported by the upstream configure, so presumably it would be a trivial change in the ebuild:

  --disable-more          do not build more
  --enable-pg             build pg

virtual/pager could then have sys-apps/util-linux[more] and sys-apps/util-linux[pg] as providers, instead of sys-apps/util-linux[ncurses].

No other package in the tree depends on sys-apps/util-linux[ncurses], so there shouldn't be any problems with reverse dependencies requiring more.
Comment 40 Ulrich Müller gentoo-dev 2021-04-10 13:07:09 UTC
(In reply to Ulrich Müller from comment #39)
> Another idea would be to split out "more" and "pg" as extra USE flags in
> util-linux, instead of enabling their installation with USE="ncurses".

Or alternatively, combine them in a single "pager" flag.
Comment 41 Mike Gilbert gentoo-dev 2021-04-10 15:27:33 UTC
I think I like the idea of removing the PAGER assignment from /etc/profile.

Do we really even need to set PAGER by default?

If yes, then adding the postinst/postrm calls to "eselect pager update" for common providers makes sense.
Comment 42 Ulrich Müller gentoo-dev 2021-04-11 06:58:10 UTC
(In reply to Mike Gilbert from comment #41)
> I think I like the idea of removing the PAGER assignment from /etc/profile.
> 
> Do we really even need to set PAGER by default?
> 
> If yes, then adding the postinst/postrm calls to "eselect pager update" for
> common providers makes sense.

eselect knows about "less more most", and will assign these in order if the PAGER variable is unset. So sys-apps/{less,util-linux,most} would have to call eselect pager in pkg_post*.

Presumably we would want to do the same for the EDITOR and VISUAL variables? There the list currently contains "nano emacs vi xemacs".
Comment 43 Andreas K. Hüttel archtester gentoo-dev 2022-04-09 16:34:38 UTC
Let's close this since less is in @system for ages.
Comment 44 Ulrich Müller gentoo-dev 2022-04-09 17:58:47 UTC
(In reply to Andreas K. Hüttel from comment #43)

Closing the bug doesn't magically make the problem go away.

sys-apps/less in the system set is only a workaround for a catalyst problem. It doesn't belong there, but should be replaced by virtual/pager.