Re: Embedding one .deb inside another
On Thu, Nov 26, 2009 at 12:59:54PM -0800, Joe Smith wrote: > I'm having an issue with distributing a .deb package that has a dependency > on another .deb package that might not be in an available repository (or the > target may not have a network connection at the time of installation). What > I'd like to do, ideally, is embed the dependency inside the parent package. > That way, in the preinst script, it could just install it's dependency. > However, the problem is that when installing the parent package, it locks > the dpkg system so when it, in the preinst step, goes to run dpkg -i on the > embedded .deb file, it can't get a lock and fails. > > Is this something that's fundamentally impossible or is there some way to > achieve what I need? I'm assuming this is for a private package; this set of circumstances would never occur in the Debian archives. >From that perspective, you can do whatever you want. It's not hard to setup a small apt repo (password/IP access restricted, if necessary), or (worst case) have a small shell script glued to a sharchive with both debs that can unshar and dpkg -i both of them. > Also, I want this all to be able to be done from a single dpkg -i package>.deb and not from a script where I could otherwise do dpkg -i > .deb .deb. The reasons for this are limitations on the > current method of distribution. Can't be done; the lock on the package metadata files will be taken. - Matt -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Embedding one .deb inside another
Le 26 nov. 09 à 21:59, Joe Smith a écrit : Hi, I'm having an issue with distributing a .deb package that has a dependency on another .deb package that might not be in an available repository (or the target may not have a network connection at the time of installation). What I'd like to do, ideally, is embed the dependency inside the parent package. That way, in the preinst script, it could just install it's dependency. However, the problem is that when installing the parent package, it locks the dpkg system so when it, in the preinst step, goes to run dpkg -i on the embedded .deb file, it can't get a lock and fails. I believe that one way would be for the content on the depended-upon package to be in the depending package. The depending package should then "Provides:" the depended-upon package. This is still an ugly solution. Unless in a very controlled environment, that will eventually cause problems. T. -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Embedding one .deb inside another
On Fri, Nov 27, 2009 at 4:59 AM, Joe Smith wrote: > I'm having an issue with distributing a .deb package that has a dependency > on another .deb package that might not be in an available repository (or the > target may not have a network connection at the time of installation). What > I'd like to do, ideally, is embed the dependency inside the parent package. That is a really weird thing to want to do and is certainly not something to be encouraged. Normally one would just use dependency resolution. Is there some reason you cannot just put both packages in a repository (Debian main or otherwise) and use apt as per normal? If you're looking for a way to download packages from another system and install them on an offline machine via sneakernet, try apt-zip or one of the alternatives listed on the wiki page: http://wiki.debian.org/AptZip -- bye, pabs http://wiki.debian.org/PaulWise -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Embedding one .deb inside another
On Thu, 2009-11-26 at 12:59 -0800, Joe Smith wrote: > Is this something that's fundamentally impossible or is there some way > to achieve what I need? I believe this is fundamentally impossible given your description of the constraints; as you've discovered, dpkg will take out a lock on its status files, so the only way is to pass both packages on the command line (possibly using apt). dpkg has no dependency resolution of its own. You could pass --admindir in the invocation in the preinst to get dpkg to temporarily look at a different copy of its files; then merge back the changes outside of dpkg without respecting the locks somehow; but this would be a very silly thing to do, and probably still impossible. :) -- Tim Retout -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Embedding one .deb inside another
Hi, I'm having an issue with distributing a .deb package that has a dependency on another .deb package that might not be in an available repository (or the target may not have a network connection at the time of installation). What I'd like to do, ideally, is embed the dependency inside the parent package. That way, in the preinst script, it could just install it's dependency. However, the problem is that when installing the parent package, it locks the dpkg system so when it, in the preinst step, goes to run dpkg -i on the embedded .deb file, it can't get a lock and fails. Is this something that's fundamentally impossible or is there some way to achieve what I need? I don't want to embed the contents of the dependent package into the parent, as there might be other things depending on the same package. Also, I'd like to have a seamless transition to putting the dependency on a repository if possible later. Also, I want this all to be able to be done from a single dpkg -i .deb and not from a script where I could otherwise do dpkg -i .deb .deb. The reasons for this are limitations on the current method of distribution. Thanks, Clancy