At Mon, 23 Feb 2009 14:00:44 +0000, Enrico Zini wrote: > > [1 <text/plain; utf-8 (quoted-printable)>] > 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.
If you try pbuilder --login (or cowbuilder --login), you have /usr/sbin/policy-rc.d available inside the chroot. -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org