4 ms·
Does it still redownload 30MB and spin for 10s when you (or an installer script) do “apt update” a few seconds after the last invocation of same instead of comp
by sneak 7y ago
Does it still redownload 30MB and spin for 10s when you (or an installer script) do “apt update” a few seconds after the last invocation of same instead of comparing a root hash or some other sane method?
- throwaway8941 7y agoCheck your repository and/or apt settings. apt has had support for pdiff for what, two decades now? https://debian-administration.org/article/439/Avoiding_slow_package_updates_with_package_diffs https://debian-administration.org/article/439/Avoiding_slow_... I am no fan of it though, dnf is just so much better in all respects.
- sneak 7y agoI’m using archive.ubuntu.com and whatever the default apt settings in Ubuntu LTS are. I feel like a ton of debian-style packaging is simply “this is the way we’ve always done it”. debmirror, for example, is hot garbage.
- pas 7y agoDebian was never about ergonomics :( I remember checking their packaging howto every few years to maybe really/properly/truly understand it, but just the sheer uselessness of the text signaled each time that it's just not worth it. Just google whatever you want copy from stackoverflow, and be done with it, don't try to understand it. (Eg. if I wanted a virtual package that provides some package so I can fake that so it won't get pulled in as useless dependency for other packages.)
- sneak 7y agoI would absolutely love to maintain a metapackage and some tools on a personal apt mirror that I can add to machines and update periodically. The burden/overhead of learning the ridiculously tradition-based and overcomplicated system in use has kept me from doing it for years.
- julian-klode 7y agoIt literally is so simple you could do it by hand.
- pas 7y agoIt's simple to brute force a .deb (after all it's just an ar containing two tar files, on contains the control files, and that simple), but the process, the myriad of debhelpers, obscure traditions, mandatory steps (changelog update), and whatnot are not simple at all.
- CameronNemo 7y agoI would also point out that actually getting software into Debian is no fun for newcomers either. The whole mentorship process (where you use some arcane command to upload a package you built yourself to a special website, then ask someone to look at it) is wacky. The project could really improve their onboarding process, or at least make it easier for fly by contributions. https://mentors.debian.net/ https://mentors.debian.net/
- sneak 7y agoI run a bionic and focal full mirror, and even just keeping a mirror working right with debmirror is a huge complicated mess. I don’t understand why there isn’t an overhaul of the packaging tools and mirror structure to make it a lot simpler.
- julian-klode 7y agoAPT does in fact check if the root of the repo changed and if so does not download anything else and will then notice that the input files have not changed when it's checking if the cache needs rebuilding. What you're seeing here is some hook that's being run and updating its cache.
- sneak 7y agoI don’t believe that this is the case, based on apt’s output.
- julian-klode 7y agoWhat output? It downloads a file, then it sits around printing nothing for a few seconds (hooks are running), and then it updates it cache if necessary. Well, maybe it always rebuilds the cache, I'm not sure.
- pas 7y agoBionic 18.04 LTS. Apt 1.6.12. ~# time apt update real 0m5.059s real 0m4.981s Okay, adding Focal 20.04 LTS repo. apt install -y apt, got apt 1.9.10. real 0m7.222s real 0m6.924s It fetches the InRelease files, all of them seem to have an ETag header, but probably Apt doesn't feel that it can rely on those for some reason. But using `apt -o Debug::Acquire::http=on update` we see that it depends on the "If-Modified-Since" request headers. And many of the repos just return 304. There doesn't seem to be a config setting for increasing the number of outgoing connections either. So even if it gets just 304 responses it still does the "Reading package lists... Building dependency tree" part, which is slooow.