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 9142113888F for ; Wed, 7 Oct 2015 04:04:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7EE9E0845; Wed, 7 Oct 2015 04:03:59 +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 56A33E0845 for ; Wed, 7 Oct 2015 04:03:59 +0000 (UTC) Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 2D428340676 for ; Wed, 7 Oct 2015 04:03:58 +0000 (UTC) Date: Wed, 7 Oct 2015 00:03:57 -0400 From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH] support: delete unused code Message-ID: <20151007040357.GM6518@vapier.lan> Mail-Followup-To: gentoo-catalyst@lists.gentoo.org References: <1444167907-17673-1-git-send-email-vapier@gentoo.org> <20151006193118.56226664.dolsen@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bgLLobvf7eP6VP5c" Content-Disposition: inline In-Reply-To: <20151006193118.56226664.dolsen@gentoo.org> X-Archives-Salt: 0b7ab98b-16a7-498f-8dbb-d238f0b4c786 X-Archives-Hash: d5fa1f6825e8cfcb494bc4bbff6c4998 --bgLLobvf7eP6VP5c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 06 Oct 2015 19:31, Brian Dolbec wrote: > On Tue, 6 Oct 2015 17:45:07 -0400 Mike Frysinger wrote: > > Using the vulture tool (and verifying a bit with `git grep`), > > delete various bits of code from this module that aren't used. > > --- > > catalyst/support.py | 28 ---------------------------- > > 1 file changed, 28 deletions(-) > >=20 > > diff --git a/catalyst/support.py b/catalyst/support.py > > index f184ed7..62be63a 100644 > > --- a/catalyst/support.py > > +++ b/catalyst/support.py > > @@ -1,7 +1,6 @@ > > =20 > > import glob > > import sys > > -import string # pylint: disable=3Ddeprecated-module > > import os > > import types > > import re > > @@ -11,35 +10,8 @@ from subprocess import Popen > > =20 > > from catalyst.defaults import verbosity, valid_config_file_values > > =20 > > -selinux_capable =3D False > > -#userpriv_capable =3D (os.getuid() =3D=3D 0) > > -#fakeroot_capable =3D False > > - > > BASH_BINARY =3D "/bin/bash" > > =20 > > -# set it to 0 for the soft limit, 1 for the hard limit > > -DESIRED_RLIMIT =3D 0 > > -try: > > - import resource > > - > > max_fd_limit=3Dresource.getrlimit(resource.RLIMIT_NOFILE)[DESIRED_RLIMI= T] > > -except Exception: > > - # hokay, no resource module. > > - max_fd_limit=3D256 >=20 > Are you sure this is not needed? Because I recall having to fix the > code because the API had changed, otherwise I couldn't get catalyst to > run. But to be honest, catalyst is the only place I've seen this ever > used. And so it is likely not needed. as long as we can assume that nothing is importing catalyst, i can't see code that uses these things picking max_fd_limit randomly, it was used until this commit: 36610754ba2daca723064021001c5128d83e8f21 where things were gutted significantly. same goes for selinux_capable -mike --bgLLobvf7eP6VP5c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWFJmtAAoJEEFjO5/oN/WBPsUQANoeQmzUR4muHJrzsoxeabMK PYkQytR4FZ19y0/lXK/QhhNjx1HiaO3FMeVlmUo0QDLIsXddMnd8ShJdBZOKWevZ l2wcKFWD4jPYBu9v5g6nbXR1DOsKaP32wGHhkmcg+hyMzhh263haOsZFxIuNHuTG 7UL3EGxUR4QnjitKJXhFtgqMHNYlCz7O3f0/e/AIR5xrVbR24ul6F5fFtUagn03a 6zVY4apHj1ydxW1KEEy3m3A4FhMbymr5GiTOWOQWWC5MfQT4uRqblJT9XmjOeW0M j6AYJBGC756Fh/a/Pn9eHY0uQuFUpSMZfRnHvdv8jaABLqvVQoB3go0cLOysimAA 1nayCNhcfAxcbXuboRZe4C1qBDBn6Zli0ffKtGe8pUWvOGsntECN6RojklyAZeSV YSWk0a0yabXdeI2EmL8h9kIoI6pBJvjDAHuZSpgLnq34iPBNLGRXgTSy9qDwcSH2 BMrd2uDdPQTfWYNVA7lUsRD7xwiOyiHg7E1GcCTskDgEylDWQ3WmUzqK1/1XVZVD xrrly1IJIZhafq23zAHvaN3JL/mlDbxG2GzxWPk16L8ExWRdAeeimXdJGgt05TPY Y0FjUsF85y52L31hcZwa/Vff8joqMS1PmrbR6jJAicm8rvhT/38qLsoVukiVz7ey /LcvqZjEDoX43qXW4q5b =RQsd -----END PGP SIGNATURE----- --bgLLobvf7eP6VP5c--