Mailing List Archive

emerge -U or emerge -N
Is it better to us emerge -U or emerge -N

I've always done -N but it didn't go very smoothly it seems to me -U might be better option but it takes longer.
Right now I'm doing -U and it is compiling 549-packages.
Re: emerge -U or emerge -N [ In reply to ]
On Mon, 2023-04-10 at 10:44 -0600, thelma@sys-concept.com wrote:
> Is it better to us emerge -U or emerge -N
>
> I've always done -N but it didn't go very smoothly it seems to me -U might be better option but it takes longer.
> Right now I'm doing -U and it is compiling 549-packages.
>

Since I learned the difference, I've always only done -U (--changed-
use) unless I need to change the value of some new flags. The lynchpin
is this:

"Unlike --newuse, the --changed-use option does not trigger
reinstallation when flags that the user has not en?abled are added or
removed."

As far as "better"? Use the option that fits your need or desire. If
you don't care to rebuild a package when a new use flag is added, you
need not use --newuse.
Re: emerge -U or emerge -N [ In reply to ]
Am 10.04.23 um 18:44 schrieb thelma@sys-concept.com:
> Is it better to us emerge -U or emerge -N
>
> I've always done -N but it didn't go very smoothly it seems to me -U
> might be better option but it takes longer.
> Right now I'm doing -U and it is compiling 549-packages.
>

Just out of curiosity: Is that your update process for world or in which
context do you use it? If this is your update process, with which other
options do you combine it? 549-packages is quit a lot.
Re: emerge -U or emerge -N [ In reply to ]
On 4/10/23 11:11, hitachi303 wrote:
> Am 10.04.23 um 18:44 schrieb thelma@sys-concept.com:
>> Is it better to us emerge -U or emerge -N
>>
>> I've always done -N but it didn't go very smoothly it seems to me -U might be better option but it takes longer.
>> Right now I'm doing -U and it is compiling 549-packages.
>>
>
> Just out of curiosity: Is that your update process for world or in which context do you use it? If this is your update process, with which other options do you combine it? 549-packages is quit a lot.
>
emerege -uDUavq @world

Haven't done done any updates since Dec. I think that is why.
-U came up with 549-packages
-N came up with 592-packages
Re: emerge -U or emerge -N [ In reply to ]
thelma@sys-concept.com wrote:
> Is it better to us emerge -U or emerge -N
>
> I've always done -N but it didn't go very smoothly it seems to me -U
> might be better option but it takes longer.
> Right now I'm doing -U and it is compiling 549-packages.
>
> .
>


I always do both except I use the lower case 'u'.  I started using
Gentoo back in 2003.  Over the years, I added/changed options to emerge
until I got a good sane system that works as expected and is stable.  My
command is emerge -auDN world and it has worked for years.  One
difference, I update once a week and on occasion two weeks if I have
something going on and need to wait.  I'd think tho, if one goes a long
time between updates, my way would result in a longer compile time but
also a system that is more stable or clean. 

Everyone has their own way.  If what a person does is working, by all
means do it that way.  I picked my way because of problems I ran into. 
The solutions to those problems resulted in the command I use.  If one
waits a long time between updates, more packages will have updated and
result in more updates regardless of the options.  In that case, any USE
changes would apply to those packages anyway.  If one updates often, as
I do, then the way I do it may have benefits and result in a more stable
system, even tho it requires more packages to compile. 

Hope that helps.

Dale

:-)  :-) 
Re: emerge -U or emerge -N [ In reply to ]
On 2023-04-11, Dale <rdalek1967@gmail.com> wrote:
> thelma@sys-concept.com wrote:
>> Is it better to us emerge -U or emerge -N
>
> I always do both except I use the lower case 'u'. I started using
> Gentoo back in 2003.  Over the years, I added/changed options to emerge
> until I got a good sane system that works as expected and is stable. My
> command is emerge -auDN world and it has worked for years.

Once upon a time, a little over 20 years ago, I did some studying, and
I searched mailing lists postings for recommendations, and I settled
on

emerge -auvND

I've been using that ever since on a handful of machines. I'd have to
spend a few minutes reading the man page to remember the significance
of a couple of the flags, but I note that differs only in verbosity
from Dale's usage.

--
Grant
Re: Re: emerge -U or emerge -N [ In reply to ]
Grant Edwards wrote:
> On 2023-04-11, Dale <rdalek1967@gmail.com> wrote:
>> thelma@sys-concept.com wrote:
>>> Is it better to us emerge -U or emerge -N
>> I always do both except I use the lower case 'u'. I started using
>> Gentoo back in 2003.  Over the years, I added/changed options to emerge
>> until I got a good sane system that works as expected and is stable. My
>> command is emerge -auDN world and it has worked for years.
> Once upon a time, a little over 20 years ago, I did some studying, and
> I searched mailing lists postings for recommendations, and I settled
> on
>
> emerge -auvND
>
> I've been using that ever since on a handful of machines. I'd have to
> spend a few minutes reading the man page to remember the significance
> of a couple of the flags, but I note that differs only in verbosity
> from Dale's usage.
>
> --
> Grant

I need to add something.  I always forget the default options I have in
make.conf.  This is the options I put in there.

EMERGE_DEFAULT_OPTS="--with-bdeps y --backtrack=500 --keep-going -v
--quiet-build=y -1 --unordered-display --jobs=6 --load-average 8"

I added with-bdeps ages ago to correct some issues.  After I had to use
it a few times to fix issues, I added it to the default.  I used to have
backtrack set to 100.  After a while 100 just didn't allow it to go deep
enough.  I tried higher settings until I reached 500.  I don't recall
ever having to increase it manually since.  The -1 keeps my world file
clean.  If I want to add something to the world file, I use the --select
y option to bypass it.  The others are pretty obvious and are more of a
personal preference or based on my CPU etc. 

I might add, it is rare that emerge can't find a path to do updates. 
Other than known bugs, it's also rare that I have problems with things
not working with software, unless it is me doing something wrong of
course.  :/

Hope this helps, someone at least. 

Dale

:-)  :-) 
Re: emerge -U or emerge -N [ In reply to ]
On 4/10/23 18:53, Dale wrote:
> thelma@sys-concept.com wrote:
>> Is it better to us emerge -U or emerge -N
>>
>> I've always done -N but it didn't go very smoothly it seems to me -U
>> might be better option but it takes longer.
>> Right now I'm doing -U and it is compiling 549-packages.
>>
>> .
>>
>
>
> I always do both except I use the lower case 'u'.  I started using
> Gentoo back in 2003.  Over the years, I added/changed options to emerge
> until I got a good sane system that works as expected and is stable.  My
> command is emerge -auDN world and it has worked for years.  One
> difference, I update once a week and on occasion two weeks if I have
> something going on and need to wait.  I'd think tho, if one goes a long
> time between updates, my way would result in a longer compile time but
> also a system that is more stable or clean.
>
> Everyone has their own way.  If what a person does is working, by all
> means do it that way.  I picked my way because of problems I ran into.
> The solutions to those problems resulted in the command I use.  If one
> waits a long time between updates, more packages will have updated and
> result in more updates regardless of the options.  In that case, any USE
> changes would apply to those packages anyway.  If one updates often, as
> I do, then the way I do it may have benefits and result in a more stable
> system, even tho it requires more packages to compile.
>
> Hope that helps.
>
> Dale
>
> :-)  :-)

I've asked ChatGPT for explanation and here is what I got:

Here are the differences between emerge -U and emerge -N:

emerge -U: This option upgrades the specified package(s) to the latest available version. It will first download the new version, then build and install it. If a dependency of the package being upgraded also needs to be upgraded, it will also be upgraded.

emerge -N: This option installs the specified package(s) without upgrading any dependencies. It will only download and install the package(s) if they are not already installed. If any dependencies of the package(s) are not already installed, the command will fail.

In other words, emerge -U upgrades packages and their dependencies, while emerge -N only installs packages without upgrading any dependencies.
Re: emerge -U or emerge -N [ In reply to ]
On Mon, 2023-04-10 at 22:10 -0600, thelma@sys-concept.com wrote:
> On 4/10/23 18:53, Dale wrote:
>
>
> I've asked ChatGPT for explanation and here is what I got:
>
> Here are the differences between emerge -U and emerge -N:
>
> emerge -U: This option upgrades the specified package(s) to the
> latest available version. It will first download the new version,
> then build and install it. If a dependency of the package being
> upgraded also needs to be upgraded, it will also be upgraded.
>
> emerge -N: This option installs the specified package(s) without
> upgrading any dependencies. It will only download and install the
> package(s) if they are not already installed. If any dependencies of
> the package(s) are not already installed, the command will fail.
>
> In other words, emerge -U upgrades packages and their dependencies,
> while emerge -N only installs packages without upgrading any
> dependencies.
>

This is a good example of why ChatGPT cannot be trusted.
When ChatGPT doesn't know the answer to something, rather than saying
it doesn't know the answer, it just makes it up.

The difference between -U and -N as explained by ChatGPT is wrong; in
fact, it has nothing to do with dependencies.

To have a truthful answer, let's not ask ChatGPT and instead look at
`man 5 emerge`:

--newuse, -N
Tells emerge to include installed packages where USE
flags have changed since compilation. This option also
implies the --selective option. USE flag changes
include:

A USE flag was added to a package. A USE flag was
removed from a package. A USE flag was
turned on for
a package. A USE flag was turned off for a package.

--changed-use, -U
Tells emerge to include installed packages where USE
flags have changed since installation. This option
also implies the --selective option. Unlike --newuse,
the --changed-use option does not trigger
reinstallation when flags that the user has not
enabled are added orremoved.

In a nutshell, `--newuse` or `-N` rebuilds packages when USE flags have
changed, regardless of whether the changed USE flags affect the outcome
Where as `--changed-use` or `-U` rebuilds packages when the USE flags
have changed, AND the changed USE flags affect the outcome.

For example, suppose you are on an openRC system, and a package
introduces a new `systemd` USE flag;
With `-N`: this package will be rebuilt with `-systemd`
With `-U`: this package will not be rebuilt

--
Julien
Re: Re: emerge -U or emerge -N [ In reply to ]
On Tue, 11 Apr 2023 01:49:50 -0000 (UTC), Grant Edwards wrote:

> > I always do both except I use the lower case 'u'. I started using
> > Gentoo back in 2003.  Over the years, I added/changed options to
> > emerge until I got a good sane system that works as expected and is
> > stable. My command is emerge -auDN world and it has worked for years.
> >
>
> Once upon a time, a little over 20 years ago, I did some studying, and
> I searched mailing lists postings for recommendations, and I settled
> on
>
> emerge -auvND

I used that for a while, except like Dale I prefer to not use -v (I like
the quiet life) but I switched to -U (--changed-use) to lower the number
of unnecessary rebuilds.


--
Neil Bothwick

Confucius say :
He who play in root, eventually kill tree!
Re: emerge -U or emerge -N [ In reply to ]
On Mon, 10 Apr 2023 22:10:32 -0600, thelma@sys-concept.com wrote:

> !'ve asked ChatGPT for explanation and here is what I got:
>
> Here are the differences between emerge -U and emerge -N:
>
> emerge -U: This option upgrades the specified package(s) to the latest
> available version. It will first download the new version, then build
> and install it. If a dependency of the package being upgraded also
> needs to be upgraded, it will also be upgraded.
>
> emerge -N: This option installs the specified package(s) without
> upgrading any dependencies. It will only download and install the
> package(s) if they are not already installed. If any dependencies of
> the package(s) are not already installed, the command will fail.

So now we kn ow, ChatGPT is case-insensitive, it gave you answers for -u
and -n.

It's probably easier to read the man page than ask a bot to make a guess :(


--
Neil Bothwick

Hyperbole is absolutely the worst mistake you can possibly make
Re: emerge -U or emerge -N [ In reply to ]
julien@jroy.ca wrote:
> On Mon, 2023-04-10 at 22:10 -0600, thelma@sys-concept.com wrote:
>> On 4/10/23 18:53, Dale wrote:
>>
>>
>> I've asked ChatGPT for explanation and here is what I got:
>>
>> Here are the differences between emerge -U and emerge -N:
>>
>> emerge -U: This option upgrades the specified package(s) to the
>> latest available version. It will first download the new version,
>> then build and install it. If a dependency of the package being
>> upgraded also needs to be upgraded, it will also be upgraded.
>>
>> emerge -N: This option installs the specified package(s) without
>> upgrading any dependencies. It will only download and install the
>> package(s) if they are not already installed. If any dependencies of
>> the package(s) are not already installed, the command will fail.
>>
>> In other words, emerge -U upgrades packages and their dependencies,
>> while emerge -N only installs packages without upgrading any
>> dependencies.
>>
> This is a good example of why ChatGPT cannot be trusted.
> When ChatGPT doesn't know the answer to something, rather than saying
> it doesn't know the answer, it just makes it up.
>
> The difference between -U and -N as explained by ChatGPT is wrong; in
> fact, it has nothing to do with dependencies.
>
> To have a truthful answer, let's not ask ChatGPT and instead look at
> `man 5 emerge`:
>
> --newuse, -N
> Tells emerge to include installed packages where USE
> flags have changed since compilation. This option also
> implies the --selective option. USE flag changes
> include:
>
> A USE flag was added to a package. A USE flag was
> removed from a package. A USE flag was
> turned on for
> a package. A USE flag was turned off for a package.
>
> --changed-use, -U
> Tells emerge to include installed packages where USE
> flags have changed since installation. This option
> also implies the --selective option. Unlike --newuse,
> the --changed-use option does not trigger
> reinstallation when flags that the user has not
> enabled are added orremoved.
>
> In a nutshell, `--newuse` or `-N` rebuilds packages when USE flags have
> changed, regardless of whether the changed USE flags affect the outcome
> Where as `--changed-use` or `-U` rebuilds packages when the USE flags
> have changed, AND the changed USE flags affect the outcome.
>
> For example, suppose you are on an openRC system, and a package
> introduces a new `systemd` USE flag;
> With `-N`: this package will be rebuilt with `-systemd`
> With `-U`: this package will not be rebuilt
>

The info from the man page is correct.  They do two different things. 
The -N will mean more recompiles of packages but it also means that when
a USE flag change is made, it also changes any packages that relates to
that.  In other words, it goes deeper. 

What all this comes down to, how stable and how consistent do you want
your system to be?  On some systems, it may get away with doing it the
quick and fast way.  In some cases it may not.  It seemed to me that for
my system, going a bit deeper worked better for me.  I'd rather rebuild
more packages and have a more stable system than take a quicker way and
have problems every once in a while.  If one wants to try the shorter
way, see if it works for them, then that can be done.  If it works,
great.  If not, switching to a method that takes longer and sorts
through more packages may be needed.  It's all up to the person sitting
in the chair. 

Dale

:-)  :-) 
Re: Re: emerge -U or emerge -N [ In reply to ]
Neil Bothwick wrote:
> On Tue, 11 Apr 2023 01:49:50 -0000 (UTC), Grant Edwards wrote:
>
>>> I always do both except I use the lower case 'u'. I started using
>>> Gentoo back in 2003.  Over the years, I added/changed options to
>>> emerge until I got a good sane system that works as expected and is
>>> stable. My command is emerge -auDN world and it has worked for years.
>>>
>> Once upon a time, a little over 20 years ago, I did some studying, and
>> I searched mailing lists postings for recommendations, and I settled
>> on
>>
>> emerge -auvND
> I used that for a while, except like Dale I prefer to not use -v (I like
> the quiet life) but I switched to -U (--changed-use) to lower the number
> of unnecessary rebuilds.
>
>


What gets me, I have -v in make.conf for the default options.  I
shouldn't add it to the command line but I'm so used to doing so, I type
it in anyway.  It's a habit I just can't seem to break.  :/

Dale

:-)  :-) 
Re: emerge -U or emerge -N [ In reply to ]
On Tuesday, 11 April 2023 11:33:38 BST Dale wrote:

> The info from the man page is correct.

Of course it is. There'd be uproar if it weren't.

> They do two different things. The -N will mean more recompiles of packages
> but it also means that when a USE flag change is made, it also changes any
> packages that relates to that. In other words, it goes deeper.

I don't know why you think it goes deeper, Dale. It's a question of candidate
selection, not depth of analysis.

-U: if a package doesn't need to be updated on your system today, it'll be
left until it does.

-N: if any USE flag at all has changed in a package, it'll be recompiled,
whether it needs to be on your system or not.

--
Regards,
Peter.
Re: emerge -U or emerge -N [ In reply to ]
Peter Humphrey wrote:
> On Tuesday, 11 April 2023 11:33:38 BST Dale wrote:
>
>> The info from the man page is correct.
> Of course it is. There'd be uproar if it weren't.
>
>> They do two different things. The -N will mean more recompiles of packages
>> but it also means that when a USE flag change is made, it also changes any
>> packages that relates to that. In other words, it goes deeper.
> I don't know why you think it goes deeper, Dale. It's a question of candidate
> selection, not depth of analysis.
>
> -U: if a package doesn't need to be updated on your system today, it'll be
> left until it does.
>
> -N: if any USE flag at all has changed in a package, it'll be recompiled,
> whether it needs to be on your system or not.
>


When I say deeper, I mean it will find more packages that may not be
found otherwise.  The deeper the hole I dig, the more dirt I have.  That
sort of thing.  Maybe it should be phrased another way??? 

Dale

:-)  :-) 
Re: emerge -U or emerge -N [ In reply to ]
Neil,

On Tuesday, 2023-04-11 08:19:10 +0100, you wrote:

> ...
> So now we kn ow, ChatGPT is case-insensitive, it gave you answers for -u
> and -n.

You aren't really flabbergasted, are you? After all Microsoft is known
for having a particularly soft spot for case-insensitiveness :-)

Sincerely,
Rainer
Re: emerge -U or emerge -N [ In reply to ]
On Tue, 11 Apr 2023 06:30:47 -0500, Dale wrote:

> > -U: if a package doesn't need to be updated on your system today,
> > it'll be left until it does.
> >
> > -N: if any USE flag at all has changed in a package, it'll be
> > recompiled, whether it needs to be on your system or not.
> >
>
>
> When I say deeper, I mean it will find more packages that may not be
> found otherwise.

And -e finds even more - but more is not always better. -U was introduced
because -N was causing too many packages to be rebuilt unnecessarily.


--
Neil Bothwick

"Logic will get you from A to B. Imagination will take you everywhere."
(Albert Einstein)
Re: emerge -U or emerge -N [ In reply to ]
Neil Bothwick wrote:
> On Tue, 11 Apr 2023 06:30:47 -0500, Dale wrote:
>
>>> -U: if a package doesn't need to be updated on your system today,
>>> it'll be left until it does.
>>>
>>> -N: if any USE flag at all has changed in a package, it'll be
>>> recompiled, whether it needs to be on your system or not.
>>>
>>
>> When I say deeper, I mean it will find more packages that may not be
>> found otherwise.
> And -e finds even more - but more is not always better. -U was introduced
> because -N was causing too many packages to be rebuilt unnecessarily.
>
>


Before those options came along, I would run emerge -e world to fix
problems.? Sometimes revdep-rebuild would catch things but sometimes it
wouldn't.? Thing is, since I started using the current options, I have
few problems with package upgrades.? Sure, they have a known bug on
occasion but recompiling won't help that.? I'm just talking about
problems with one package not matching up with some other package and
recompile fixes it.?

To me, the fact it works so much better tells me I'm doing something
right.? Other people may get different results but as long as what I'm
doing works, I don't plan to change anything.?

Dale

:-)? :-)?
Re: emerge -U or emerge -N [ In reply to ]
On Tue, 11 Apr 2023 10:18:13 -0500, Dale wrote:

> >> When I say deeper, I mean it will find more packages that may not be
> >> found otherwise.
> > And -e finds even more - but more is not always better. -U was
> > introduced because -N was causing too many packages to be rebuilt
> > unnecessarily.

> Before those options came along, I would run emerge -e world to fix
> problems.  Sometimes revdep-rebuild would catch things but sometimes it
> wouldn't.  Thing is, since I started using the current options, I have
> few problems with package upgrades.  Sure, they have a known bug on
> occasion but recompiling won't help that.  I'm just talking about
> problems with one package not matching up with some other package and
> recompile fixes it. 
>
> To me, the fact it works so much better tells me I'm doing something
> right.  Other people may get different results but as long as what I'm
> doing works, I don't plan to change anything. 

-N works, it just creates extra work. If you are happy with that, there's
no need to change.


--
Neil Bothwick

There are two hard things in computer science:
cache invalidation, naming things and off-by-one errors.