Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: --depclean wants to remove openrc. Yikes!
Date: Fri, 06 Aug 2021 07:33:50
Message-Id: 20210806083333.0f48f4bf@digimed.co.uk
In Reply to: Re: [gentoo-user] Re: --depclean wants to remove openrc. Yikes! by Dr Rainer Woitok
1 On Thu, 5 Aug 2021 10:10:27 +0200, Dr Rainer Woitok wrote:
2
3 > > Why not write the output to a file ? -- eg
4 > > 'emerge --ask --depclean > <temporaryfilename>'.
5 > > Then you can look at the output at leisure, even on another machine.
6 >
7 > Depending on the number of packages you've installed and depending on
8 > the speed of your rig "emerge --depclean" may take some time, and thus I
9 > tried to avoid splitting it into two calls, one to just announce what
10 > would be done and one to really do it.
11 >
12 > But meanwhile I'm suspecting that any call along the lines of
13 >
14 > # emerge --ask ... | $PAGER
15 >
16 > is doomed to fail because both, "emerge" and the pager are trying to
17 > read the user's answer from the same input device (maybe "/dev/tty") and
18 > thus both are stumbling over the other's feet. The only way out would
19 > be just another option causing "emerge" to page internally.
20 >
21 > Therefore my "edepclean" alias now calls "emerge" twice, like so:
22 >
23 > # emerge --depclean --pretend | $PAGER
24 > # emerge --depclean -- ask --quiet
25
26 How about emerge -ca | tee >depclean.txt
27
28 Then if the list is short you can read it in the console and just hit y
29 or n. Otherwise, hit n and read the file. It will save calculating
30 dependencies twice, and we all know how slow that can be.
31
32
33 --
34 Neil Bothwick
35
36 A pessimist is an optimist who's given it some thought.