1

Background: I would like to regularly download and install source to /usr/src for certain important development packages. (For me: Qt5 and friends.)

I have seen this other question about one-time downloads of Debian source packages. However, one-time downloads of Debian source packages will not keep source code current each time the associated binary package is updated.

Example: Package qtbase5-dev has source package qtbase-opensource-src. Each time package qtbase5-dev changes, the source package will not be automatically downloaded and installed into /usr/src.

Is there an existing way to do this using aptitude (preferrably) or apt?

kevinarpe
  • 687
  • 1
    Wouldn't it make more sense to clone the git repo for the package and run git pull periodicly? – jordanm May 09 '15 at 04:08
  • You could probably write a script to check periodically against the Debian package system online. I think they have an api - https://wiki.debian.org/qa.debian.org/pts/SoapInterface – Faheem Mitha May 09 '15 at 09:48

1 Answers1

2

I don't know of a way to do all you're asking for with aptitude or apt, but apt-src provides apt's features for source packages:

apt-src update
apt-src install package
apt-src upgrade

will respectively update the information on available packages, install package's source code, and upgrade the source code if necessary.

Other options are available to build the packages from source after installation, remove source code etc.

By adding apt hooks you could configure your system so that the source code of packages you install is automatically downloaded and upgraded.

Stephen Kitt
  • 434,908