Tuesday 23 July 2013

Re: Source packages appropriate by default?

On Tuesday, July 23, 2013 08:12:16 AM Robie Basak wrote:
> On Tue, Jul 23, 2013 at 03:02:02AM -0400, Scott Kitterman wrote:
> > So those are a couple of examples of what I think is definitely not what
> > we
> > want. I'm open to discussion about alternate ways to preserve easy access
> > to the source.
>
> How about:
>
> $ sudo apt-get source hello
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: You must put some 'source' URIs in your sources.list
> E: Type "add-apt-repository sources" to do this automatically for you.
> $ sudo add-apt-repository sources
> deb-src lines have been added to your sources.list.
> Now type "apt-get update", and then "apt-get source ..." will work.
> $ sudo apt-get update
> (...)
> $ sudo apt-get source hello
> (works)
>
> To do this, we'd need to patch apt to add the second error line, and
> implement "sources" to add-apt-repository.

Assuming add-apt-repository was installed by default, it's close. I think
something like this might be reasonable (imagine some policykit or whatever it
is called now magic here):

$ sudo apt-get source hello
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
Would you like 'source' URIs to be added? (y/N)
Y
deb-src lines have been added to your sources.list.
...
Get:9 http://archive.ubuntu.com saucy/main Sources [1,001 kB]
Get:10 http://archive.ubuntu.com saucy/restricted Sources [6,578 B]
Get:11 http://archive.ubuntu.com saucy/universe Sources [6,071 kB]
...
apt-get source lightdm-kde
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'lightdm-kde' packaging is maintained in the 'Git' version control
system at:
git://git.debian.org/pkg-kde/kde-extras/lightdm-kde.git
Need to get 1,386 kB of source archives.
Get:1 http://archive.ubuntu.com/ubuntu/ saucy/universe lightdm-kde
0.3.2.1-1ubuntu2 (dsc) [1,543 B]
Get:2 http://archive.ubuntu.com/ubuntu/ saucy/universe lightdm-kde
0.3.2.1-1ubuntu2 (tar) [1,379 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ saucy/universe lightdm-kde
0.3.2.1-1ubuntu2 (diff) [5,088 B]
Fetched 1,386 kB in 1s (807 kB/s)
apt-get source lightdm-kde
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'lightdm-kde' packaging is maintained in the 'Git' version control
system at:
git://git.debian.org/pkg-kde/kde-extras/lightdm-kde.git
Need to get 1,386 kB of source archives.
Get:1 http://archive.ubuntu.com/ubuntu/ saucy/universe lightdm-kde
0.3.2.1-1ubuntu2 (dsc) [1,543 B]
Get:2 http://archive.ubuntu.com/ubuntu/ saucy/universe lightdm-kde
0.3.2.1-1ubuntu2 (tar) [1,379 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ saucy/universe lightdm-kde
0.3.2.1-1ubuntu2 (diff) [5,088 B]
Fetched 1,386 kB in 1s (807 kB/s)
(and so on)

In other words, it's, I think, possible to make it roughly as easy as it is
now to get source without having the sources.list "cluttered". For users of
our releases, I doubt it saves much, but that would be a way to do it that
both avoids whatever amount of bandwidth usage is involved until the user opts
in to it, but preserves ready access to the source that I think is important.

Scott K

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel