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 AB54F138247 for ; Thu, 16 Jan 2014 01:45:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34991E0B5F; Thu, 16 Jan 2014 01:45:45 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4F2D4E0B5D for ; Thu, 16 Jan 2014 01:45:44 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hi8so1571890wib.8 for ; Wed, 15 Jan 2014 17:45:43 -0800 (PST) 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:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=42AGVvqLC8hnwpQvdi15RvCL4PxgKffDDw1J9EYiGA8=; b=QF8/vGNKiMY/aMB5Q82rVCScDeYEs+As22O/rRqnED9s14AI6XROsAhHqqeQ4puCo0 Qmp4pOjq/c6BZjskrP6HkHw4MmrH/iMn8wmfuNAy1d2IuVNx0zbNLyyXkuqNokc8Z5PD kjGRB12QTmwpYDBNgVfP8yOw9qbdIpbFHr1MUJcOPsm9rQMrzHSw4CXo47+ysmyziSy7 ekmVYLwXHMLxIdjfFSSrK2zKp7mluXV5/4htF3VB6qpJ0czcDZnGfeCLw5NlCBLf5TmT wy9C/qlvA2mVLx7MFvEcogdXqj7j+eWjANG5dAPnVpefxEfWq1tsdnaE9/XamWw8rv6i 885w== X-Gm-Message-State: ALoCoQkBbReOFkczq83JZ8QVduxfRrL+F5Eszv9XAMssiuyb3O/9qMwuzl4RkOKlbsnPb3+/a8n6 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 X-Received: by 10.180.107.136 with SMTP id hc8mr5417979wib.11.1389836740517; Wed, 15 Jan 2014 17:45:40 -0800 (PST) Sender: antarus@scriptkitty.com Received: by 10.216.170.129 with HTTP; Wed, 15 Jan 2014 17:45:40 -0800 (PST) X-Originating-IP: [173.8.165.226] In-Reply-To: References: <1389830840-25848-1-git-send-email-tomwij@gentoo.org> <1389830840-25848-3-git-send-email-tomwij@gentoo.org> Date: Wed, 15 Jan 2014 17:45:40 -0800 X-Google-Sender-Auth: B0RBPld-PwwrhfwmAMz8Lc7t5oE Message-ID: Subject: Re: [gentoo-portage-dev] [PATCH 2/3] Have repoman check that a package directory contains at least one ebuild (bug #245305). From: Alec Warner To: gentoo-portage-dev@lists.gentoo.org Content-Type: multipart/alternative; boundary=e89a8f3bad4536f6e404f00c9508 X-Archives-Salt: 73cf1fda-b2fa-4366-bff1-fe65a8eaedec X-Archives-Hash: fb47abeca58803de99c07034044d678d --e89a8f3bad4536f6e404f00c9508 Content-Type: text/plain; charset=UTF-8 On Wed, Jan 15, 2014 at 5:07 PM, Jesus Rivero (Neurogeek) < neurogeek@gentoo.org> wrote: > > On Jan 15, 2014 7:09 PM, "Tom Wijsman" wrote: > > > > --- > > bin/repoman | 8 ++++++++ > > man/repoman.1 | 3 +++ > > 2 files changed, 11 insertions(+) > > > > diff --git a/bin/repoman b/bin/repoman > > index 9b703dc..3263ceb 100755 > > --- a/bin/repoman > > +++ b/bin/repoman > > @@ -330,6 +330,7 @@ qahelp = { > > "SRC_URI.mirror": "A uri listed in profiles/thirdpartymirrors is > found in SRC_URI", > > "ebuild.syntax": "Error generating cache entry for ebuild; > typically caused by ebuild syntax error or digest verification failure", > > "ebuild.output": "A simple sourcing of the ebuild produces > output; this breaks ebuild policy.", > > + "ebuild.missing": "A package directory must at least contain one > ebuild or be treecleaned.", > > "ebuild.nesteddie": "Placing 'die' inside ( ) prints an error, > but doesn't stop the ebuild.", > > "variable.invalidchar": "A variable contains an invalid > character that is not part of the ASCII character set", > > "variable.readonly": "Assigning a readonly variable", > > @@ -1466,6 +1467,13 @@ for x in effective_scanlist: > > can_force = False > > continue > > > > + if len(ebuildlist) == 0: > I'd rather see: > if not ebuildlist: > > Agreed, "if not list" is how you check if a list is empty. -A > > + stats["ebuild.missing"] += 1 > > + fails["ebuild.missing"].append("%s must at least contain > one " % x + \ > > + "ebuild or be treecleaned.") > > + can_force = False > > + continue > > + > > # Sort ebuilds in ascending order for the KEYWORDS.dropped check. > > ebuildlist = sorted(pkgs.values()) > > ebuildlist = [pkg.pf for pkg in ebuildlist] > > diff --git a/man/repoman.1 b/man/repoman.1 > > index e739d56..2bf3765 100644 > > --- a/man/repoman.1 > > +++ b/man/repoman.1 > > @@ -301,6 +301,9 @@ Ebuilds that exist but have not been added to cvs > > .B ebuild.output > > A simple sourcing of the ebuild produces output; this breaks ebuild > policy. > > .TP > > +.B ebuild.missing > > +A package directory must at least contain one ebuild or be treecleaned. > > +.TP > > .B ebuild.patches > > PATCHES variable should be a bash array to ensure white space safety > > .TP > > -- > > 1.8.5.2 > > > > > > Everything else looks good to me. > > Cheers, > --e89a8f3bad4536f6e404f00c9508 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On W= ed, Jan 15, 2014 at 5:07 PM, Jesus Rivero (Neurogeek) <= ;neurogeek@gentoo= .org> wrote:


On Jan 15, 2014 7:09 PM, "Tom Wijsman" <tomwij@gentoo.org> wrote:
>
> ---
> =C2=A0bin/repoman =C2=A0 | 8 ++++++++
> =C2=A0man/repoman.1 | 3 +++
> =C2=A02 files changed, 11 insertions(+)
>
> diff --git a/bin/repoman b/bin/repoman
> index 9b703dc..3263ceb 100755
> --- a/bin/repoman
> +++ b/bin/repoman
> @@ -330,6 +330,7 @@ qahelp =3D {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "SRC_URI.mirror": "A uri li= sted in profiles/thirdpartymirrors is found in SRC_URI",
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "ebuild.syntax": "Error gen= erating cache entry for ebuild; typically caused by ebuild syntax error or = digest verification failure",
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "ebuild.output": "A simple = sourcing of the ebuild produces output; this breaks ebuild policy.", > + =C2=A0 =C2=A0 =C2=A0 "ebuild.missing": "A package dir= ectory must at least contain one ebuild or be treecleaned.",
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "ebuild.nesteddie": "Placin= g 'die' inside ( ) prints an error, but doesn't stop the ebuild= .",
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "variable.invalidchar": "A = variable contains an invalid character that is not part of the ASCII charac= ter set",
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 "variable.readonly": "Assig= ning a readonly variable",
> @@ -1466,6 +1467,13 @@ for x in effective_scanlist:
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 can_force =3D = False
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue
>
> + =C2=A0 =C2=A0 =C2=A0 if len(ebuildlist) =3D=3D 0:
I'd rather see:
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if= not ebuildlist:

Ag= reed, "if not list" is how you check if a list is empty.

-A
=C2=A0
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 stats["ebuild.= missing"] +=3D 1
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fails["ebuild.= missing"].append("%s must at least contain one " % x + \
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 "ebuild or be treecleaned.")
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 can_force =3D False=
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue
> +
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Sort ebuilds in ascending order for the = KEYWORDS.dropped check.
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ebuildlist =3D sorted(pkgs.values())
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ebuildlist =3D [pkg.pf for pkg in ebuildlist]
> diff --git a/man/repoman.1 b/man/repoman.1
> index e739d56..2bf3765 100644
> --- a/man/repoman.1
> +++ b/man/repoman.1
> @@ -301,6 +301,9 @@ Ebuilds that exist but have not been added to cvs<= br> > =C2=A0.B ebuild.output
> =C2=A0A simple sourcing of the ebuild produces output; this breaks ebu= ild policy.
> =C2=A0.TP
> +.B ebuild.missing
> +A package directory must at least contain one ebuild or be treecleane= d.
> +.TP
> =C2=A0.B ebuild.patches
> =C2=A0PATCHES variable should be a bash array to ensure white space sa= fety
> =C2=A0.TP
> --
> 1.8.5.2
>
>

Everything else looks good to me.

Cheers,


--e89a8f3bad4536f6e404f00c9508--