[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg -i from within postinst script



2008/11/13 François Cerbelle <francois@cerbelle.net>:
>
> Le Jeu 13 novembre 2008 11:27, Tzafrir Cohen a écrit :
>> On Thu, Nov 13, 2008 at 09:55:09AM +0000, Anton Piatek wrote:
>>> I work for a company that uses a specific java build - we are only
>>> allowed to download it from a specific internal site, that is
>>> authenticated.
>>> I have written a package that downloads and builds it into a deb
>>> (using make-jpkg + extra definitions) as part of the postinst script.
>>> I would like it to install the package too, however everything i have
>>> tried doesnt work
>
> You can not do that. It means that your package will rebuild the child
> package everytime it is installed ??? Furthermore, where a package (yours)
> is installing, the dpkg/apt database is locked to prevent another dpkg/apt
> from modifying it. So you will not be able to do such a strange thing.
>
> You should prepare a source package which use uscan or uupdate to check
> for new version availlability. So, you just have to rebuild the package
> each time the upstream release a new version. And push it in an intern
> repository (instead of your current package).
>
> If you can not embed the Java in your package (as Flash, for example),
> your package will only download and install the Java files in the postinst
> script and remove theses files in the prerm script.
>
> Your problem is not different than all the packages built upon upstream
> (non-debian) sources.

I am fully aware of how apt and dpkg are supposed to work - I cannot
ship a precompiled deb for legal reasons, so either each user builds
and installs it manually, or I try to help them.
Installing this package pops up a debhelper choice of which packages
they want to build and install. I suppose I am closest to m-a in how
it is working.
I would rather that this package pops up a menu each time it is
reinstalled as it means users have some way of knowing a new upstream
package is available should they wish to build and install it.

I am also fully aware of how nasty this is, however I am tied by legal
requirements with this package that each user has to download it
themselves so the download is tracked.
Trying to help, I came up with a script that can build and install the
package, and I would like to put this script in a deb, and have it
autorun so that we can make other packages depend on this one such
that a user has a chance of getting the package built and installed
easily

Anton


-- 
Anton Piatek
email: anton@piatek.co.uk	
blog/photos:			http://www.strangeparty.com
pgp: [0xB307BAEF]	(http://www.strangeparty.com/anton.asc)
fingerprint: 116A 5F01 1E5F 1ADE 78C6 EDB3 B9B6 E622 B307 BAEF

No trees were destroyed in the sending of this message, however, a
significant number of electrons were terribly inconvenienced.


Reply to: