Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there an application by which the build dependency as well as the source code of the software gets downloaded automatically as soon as we install the software from a .deb package or the software center?

share|improve this question
add comment

1 Answer

To install the build dependencies for foo, run

apt-get build-dep foo

To get the source code, run

apt-get source --download-only foo

Note that this downloads three files into the current directory: a tarball of the source code, a compressed .diff.gz patch file, and a .dsc metadata file. Omit the --download-only option to have the command unpack the source code for you too.

If you'd like this to happen automatically, you could write a wrapper script that automatically calls each of apt-get install, apt-get build-dep, and apt-get source.

If you installing directly from .deb files instead of accessing an APT repository, then you might not be able to do this, because .deb files do not contain source code, or even a link to the source code they were built from.

There is some more information on the apt-get man page.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.