Hey Archer, when did you install glibc?
Quick question for anyone who's been running Arch Linux for some time now:
do you know when you installed glibc
?
This isn't a trick question or anything of the sort. Yes, glibc is a pretty essential package, required by lots of things (directly or not), and you most likely did install it when you installed your system. Remember, back in the days...
But when was it, actually?
Any good Archer will not even need to think about it, a quick grep glibc
/var/log/pacman.log
will provider the exact date and time of said
installation. Beautiful, simple, very Arch. So what's that date for you?
If you're anything like me, you won't have it. You'll have plenty of dates, every time said package was updated, but oddly enough it seems it never was installed.
I don't install my system, only upgrade it...
Let's rewind a bit: As I do every once in a while, earlier today I ran pacman
-Qdtq
to see if there wasn't any packages installed on my system that shouldn't
be. I have a few packages that show up, it's normal I know why.
But today I noticed one I wasn't familiar with: libgssglue
What's that? Probably an old dependency that isn't required anymore, and I should get rid of it. But from where did it come, and how long has it been uselessly eating my precious disk space?
A few grep & less later, I was confused. Seems I have never installed this one; Upgraded it, yes, a couple of times even. But no installation... I have installed the kernel, even pacman itself, but not libgssglue. What's so special about it?
I looked things up on another machine, same deal. Quickly start a VM I use for tests and stuff, again, same thing. Took me a little while to figure it out...
Back when, I used the old CLI installer that came with Arch, and it took care of creating the partitions, file systems, and installing the first batch of packages (amongst other things).
And I had never really looked into it more, plus I knew much less then than I do today about this whole Linux thing, and even the times I looked into my pacman.log I never noticed/paid attention to the fact that it didn't actually start properly.
If you've also used that old installer to set up your system, the first line of
your pacman.log probably says something about when package filesystem
was
installed.
Because until then, most likely there was simply no folder /var/log
for
pacman to write its log in! So anything that was installed before, there's no
log of it.
And that would include libgssglue
, which - until the end of last year - used
to be a dependency of libtirpc
, itself a dependency of pam
.
Of course, any "recent" installation, i.e. done using pacstrap
, won't have
this issue, as it creates a few folders - including /var/log
- before running
pacman.
About those old dependencies that aren't needed anymore
This fun little mystery solved, it also reminded me of something else. I thought
I did a Qdtq
somewhat regularly, but either I don't, or I had completely
missed things for the four months of 2014 so far.
And that reminded me of an idea I had, about adding an option to pacman, so that it would handle those for me. Basically, it would notice, during a sysupgrade, that a package has been "dropped" as dependency, and if it's now useless, instead of keeping it around, even possibly upgrading it, it would remove it.
So naturally I spent a few hours looking into pacman's (ALPM's really) source code, to see about adding such a thing. It's far from complete and pretty darn ugly so far, but a quick pactest says it seems to work.
I'm not sure if pacman devs would like it or not, but hopefully I'll have a patch to send their way at some point in the (not too distant) future...