Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nala does not offer to upgrade packages that apt will : #29

Open
AndKe opened this issue Nov 22, 2023 · 6 comments
Open

Nala does not offer to upgrade packages that apt will : #29

AndKe opened this issue Nov 22, 2023 · 6 comments

Comments

@AndKe
Copy link

AndKe commented Nov 22, 2023

after nala/apt update .. Nala sees nothing to do.
apt upgrade sees a lot:
why/what is going on?

image

@geozeke
Copy link

geozeke commented Nov 25, 2023

Seeing the same issue. nala skips kernel updates, that apt installs.

@D-u-c-k-s-e-l
Copy link

Seeing the same issue. nala skips kernel updates, that apt installs.

I wonder if that's intended behavior.

@geozeke
Copy link

geozeke commented Nov 25, 2023

Interesting point. Could be. Though I'm also seeing it skip updates from some 3rd party repos that apt handles fine, for example: vbernat/haproxy-2.8.

@AndKe
Copy link
Author

AndKe commented Nov 25, 2023

yes-..maybe.. but why? And as an apt "replacement" - (many do alias nala to do apt work), this is kind of bad.

@volitank
Copy link
Owner

This is going to be quite a long explanation. In order to understand why this is, there are some things about apt that you have to know first.

There are 3 modes to an upgrade with apt.

  1. Only upgrade packages, Do not install or remove any packages. (apt-get upgrade)
  2. Upgrade and Install NEW packages if required, but don't remove any (apt upgrade)
  3. Upgrade and install NEW packages and Remove packages if necessary (apt/apt-get full-upgrade/dist-upgrade)

Now that we have explained this, we can start talking about Nala. Nala uses python-apt in order to do the apt things. Python-apt has support for upgrade modes 1 and 3, but not 2 which is what apt upgrade uses.

before v0.14.0 Nala defaulted to full-upgrade, option 3. There have been many bug reports of upgrades breaking stuff for users of Sid or Ubuntu Devel releases, or sometimes distros who do not manage their repos very well. So with 0.14.0 we changed the default upgrade mode to option 1. I would have used 2, but it's not available to us, and will be available if I ever finish rewritting it in rust.

This is why you're seeing the discrepancy between nala and apt. If you compare what nala upgrade is going to do vs apt-get upgrade, You should see that they are the same.

Now, there is a configuration option in /etc/nala/nala.conf which you can switch the default back to option 3 if you choose too.

Simply go into that file, and change the following option to true, and it will be like Nala was before.

# Set to true to make full-upgrade the default
full_upgrade = false

If you don't want to change the config you can use nala upgrade --full and it will be like the old functionality. We also have two aliases for this nala full-upgrade and nala dist-upgrade, but note there is a bug where the aliases won't automatically update the package lists for you. If you use the config option or nala upgrade --full then it still will. This bug will be fixed in the next release.

I think that should be about it, if it's still unclear or you have any further questions, please feel free to ask.

@geozeke
Copy link

geozeke commented Dec 19, 2023

Thank you for the very thorough explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants