Re: [gentoo-user] Highlight certain packages being upgraded

2023-07-13 Thread Dale
Neil Bothwick wrote:
> On Thu, 13 Jul 2023 02:16:13 -0500, Dale wrote:
>
>>> Then run
>>>
>>> emerge --options @world -p --color y | sed -f packages.script
>>>
>>> It highlights any of the packages in your file in bright red. See
>>> https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 for a
>>> list of colour options.
>> Like Wol's idea, that's a extra step.  I was wanting it to just do it
>> when running emerge -auDN world with no additional steps except creating
>> the file for the package list. 
> That is the only extra step, unless you mean that you have to run with -p
> to see the highlighted output. That takes a lot less time than you have
> invested in this so far.
>
> Actually, I've checked and you can run this with --ask instead or -p, so
> no extra steps involved. The only limitation is that you don't see the
> Y/n prompt at the end of the ask output. Create an alias to the command,
> or wrap it in a script that also runs the sed command first and the
> number of extra steps becomes exactly zero.
>
>

And I have no clue how to do any of that.  Like I said, emerge just
isn't ready for anything like this.  I was hoping there may be some
option, config file or something that I can use to do this and it just
work.  I think if there was such a thing, someone would have mentioned
it long ago.  Maybe one day something like this will be added.  Then
again, maybe not. 

Thanks to all for trying tho. 

Dale

:-)  :-) 



Re: [gentoo-user] Instrumenting emerges

2023-07-13 Thread Frank Steinmetzger
Am Sat, Jul 08, 2023 at 12:42:13PM -0300 schrieb David M. Fellows:

> while [ true ] ; do cat /proc/loadavg |logger; sleep 60; done

A spec more elegant:

while sleep 60; do ... ; done

-- 
Grüße | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

Taglines are like cars - You get a good one, then someone nicks it.


signature.asc
Description: PGP signature


Re: [gentoo-user] Highlight certain packages being upgraded

2023-07-13 Thread Neil Bothwick
On Thu, 13 Jul 2023 02:16:13 -0500, Dale wrote:

> > Then run
> >
> > emerge --options @world -p --color y | sed -f packages.script
> >
> > It highlights any of the packages in your file in bright red. See
> > https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 for a
> > list of colour options.

> Like Wol's idea, that's a extra step.  I was wanting it to just do it
> when running emerge -auDN world with no additional steps except creating
> the file for the package list. 

That is the only extra step, unless you mean that you have to run with -p
to see the highlighted output. That takes a lot less time than you have
invested in this so far.

Actually, I've checked and you can run this with --ask instead or -p, so
no extra steps involved. The only limitation is that you don't see the
Y/n prompt at the end of the ask output. Create an alias to the command,
or wrap it in a script that also runs the sed command first and the
number of extra steps becomes exactly zero.


-- 
Neil Bothwick

The considered application of terror is also a form of communication.


pgpdsS9iwJzLS.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Highlight certain packages being upgraded

2023-07-13 Thread Dale
Neil Bothwick wrote:
> On Sun, 9 Jul 2023 13:10:17 -0500, Dale wrote:
>
>>> Just about every program on this computer does more than I need. What
>>> counts is that they do all that I need :)
>>>
>>> Have you looked at using sed to add extra colour codes to the output
>>> of emerge?
>> I don't know anything about sed.  Heck, it took me a long to to even get
>> started with grep.  ROFL
> Try this:
>
> Create a file with the package atoms you want to highlight, one per
> line, say packages.txt. Then run this command, you'll need to rerun it
> each time you edit the packages list
>
> awk '{print "s:\\("$0"\\):\\x1b[1;31m\\1:"}' packages.txt
>> |packages.script
> Then run
>
> emerge --options @world -p --color y | sed -f packages.script
>
> It highlights any of the packages in your file in bright red. See
> https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 for a list
> of colour options.
>
>


Like Wol's idea, that's a extra step.  I was wanting it to just do it
when running emerge -auDN world with no additional steps except creating
the file for the package list. 

As I mentioned in reply to Wol, I don't think my wish is quite ready for
prime time.  Some dev may read this and think it is a nifty idea tho. 
It's possible I guess.

Dale

:-)  :-)



Re: [gentoo-user] Highlight certain packages being upgraded

2023-07-13 Thread Dale
Wol wrote:
> On 08/07/2023 21:20, Dale wrote:
>> Just as a example, my overnight upgrade included nvidia drivers.  I
>> didn't see it so when I logged out, no X.  I usually see it but missed
>> it this time.  Having a way to easily set the colors would be easier but
>> having to repeat things, create files to scan, use tools I'm not
>> familiar with and such, that isn't easy.  I wanted to be able to see it
>> in the initial list, make a note of what packages I need to do things
>> for and then hit yes to continue.  Basically, I was hoping emerge had a
>> way to do this that isn't known to me.  After all, the thing all but
>> washes dishes already.  ROFL
>>
>> Maybe one day others will like this idea and one of them is willing to
>> add some code to emerge to do it.  Until then, I guess I'll just miss
>> one on occasion and have to scratch my head a couple times.
>>
>> Thanks to all.  Interesting ideas but generally over my head.  :/
>
> Something I saw elsewhere - why don't you put all of these programs
> into a list like @system or @world. You can exclude these programs
> from an "emerge @world".
>
> I don't know whether these programs will be emerged as dependencies of
> an "emerge @world", but if you want to know if they will be emerged,
> an "emerge @... --pretend" will tell you.
>
> So firstly, you know whether any of these programs are going to be
> emerged. Secondly, you can emerge all the hogs in one go. And thirdly,
> you you can emerge @world before or after.
>
> So, I guess, if you don't exclude these hogs from @world then you can
> just find out if they are going to be emerged (and emerge them first
> if you want), or if you do exclude them from @world, you can emerge
> them (to some extent at least) on your own timescale.
>
> Cheers,
> Wol
>
>


That requires a extra step each time tho.  I was hoping I could put a
list of packages in a file and when I do emerge -auDN world, it
highlights the packages listed in the file with a different color.  No
extra steps or anything.  It just changes the colors.

It seems emerge doesn't have this ability easily and it may never have
either.  I'd be surprised if anyone ever even thought of such a thing. 
However, some dev may have seen this thread and thought, hey, that would
be neato.  ROFL

Thanks for the idea.  My wish just isn't quite ready for prime time yet. 

Dale

:-)  :-)