[Bug 1709603] Re: apt {upgrade, install, source} require an update call first
Anatoli Babenia
1709603 at bugs.launchpad.net
Tue Aug 27 15:44:47 UTC 2019
Ideally, `apt-get` could behave like a `dnf`, updating caches on
`update` after some expiration period.
apt-get upgrade --refresh-period=2h
The example session from `dnf`.
~ sudo dnf update
Last metadata expiration check: 0:12:32 ago on Tue 27 Aug 2019 06:30:17 PM +03.
...
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1709603
Title:
apt {upgrade,install, source} require an update call first
Status in apt package in Ubuntu:
Confirmed
Bug description:
I think that this should be tracked in its own separate bug tracking
my specific UX objection to the current status quo.
See
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1429285/comments/5,
subsequent discussion and
https://twitter.com/chr1sa/status/894048628284604416
We think that the updating of indexes should be an implementation
detail of "apt upgrade" and "apt install", rather than something
exposed to the user. If updating is judged be required (for example
the index is more than X old), then it should be done automatically
before the requested operation commences.
Here's one proposed implementation:
1) Fix bug 1429285 ("apt-get update --if-necessary").
2) Add an option to have "apt install" and "apt upgrade" (also "apt
full-upgrade", etc?) automatically and internally call the
implementation of "apt-get update --if-necessary" first.
3) Enable the option by default on Ubuntu.
This would change the behaviour of "apt", which AIUI is intended to be
the user focused CLI. It wouldn't change the behaviour of "apt-get",
which AIUI needs to retain behavioural backwards compatibility for
existing scripts.
Then we could promote "apt install" and "apt upgrade" as much simpler
commands to operate.
Note that Julian disagreed with this proposed behaviour change in
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1429285/comments/7.
I think that the very user-focused Ubuntu perspective should be to
focus on the common use case for "apt". Hence my (compromise)
suggestion that we implement this as an option upstream, and then
leave it to distros to choose the default behaviour for their users.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1709603/+subscriptions
More information about the foundations-bugs
mailing list