On Thu, Jul 06, 2017 at 01:32:00PM -0000, Julian Andres Klode wrote: > I think automatic updating on old caches is not really the best idea, > because it will always happen when you expect it the least. Or maybe you > do in fact want the old one.
>From the perspective of users, I absolutely disagree. Users always want the latest. Users expect a download, so hitting the archive index should never be a problem. A user not wanting the latest is actually being a developer. > Or maybe you do in fact want the old one. Developers might, sure. Developers would have to override using a CLI option or set some global configuration to override. But I think the way forward for the "apt" CLI is to be user-centric. This is the entire point of it, no? The defaults can either be sensible for users, or for developers. This is an example where I think it cannot be both. So what should "apt" be? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1429285 Title: feature request: apt-get update --if-necessary Status in apt package in Ubuntu: Confirmed Bug description: In many cases (juju, lxc containers .. ) we find ourselves in the position of not knowing if the apt-cache has been udpated recently. So, you either risk not doing it, or do it and it takes some time and generates load. so long story short, you always run 'apt-get update' which is quite often unnecessary. Would it be possible to add (or is there now) something like '--if-necessary' or '--if-necessary=5m'. I could imagine that that would look at /var/lib/apt/lists and check timestamps on files for each url that /etc/apt/sources.list[.d/*] would hit. If nothing was needed and reasonably recent, then it would not do the update. There exist other solutions to this like: https://coderwall.com/p/0xtstw/doing-an-apt-get-update-in-ansible-only-if-a-condition-is-met https://blog.kumina.nl/2010/11/puppet-tipstricks-running-apt-get-update-only-when-needed/ It'd be nice if we had a sane way to say: update if you need to, otherwise don't waste time and resources ProblemType: Bug DistroRelease: Ubuntu 15.04 Package: apt 1.0.9.3ubuntu1 ProcVersionSignature: Ubuntu 3.19.0-7.7-generic 3.19.0 Uname: Linux 3.19.0-7-generic x86_64 ApportVersion: 2.16.2-0ubuntu1 Architecture: amd64 CurrentDesktop: Unity Date: Fri Mar 6 17:06:22 2015 EcryptfsInUse: Yes InstallationDate: Installed on 2015-01-02 (63 days ago) InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150101) SourcePackage: apt UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1429285/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp

