On Sat, Dec 25, 2021 at 05:43:44PM +0100, Johannes Schauer Marin Rodrigues 
wrote:
> Quoting Stéphane Glondu (2021-12-25 13:36:48)
> > `apt-get source calendar' downloads the bsdmainutils source package
> > instead of calendar. I suspect this is because bsdmainutils is the
> > source package of the calendar binary package.
> > 
> > I think `apt-get source $FOO' should try to download $FOO if $FOO
> > exists as a source package, and only after fallback to downloading the
> > source package of $FOO if it exists only as a binary package.
> 
> I agree and I cannot remember a single time when (in scripts or when running
> apt manually) I wanted 'apt-get source' or 'apt-cache showsrc' to interpret 
> the
> package name as a binary package and not a source package. Because of that I
> have
> 
> APT::Get::Only-Source "true";
> 
> in my system-wide apt config. I've never looked back.

Mind reading of people I never meet is hard, but I assume the initial
authors of apt wanted to avoid teaching users about source packages
(and by extension also apt itself, which is still very ignorant of them
 even if it learned a bit about them in recent years).


The idea probably was that you 'apt-get install foo' and something makes
you want to check out the source code of it, because why not, right?
So you do 'apt-get source foo'. In this interaction it would be
surprising that I am not getting the source of the package I have
installed, but somehow the source of something else?!

I still remember being confused many years ago after running for the
first time into the binary automake built by automake-X and automake-Y
built by source automake… at least, that seems resolved nowadays.


Anyway, I don't see us reversing the default search order and not
dropping binary lookup altogether (what the option does) either.
(or outlawing these collisions as evil – somehow I get the feeling that
 is what initial authors intended but failed as with many other small
 things).

Especially source could use some love though to properly display the VCS
info and in that process perhaps even display/ask about collisions. That
is some longstanding wishlist though, so holding your breath might not
be advisable.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature

Reply via email to