Ask Your Question

How to install source (code) packages?

asked 2013-11-18 18:12:58 -0500

Benjamin P gravatar image

We use apt for package management. For the packages that we're depending on, I'd like to be able to automatically install the packages containing the source code in addition to the binary, dev, and dbg packages. Using apt on the command line, this would be

[sudo] apt-get source <my_package>

Given that the apt Puppet Forge module supports adding the source (deb-src) repo to the sources.list files (using the apt::source 'include_src' argument), it seems only logical that the Package type would allow me to specify that I wish the source package to be installed.

What is the ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-02 05:06:08 -0500

ffrank gravatar image

I believe that what you are getting at is "installing package sources via the package type" support. However, this cannot really work, because installing sources does not alter the system state - you can download and extract the source packages as often and in as many places as you like.

You could do this with a custom defined type such as

define apt_sources($dir="/usr/local/src") {
  exec { "apt-get source $name":
    path => "...", cwd => $dir,

Note that this will run during each catalog application. It is not easy for puppet to determine when this needs to run, because you won't know ... (more)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-11-18 18:12:58 -0500

Seen: 191 times

Last updated: Apr 02 '14