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.

I want to start sharing .deb files that automatically add new repos to an Ubuntu installation (like the ones present in puppetlabs.com).

How can I do that?

share|improve this question
add comment

1 Answer

You could add a postinst script to your package:

Broadly speaking the preinst [script] is called before (a particular version of) a package is unpacked, and the postinst afterwards... The postinst should still attempt any actions for which its dependencies are required, since they will normally be available, but consider the correct error handling approach if those actions fail.

http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html

An example

The Opera browser is adding itself to the /etc/apt/sources.list.d/opera.list with the postinst script: http://pastebin.com/u6SR6krY

share|improve this answer
    
I think it's maybe a little too much for my current knowledge. But thanks for the quick answer :) –  Tiago Carrondo Sep 30 '12 at 10:14
    
@user26687 The complete packaging guide does not exist. –  Archisman Panigrahi Sep 2 '13 at 3:35
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.