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 DB645138247 for ; Tue, 21 Jan 2014 03:32:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02A17E0D79; Tue, 21 Jan 2014 03:32:39 +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 6812AE0D78 for ; Tue, 21 Jan 2014 03:32:38 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id E026933FA13 for ; Tue, 21 Jan 2014 03:32:34 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH v4] 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: Mon, 20 Jan 2014 22:32:39 -0500 User-Agent: KMail/1.13.7 (Linux/3.12.1; KDE/4.6.5; x86_64; ; ) References: <201401190417.41690.vapier@gentoo.org> <1390265454-20585-1-git-send-email-creffett@gentoo.org> In-Reply-To: <1390265454-20585-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="nextPart1769544.L0hzEAmxId"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201401202232.39460.vapier@gentoo.org> X-Archives-Salt: 17277ffe-efc3-4c17-8524-cd7b4888bdee X-Archives-Hash: b1f339c3a6ef17e427465953df3adf6e --nextPart1769544.L0hzEAmxId Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Monday 20 January 2014 19:50:54 Chris Reffett wrote: > + # Check for read-only filesystems please use full sentences. that means putting a period at the end. this=20 applies to many additions in this patch. > + try: > + with io.open("/proc/mounts", mode=3D'r',=20 encoding=3D_encodings['content'], > + errors=3D'replace') as f: > + roregex =3D re.compile(r'(\A|,)ro(\Z|,)') > + for line in f: > + if roregex.search(line.split(" ")[3].strip()) is not=20 None: > + romount =3D line.split(" ")[1].strip() > + ro_filesystems.add(romount) pretty sure the body of this with block is indented one too many times =2Dmike --nextPart1769544.L0hzEAmxId 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) iQIcBAABAgAGBQJS3epXAAoJEEFjO5/oN/WBn5AP/265lJmMq12S/aQD+W0l9HqC b1tCFHPs+AnWxgCrmME8iETTNp/FSD81QbhXNzFGcCgAo+9+uQfDYNNczYo5lQMJ /lrsPSnRrSPBLNcYyf2AJMAhIDDnqQbTrjCZTSEMCc4Vi9VwoWmyKjyBSDe0d+mK G0UN11jcAAZP1e40q8+UtfuYtqVj+r1t08ujenIntEDVwQWTXG6eXuQWL5SNgngw ljDCyoz3bYo2AeXsfaA56qaneyxAIgEKx9tzdaZwxPuWW0nJ0xWunDdGeF9L91pq Gbgef/HDBYitwtw5q8/dWwfURcPS5NvEWe22U7TjnD3yXGu8uWLGGZhKP5JyU+2p w+JeU5AGuFEWh0+YEM+M8sM5MKF3pHAgoFPlpmN9NZ6Hwd9FdNBLCybFGUChtvRm ixIFonAuacZ2WYQeG60QPQOEphN8eE5IrLEA5FvXrxetVcvs3/zo1LwmNilxo9LE XS5Jpok+Eh7DewGbPa2AB2r7K2kfP8/46Xz5IjwHFgmVCdRhsCwU4OU0IVo7yEXj qAdBS9HExvWqxtxKvrVV9oMj8qd+2OaZcRBSiArgMBI2Iybd3Ggnk6AsQJsZjzui SvtRkcZBqeEhzwSKPaxVwH8Ou0O1rNsyKoeosao5/k5ZQ/sD7CEZQUio30aLY67W ndwiw2EYCLEagZ7bbkEj =jWzi -----END PGP SIGNATURE----- --nextPart1769544.L0hzEAmxId--