On Mon, 2023-04-10 at 22:10 -0600, the...@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
signature.asc
Description: This is a digitally signed message part