[03:57] wgrant: Long time no speak :) I've observed strange behavior with "apt-cache show"... I was hoping you could set me straight :) [04:00] timrc: Hi! It's been a while. What's the issue? [04:01] wgrant: This one is weird. Ansible has a module called 'apt_repository' and this module will create a sources file in /etc/apt/sources.list.d if it doesn't already exist and give it a file mode. This file mode _weirdly_ defaults to 420 (root user readable, root group writeable) [04:02] That sounds like a very special module. [04:02] If you were to "apt-cache show some-package" as a non-root user, apt-cache show wouldn't find anything. [04:03] The reason _seems_ to be that it scans /etc/apt/sources.list.d and if it can _open_ the file, it will use it when scanning /var/lib/apt/lists [04:03] But in my case the user executing "apt-cache show" can read the /var/lib/apt/lists location. [04:04] So I could literally grep for the package I'm interested in /var/lib/apt/lists but I could not discover it using "apt-cache show" [04:05] timrc: That's normal. /etc/apt/sources.list and co are all meant to be world-readable. [04:05] There are separate files for creds if need be. [04:06] Okay so the assumption is that you're not using weird modes on /etc/apt/sources.list [04:06] Though wouldn't it be better to just do the c++ equivalent of "ls -1 /etc/apt/sources.list" and use that to compose your search space? [04:07] Oh wait scratch that, it needs the url to reconstruct the cache file name. [04:10] wgrant: Thanks =) [04:15] timrc: Right, it could approximate that by just looking at every file in /var/lib/apt/lists, but there can be other properties in sources.list (eg. disabling signature verification) that mean it can't really do that. [04:21] Wow... so the person who wrote this module had the right idea. This is a real bug... the default mode is 0644, but he does int('0644', 8) which turns it into 420 and then I guess does a chmod 420 on the file. [04:22] Heh [04:22] That'd do it. [04:22] I just thought he was smoking pot. === frankban|afk is now known as frankban === mup_ is now known as mup === frankban is now known as frankban|afk