On Wed, May 28, 2008 at 11:21:38AM +0100, Colin Turner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Hi Tzafir,
> Tzafrir Cohen wrote:
> >> (yet anyway)), live-helper works away solidly, but then crashes in
> >> postinst when the database would ordinarily be created since mysql is
> >> installed, but not running in the chroot.
> > I don't think that debian-live is the only scenario where a package is
> > installed in a chroot.
> No, I'm sure it isn't, but maybe it's the non-running mysql that's the
> >> Is there any accepted way around this? I have thought of special init
> >> scripts and special packages, but I wanted to ask if there was a known
> >> workaround for this problem first.
> > What if mysql is already running on the main system?
> It is / was. I think the issue was that the socket path was pointing to
> the /var/run/ directory in the chroot where there was no running server.
This is somewhat good: if someone tried to connecto to port 3306 and
assumed this this allowed setting up data in the for the package the result
would be a silent failure, which is even worse.
> > Anyway, any chance that application can work with an sqlite database?
> Hmm, I don't know, I've never played with sqlite, but looking at it
> briefly, I think that would cause more work since I'd have to do a lot
> of testing on a new backend to ensure the application still worked
> One workaround I wondered about was amending the postinst script to
> check if it was a live-helper install, and if so to not call the
> database configuration sections. I could then execute an init script
> that performed either a dpkg-reconfigure on the packages or directly
> called a script to import the SQL.
Calling dpkg-reconfigure from an init script? What if dpkg would call
that init script through some other call flow?
What about purging the data? You can no longer rely on the files of the
package to be present for that.
> Does that sound credible, and if so is there a reliable way of detecting
> that I'm in the live-helper build environment?
What other legitimate reasons are there for mysql-server not to be
* Package is being test-installed in a pbuilder environment :-)
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir