Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH v2] AbstractEbuildProcess: disable ipc_daemon under Windows Subsystem for Linux
Date: Mon, 26 Sep 2016 05:50:08
On Thu, Sep 22, 2016 at 8:48 PM, Zac Medico <zmedico@g.o> wrote:
> On Thu, Sep 22, 2016 at 8:23 PM, Kerin Millar <kfm@×××××××××.net> wrote: >> Duly updated to use any instead of ==, as recommended by Brian Dolbec. >> >> -- >> Kerin Millar <kfm@×××××××××.net> > > My first choice would be to use a small test case to detect when ipc > is broken, and disable it dynamically. A good example of such a test > is the can_poll_device function here: > > > > If it's not possible to use a test similar to the above, maybe it's > best to use /proc/version or /proc/sys/kernel/osrelease as mentioned > in the following issue: > > > > Thanks, > Zac
I've started playing around with WSL, and I've discovered that portage's ipc actually works if we use fcntl.flock instead of fcntl.lockf!!! Simply set _default_lock_fn = fcntl.flock in pym/portage/, and watch the tests succeed: $ pym/portage/tests/ pym/portage/tests/ebuild/ testIpcDaemon (portage.tests.ebuild.test_ipc_daemon.IpcDaemonTestCase) ... ok ---------------------------------------------------------------------- Ran 1 test in 1.282s OK So, I'm thinking that we should add a dynamic test inside pym/portage/ which checks for a broken fcntl.lockf, and falls back to fcntl.flock in that case. Thanks, Zac