From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1638B138330 for ; Mon, 26 Sep 2016 05:50:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9884E0C36; Mon, 26 Sep 2016 05:50:04 +0000 (UTC) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D6FB1E0C35 for ; Mon, 26 Sep 2016 05:50:01 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id s29so8982744lfg.3 for ; Sun, 25 Sep 2016 22:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=FzRPzHod+4iFUpoUvS8m0kmiHJ05+zRpugQbNvZqOaU=; b=O9U0pEq+n5S2qZeYtA5prjm5bAtdZDT5hjgiPl1k0hEeUUQdE/IatXe3iksHuIsDtG 0BBBVUlPlNx79nEuOYuJr0InRJRvuMhzYs2w/uHgkV5IpOjzkl9KYOdE9HyeprtceF7v o5rp+b8fgr9TwCF9EgLOZanmVP0LLW/82IexYxVV6XlPgH0f3n8JZ0sYYqe7Zfrihwv1 0kwDCGYNdJALzdlv+qQM6hEh5FLbe5pui5heOHxIVjx48L0KeZhCtY3T/JUbzfgWjeS+ c8QN7LtQupu8+aq7cvHeTiNlnHkaZnd+OzmKna/hz196jx483RTg9LpLkW8rggRNyP3h L1BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=FzRPzHod+4iFUpoUvS8m0kmiHJ05+zRpugQbNvZqOaU=; b=m0K5G1aStTMV3lPx8V7cxw52oRrGb+TR8+jSexIERP3pH6IQh7Kb1mYO4RUv1pnXQG wRf+YeDCW0yWgQw9nJGdHtJKw6GefJHRgyO+rjzLGd38XVFYFU50nZBGtRA+P3QI/fqc j+y1pI6xvVltYGIZCEQgnABmwTtoIWrf/SX++UIZAm4MyADb2PYcrmtvlzNL2c9RB64k nxvNAERKqSIJx+OO8+/RlHtRwhC2Z0H/zfbrH829f7yY1Ld6SrelR90dV7TZolEIJ560 52H3cz7j1TlzjuwtxjVkeqyrpeT4sWWACZZ601gKyWjzi67JIzgrC8ZgZ5BCyBtnOgFB iKgA== X-Gm-Message-State: AE9vXwNF3TOFVaPkXfL4P1UDTXtHgk6HlPlEOELwavBvz06u4NAGKOvKD0L8dXcztrj7Xj+obaKc1KnXatNrfA== X-Received: by 10.25.166.2 with SMTP id p2mr6759988lfe.134.1474868999880; Sun, 25 Sep 2016 22:49:59 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Sender: zmedico@gmail.com Received: by 10.114.185.133 with HTTP; Sun, 25 Sep 2016 22:49:59 -0700 (PDT) From: Zac Medico Date: Sun, 25 Sep 2016 22:49:59 -0700 X-Google-Sender-Auth: aJAAFfnNOjYQpnLuxYiN1eN_DmA Message-ID: Subject: Re: [gentoo-portage-dev] [PATCH v2] AbstractEbuildProcess: disable ipc_daemon under Windows Subsystem for Linux To: gentoo-portage-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 1fb5d246-75d4-4177-8cf5-602aea8feed3 X-Archives-Hash: b0c27bce9f0ccffee2e2923145741a7b On Thu, Sep 22, 2016 at 8:48 PM, Zac Medico wrote: > On Thu, Sep 22, 2016 at 8:23 PM, Kerin Millar wrote: >> Duly updated to use any instead of ==, as recommended by Brian Dolbec. >> >> -- >> Kerin Millar > > 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: > > https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/util/_eventloop/EventLoop.py?h=portage-2.3.1#n597 > > 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: > > https://github.com/Microsoft/BashOnWindows/issues/423 > > 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/locks.py, and watch the tests succeed: $ pym/portage/tests/runTests.py pym/portage/tests/ebuild/test_ipc_daemon.py 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/locks.py which checks for a broken fcntl.lockf, and falls back to fcntl.flock in that case. Thanks, Zac