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 B64FB138247 for ; Sun, 19 Jan 2014 09:38:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B524E0C07; Sun, 19 Jan 2014 09:38:34 +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 79B4FE0C03 for ; Sun, 19 Jan 2014 09:38:33 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B1DED33F933; Sun, 19 Jan 2014 09:38:32 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH 1/3 v2] Have repoman check if the packages to unpack rare archive formats from SRC_URI are present in DEPEND (bug #205909). Date: Sun, 19 Jan 2014 04:38:31 -0500 User-Agent: KMail/1.13.7 (Linux/3.12.1; KDE/4.6.5; x86_64; ; ) Cc: Tom Wijsman References: <1389830840-25848-2-git-send-email-tomwij@gentoo.org> <1389999837-16516-1-git-send-email-tomwij@gentoo.org> In-Reply-To: <1389999837-16516-1-git-send-email-tomwij@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="nextPart3826317.JDbcOIyxel"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201401190438.32666.vapier@gentoo.org> X-Archives-Salt: 65fcab8c-67eb-491b-89d5-c38b1186d89c X-Archives-Hash: 5220a242ba5b9e0b7a75268f469fa2f8 --nextPart3826317.JDbcOIyxel Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Friday 17 January 2014 18:03:57 Tom Wijsman wrote: > --- please shorten your commit summary and move more content to the body > +getNonSystemArchiveDepends.archivers =3D { it is super weird to attach to the object like this. some might even say=20 wrong. move it into the class definition. def getNonSystemArchiveDepends(fetchlist, eapi): ... ARCHIVERS =3D { ... } > + re.compile('.*\.7[zZ]$'):"app-arch/p7zip", regexes should always use raw strings. there should also be a space after = the=20 colon in dicts. so you want: re.compile(r'.*\.7[zZ]$'): 'app-arch/p7zip', > + re.compile('.*\.lzma$'):"app-arch/lzma-utils", xz-utils, not lzma-utils > + re.compile('.*\.(bz2?|tbz2)$'):"app-arch/bzip2", > + re.compile('.*\.(tar(\.(bz2?|gz|Z))?|tbz2|t[bg]z)?$'):"app-arch/tar", > + re.compile('.*\.(gz|tar\.Z|t[bg]z|[zZ])$'):"app-arch/gzip", > + re.compile('.*\.tar.xz$'):"app-arch/tar", requiring people list gzip, tar, and bzip2 is a significant policy change=20 (which i'm inclined to say is wrong). it needs discussion on the dev maili= ng=20 list first. > +def checkArchiveDepends(atoms, catpkg, relative_path, \ > + system_set_atoms, needed_unpack_depends, stats, fails): you don't need the \ there because you have paren already to gather things. > + for entry in needed_unpack_depends[catpkg]: > + if entry not in [atom.cp for atom in atoms if atom !=3D "||"]: > + stats['unpack.' + mytype + '.missing'] +=3D 1 > + fails['unpack.' + mytype + '.missing'].append( \ > + relative_path + ": %s is missing in %s" % \ > + (entry, mytype)) i know existing style doesn't follow it, but imo we should avoid string=20 concatenation. it makes the code harder to read imo. key =3D 'unpack.%s.missing' % mytype stats[key] +=3D 1 fails[key].append(...) > +def eapi_has_xz_utils(eapi): > + return eapi not in ("0", "1", "2") i would use "eapi_supports_xz_archives" unless there's a pre-existing style =2Dmike --nextPart3826317.JDbcOIyxel 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) iQIcBAABAgAGBQJS250YAAoJEEFjO5/oN/WBBJsP/Rf352zC+wzVRcRPaOp2VrNV pmsDhK7+6T0lIido9h6jRe1mfm9BrTAeJaE1dTK/Er2c5xMqSJhIpeizoOuilgbF 7+AedOhlq1tNEJgHYhxBxRKivdCP80vu3k/XgqJafFR/eNSoGfGjTWdt/5ISPR6K mhfMiiojcTfoInK6cYMGJcTe+5m0ACTUyLwlADFwMXau0l49oFVvb9mw3b6nb55Z pZtOlGiTAgoh5GZoA3ONIlZB48SqBEHK5h1wcaje/jTYHKZY57UtBuiYlGplHDRW qHnPAHxHRwaRmjH4ZcKPCatDLmGyGEPaAyyDkc7wez6Rtj1xqfQJKsvJP57BSLIE c1+CKR07uD5kx2777j8ltQyNzFLuU8DkxD84ANUfEX0605GCKTiN5v571Tyishbu EoK1GkF/mvmVKW+Cc6RreidNOEu+/qTlkhYCXaP4W7NKSyMjVdAUuXOxZKrGnh66 L6IfcOgXwC2rQn65lm4sB4a7l46aCskIdyi1vw6q6dBD4zLHo0+ueYTtgJLNaaIL wPH8oQE8B5SgardIPEhLqxMOZ2DauYt+jCJ4dbKVAMuiJDhF+CuXwV/hiLILaY+0 3NvVTU7ncUlOeTZOs2Atz8Wb892A0MGgHRd+2wOaz9bgM9P5EVoY+fHClM5Krf7t K2qRbsxFMpCDGlNEwLfJ =/NS/ -----END PGP SIGNATURE----- --nextPart3826317.JDbcOIyxel--