[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: --build / --compile option to apt-get



Hi Ed Housey,

2010/3/9 Ed Housey <E.Housey@astronautics.com>:
> I am interested in using the –build option of apt-get to build a source
> package once it is retrieved. I am having trouble finding out how to use
> this feature. Can you please point me to some documentation on how to use
> it?

mhh the apt-get (8) manpage says:
> -b, --compile, --build
> Compile source packages after downloading them.
> Configuration Item: APT::Get::Compile.

And apt normally does what it advertise in his manpages, therefore:
apt-get source apt -b
will download, extract and thanks to the -b option also start to
compile apt (if you have the correct deb-src entries to fetch the
source of course). The result (if you have all build-dependencies
installed - hint apt-get build-dep) will be one or more deb-files.

These can be installed with dpkg -i (and apt-get install --fix-broken).
Note that this packages will be replaced by apt on the next upgrade
with the package from the official archive (with the same version)
for safety reasons if you don't protect them with pinning / holds.

If you want to apply patches you need to do it by hand:
apt-get source apt
[hick hack your changes now]
apt-get source apt -b

but you could replace the last call also with
dpkg-buildpackage -uc -b
(that is exactly what apt does after changing into the source directory)


Good luck & best regards,

David Kalnischkies


Reply to: