update-a-x-i should not run under pbuilder and similar systems

Enrico Zini enrico at enricozini.org
Mon Feb 23 14:00:44 UTC 2009


On Mon, Feb 23, 2009 at 10:26:25PM +0900, Junichi Uekawa wrote:

> > Can it be just a case of:
> > if [ ! -x /usr/sbin/policy-rc.d ] || /usr/sbin/policy-rc.d apt-xapian-index start
> > then
> > 	update-apt-xapian-index --quiet &
> > fi
> Yeah, I think so.  policy-rc.d's original design intent is to have a
> file in init.d with name 'apt-xapian-index' so that users can run
> invoke-rc.d apt-xapian-index.

I've committed all this at git://git.debian.org/collab-maint/apt-xapian-index.git

I've tried it and it does work properly when policy-rc.d is not there.
Could you please give it a try to confirm that it leaves pbuilder alone?

To build the package you just git clone git://git.debian.org/collab-maint/apt-xapian-index.git 
and run debuild.


> > I don't mind to use triggers, but I understand that they are only run at
> > the end of the installation, so it would defeat the idea to start it
> > soon so that at the end of the installation it's almost done.
> > Or is there a way to start triggers sooner?
> Hmm... I understand what you're trying to do here now.  However,
> package installation is a busy process with a lot of disk/CPU load,
> I'm not sure if it's really giving you much advantage by having
> started earlier.

I suppose it depends a lot on what packages get installed; however it
should still be worth it, especially now that people have multi core
CPUs.  On top of that, update-a-x-i should be mostly CPU bound, while
I'd wager that package installation is mostly I/O bound.


> > It seems that the best way so far is to check policy-rc.d.  I've never
> > used it, nor I found documentation about how to query it, so I inferred
> > from invoke-rc.d source code.  If you confirm me the code snippet above
> > on how to query it, I'll be happy to make an upload right away.
> 
> man invoke-rc.d 
> refers you to:
> /usr/share/doc/sysv-rc/README.policy-rc.d
> which is actually available in:
> /usr/share/doc/sysv-rc/README.policy-rc.d.gz
> (filed a bug here...)
> So there is a documentation.

I had found that, which is what I used for the example above, but it
doesn't give detailed instructions on how to invoke it, like what to do
if the script is missing, or what constitutes an initscript ID. Also, I
don't have a policy-rc.d that i could use to test my postinst.

If you could please test a-x-i from git, I'll upload as soon as you give
me a go.


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20090223/a8223623/attachment.pgp 


More information about the Pbuilder-maint mailing list