Hi Tom, Looks like we're on to something!
Tom writes: > On 17 April 2018 at 22:17, Olaf Meeuwissen <paddy-h...@member.fsf.org> wrote: > >> I get the same 'n/a' with the same versions of base-files and lsb-base. >> FTR, lsb-release has the same version as lsb-base. >> >> I've been poking around in the Python source code for the lsb_release >> command and noticed a code path that sources the output of >> >> apt-cache policy >> >> and looks for entries that have a label of Devuan, component of main and >> origin of Devuan (or an alternative that mentions packages.devuan.org >> and Devuan Ports). >> >> My `apt-cache policy` output does not match any of that so I *think* >> that's why I get an 'n/a' for the codename. >> >> # The code is a bit hard to follow which is why I am not sure :-/ >> >> Any chance the `apt-cache policy` output on your machines is different >> in a way that would explain the behaviour you see? >> >> Hope this helps, > > On the machine that returns "n/a" for "lsb-release -c -s", it has the > following apt policy: > > # apt-cache policy > Package files: > 100 /var/lib/dpkg/status > release a=now > 500 http://deb.devuan.org/merged ascii-updates/main amd64 Packages > release v=2.0.0,a=testing-updates,n=ascii-updates,l=Devuan,c=main,b=amd64 > origin deb.devuan.org > 500 http://deb.devuan.org/merged ascii-security/non-free amd64 Packages > release > v=2.0,a=testing-security,n=ascii-security,l=Devuan-Security,c=non-free,b=amd64 > origin deb.devuan.org > 500 http://deb.devuan.org/merged ascii-security/main amd64 Packages > release > v=2.0,a=testing-security,n=ascii-security,l=Devuan-Security,c=main,b=amd64 > origin deb.devuan.org > 500 http://deb.devuan.org/merged ascii/main amd64 Packages > release v=2.0,a=testing,n=ascii,l=Devuan,c=main,b=amd64 > origin deb.devuan.org > Pinned packages: This is pretty much the same as what I see. Note the absence of an `o=...` entry in this output. > On the other machine that returns "ascii" for "lsb-release -c -s", it > seems to have included packages.devuan.org in there: > > # apt-cache policy > Package files: > 100 /var/lib/dpkg/status > release a=now > 500 http://packages.devuan.org/merged ascii/non-free amd64 Packages > release v=2.0,o=Devuan,a=testing,n=ascii,l=Devuan,c=non-free,b=amd64 > origin packages.devuan.org > 500 http://packages.devuan.org/merged ascii/main amd64 Packages > release v=2.0,o=Devuan,a=testing,n=ascii,l=Devuan,c=main,b=amd64 > origin packages.devuan.org Note the *presence* of an `o=Devuan` entry for the ones above and the *absence* or such an entry for the ones below! > 500 http://deb.devuan.org/merged ascii-updates/main amd64 Packages > release v=2.0.0,a=testing-updates,n=ascii-updates,l=Devuan,c=main,b=amd64 > origin deb.devuan.org > 500 http://deb.devuan.org/merged ascii-security/non-free amd64 Packages > release > v=2.0,a=testing-security,n=ascii-security,l=Devuan-Security,c=non-free,b=amd64 > origin deb.devuan.org > 500 http://deb.devuan.org/merged ascii-security/main amd64 Packages > release > v=2.0,a=testing-security,n=ascii-security,l=Devuan-Security,c=main,b=amd64 > origin deb.devuan.org > 500 http://deb.devuan.org/merged ascii/main amd64 Packages > release v=2.0,a=testing,n=ascii,l=Devuan,c=main,b=amd64 > origin deb.devuan.org > Pinned packages: > If I comment out the lines in /etc/apt/sources.list for > packages.devuan.org and then run "lsb-release -c -s", then it shows > "n/a". Uncommenting those lines again shows "ascii" for "lsb-release > -c -s". So the output of lsb_release may depend on one's APT sources rather than what is installed. Ouch! # Currently, it appears to depend on what is in the Origin field of the # *_InRelease files for one's sources. The one for deb.devuan.org does # not have that field. It should just use what the base-files package installed, unless the sysadmin (or some other package?) overrides it in an /etc/lsb-release file. It should *not* depend on the APT sources du jour as they have no direct bearing on what is installed when one runs lsb_release. Hoping this gets fixed sooner rather than later, I Cc:d the maintainer of the lsb-release package which provides the lsb_release command. Hope this helps, -- Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Software https://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng