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

Re: How to detect if inside a buildd chroot



ke, 2007-09-26 kello 13:49 -0700, Tyler MacDonald kirjoitti:
>   Yep... but I still find it a bit annoying that I have to override
> binaries
> like start-stop-daemon or invoke-rc.d when building a chroot. I wish there
> was a way to just set a flag that means "dpkg, don't start/stop any
> services!"... instead I end up doing stuff like:

That shouldn't be necessary anymore. The policy-rc.d trick that has been
mentioned in this thread a couple of times should work fine. Here's the
code in piuparts which does it:

        full_name = os.path.join(self.name, "usr/sbin/policy-rc.d")
        create_file(full_name, "#!/bin/sh\nexit 101\n")
        os.chmod(full_name, 0777)

-- 
Copyrights, patents, trademarks: not property, not rights, but
priviledges!



Reply to: