News for hackers. Stuff that matters.
Re:Apt 2.0 by sneak on Saturday March 07, 2020 @10:17PM (#22516110)
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?
Re:Apt 2.0 by throwaway8941 on Saturday March 07, 2020 @11:00PM (#22516263)
Check 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_...

I am no fan of it though, dnf is just so much better in all respects.

Re:Apt 2.0 by sneak on Sunday March 08, 2020 @06:46AM (#22517405)
I’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.
Re:Apt 2.0 by pas on Sunday March 08, 2020 @08:49AM (#22517763)
Debian 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.)

Re:Apt 2.0 by sneak on Sunday March 08, 2020 @08:55AM (#22517774)
I 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.
Re:Apt 2.0 by julian-klode on Sunday March 08, 2020 @12:56PM (#22519054)
It literally is so simple you could do it by hand.
Re:Apt 2.0 by pas on Sunday March 08, 2020 @02:00PM (#22519466)
It'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.
Re:Apt 2.0 by CameronNemo on Sunday March 08, 2020 @03:15PM (#22519914)
I 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/

Re:Apt 2.0 by sneak on Sunday March 08, 2020 @08:00PM (#22521632)
I 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.
Re:Apt 2.0 by pas on Sunday March 08, 2020 @08:59AM (#22517792)
Bionic 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.

Re:Apt 2.0 by julian-klode on Sunday March 08, 2020 @07:21AM (#22517502)
APT 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.

Re:Apt 2.0 by sneak on Sunday March 08, 2020 @07:41AM (#22517552)
I don’t believe that this is the case, based on apt’s output.
Re:Apt 2.0 by julian-klode on Sunday March 08, 2020 @07:46AM (#22517564)
What 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.