some question about apt-get source

Marius Gedminas marius at pov.lt
Mon Feb 8 16:01:04 UTC 2010


On Mon, Feb 08, 2010 at 11:52:48PM +0800, loody wrote:
> I try to get some source file as I need, like gcc and xorg, so I try
> to use "sudo apt-get source gcc" and "sudo apt-get source xorg".
> But I find what I get are *.dsc and *.gz 2 files

Usually there's also a *.diff.gz.

> and I find the file
> after taring the gz is not what I want.

Don't untar the gz -- you get the pristine upstream sources that way
without Debian/Ubuntu modifications and without a debian/ subdirectory
for building packages.

apt-get source untars the tarball and applies the Debian diff.gz for
you, so just cd xorg* and enjoy.

dpkg-source -x *.dsc is another way to unpack the Debian sources and
apply the Debian diff -- this is in fact how apt-get source does it
automaticall.

> Does that mean I should get really source by  the dsc and gz files?
> or I use the wrong way to get source code?
> (xorg should use git, etc.)

If you want to you can use bzr branch lp:ubuntu/karmic/xorg instead of
apt-source get.  If you want to make modifications, this can be more
convenient.  The downside is that you'll have to guess the source
package name, while apt-get source can convert a binary package name to
the right source package for you.

Regards,
Marius Gedminas
-- 
"You know, you never truly appreciate how handy living next to a creek
is until you are on fire."
                -- James Nicoll, rec.arts.sf.written, 1/25/05
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100208/089cfc37/attachment.pgp>


More information about the ubuntu-users mailing list