Re: How to add dependencies that exist in another repository
- To: email@example.com
- Cc: firstname.lastname@example.org
- Subject: Re: How to add dependencies that exist in another repository
- From: PJ Weisberg <email@example.com>
- Date: Tue, 9 Nov 2010 14:48:37 -0800
- Message-id: <AANLkTinDYTh99tsvXL-JoHuWnZxZTf=ZNsiV0CLpzU72@mail.gmail.com>
- In-reply-to: <1289237588.21109.5.camel@chris-desktop>
- References: <1289236453.2169.11.camel@balto-laptop> <1289237588.21109.5.camel@chris-desktop>
> On Mon, 2010-11-08 at 09:14 -0800, Reza Alemi wrote:
>> Hello all,
>> I don't seem to be able to find my answer searching the net, so please
>> forgive me if my question is too trivial.
>> I am packaging a product which is dependent on sun-java6-sdk (upstream
>> says it won't work with openjdk). in ubuntu, that package is in the
>> partner repository which I can get user consent to add, using debconf.
>> in shell, I would normally do an add-apt-repository for the repository
>> and then an apt-get update before I can install the sun-java6-sdk
>> my question is, can I do something like that in my own install scripts?
>> can I run add-apt-repository and apt-get update while the package is
>> being installed? won't it break if the package is installed with
>> aptitude or dpkg an on debian instead of ubunut?
>> Thank you,
- sun-java6-sdk is in non-free, so this is a non-issue for you if your
package is in contrib (since no one enables contrib but not non-free).
- Your package can't be in main, because packages in main aren't
allowed to depend on any packages that aren't in main.
- The package manager won't even try to install your package or run
any of your scripts if you depend on anything that isn't *already* in
a repository that's enabled.
- It *is* possible to add repositories when you install your package.
Google does this in the *.deb files it distributes so that the package
manager can find newer versions. If you have a reason to do this
(which you almost certainly don't), you should add some file to
/etc/apt/sources.list.d/, which you can delete when your package is
purged from the system. Don't do anything that would make it
difficult to know whether the repository was added by your package,
another package, or the user.