From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3F660138247 for ; Wed, 22 Jan 2014 05:24:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 521EBE10FC; Wed, 22 Jan 2014 05:24:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A481DE10FB for ; Wed, 22 Jan 2014 05:24:46 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id CD21733FAE9; Wed, 22 Jan 2014 05:24:45 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH v5] Test for read-only filesystems, bail out during preinst if there are any which will be written to and display a useful error message. Fixes bug 378869. Date: Wed, 22 Jan 2014 00:24:49 -0500 User-Agent: KMail/1.13.7 (Linux/3.13.0; KDE/4.6.5; x86_64; ; ) Cc: Chris Reffett References: <201401202232.39460.vapier@gentoo.org> <1390276831-1831-1-git-send-email-creffett@gentoo.org> In-Reply-To: <1390276831-1831-1-git-send-email-creffett@gentoo.org> 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 Content-Type: multipart/signed; boundary="nextPart2396679.bLoZk7mTHR"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201401220024.50409.vapier@gentoo.org> X-Archives-Salt: fd8de7e0-45da-4d6f-bf39-7556a036f5ed X-Archives-Hash: 93db333d7bcdacc636d1fd396e8bda58 --nextPart2396679.bLoZk7mTHR Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Monday 20 January 2014 23:00:31 Chris Reffett wrote: > + if not ro_filesystems: > + return ro_filesystems > + > + for directory in dir_list: > + for filesystem in ro_filesystems: > + if filesystem == directory: > + ro_filesystems_written.add(filesystem) > + > + return ro_filesystems_written is this just the intersection of two sets ? so all this logic could be: return ro_filesystems ^ set(dir_list) -mike --nextPart2396679.bLoZk7mTHR Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJS31YiAAoJEEFjO5/oN/WBHVYP+gOXqsbk04ziRN7ftjfCw3TB 71hGlFnMQ3vG8KflGLoAC8DgW85xCwC2NWZiMhley6tcZY5cVI8ooHMWJ6T97rb/ vP6vkb1wCH+v9C2QkmnonHJHbnj5guP5kPfeQuF8tf9PcsqsiytJ1nQmaWFoHbj9 68Lm++mTj6Hu6iLIxXHxvMSyR02VjIKdXfY8FN9jR9zRK59knpLvh2UWTSTrOORI dWyoU1YkSrax3P3T/RkmG8YeffMr5jzDvWPu5kW8C6nWo7UiixfoPZAgq+9Sp7Ub l1P711TpSnVrowyC+hwRXnDnpmgXWS1vUpvhI0FJCNWI1XWBdLL6B64HkNzVLJLK Tw5CQsLmd+IWIfmwMT5Fk6tegTngJqGPcplzScPqZyhtPqJqHHQAHK4DE595iKuM QZ0KISUBKbhnpJle817sdfid0Lpt67qCKAakqLO6YCPaA1RAxDh5E6dEV1Dt6hrL ZxCt+Phid9qwOexXcfWPAmENvUR4bMDwHMSsJcXnSKJVUq0CZy4pPcZD8dG4TuPY MTPTZXoV0c+10mddyet3DS7l9QjMoDHpWhAqr77gB7+T6vc5AMCSPS7yTXgp9DMN +wFJc2q0VtSJfxl3ygaPpgAIe0N2RRSAjpsvLjJxPYewwg21CJE+jJfye/HnqPPN V/P8QTq+je2x/3ShF2tX =h2qu -----END PGP SIGNATURE----- --nextPart2396679.bLoZk7mTHR--