public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-1-g5ff865b Date: Thu, 07 Jul 2016 18:04:00 -0000 [thread overview] Message-ID: <20160707180411.6838.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=5ff865b263bedd6eb1ae167b584074a7e11be800 commit 5ff865b263bedd6eb1ae167b584074a7e11be800 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Thu Jul 7 16:47:59 2016 +0100 Requiring a source-only package is an error Also, make that check, and check for self-requires even if -okmissing=required-package is used. Diff: --- calm/package.py | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/calm/package.py b/calm/package.py index 571b22e..2ad2c7e 100755 --- a/calm/package.py +++ b/calm/package.py @@ -278,18 +278,26 @@ def validate_packages(args, packages): for p in sorted(packages.keys()): logging.debug("validating package '%s'" % (p)) - if 'required-package' not in getattr(args, 'okmissing', []): - # all packages listed in requires must exist - if 'requires' in packages[p].hints: - for r in packages[p].hints['requires'].split(): - if r not in packages: + if 'requires' in packages[p].hints: + for r in packages[p].hints['requires'].split(): + + # a package should not appear in it's own requires + if r == p: + lvl = logging.WARNING if p not in past_mistakes.self_requires else logging.INFO + logging.log(lvl, "package '%s' requires itself" % (p)) + + # all packages listed in requires must exist (unless okmissing + # says that's ok) + if r not in packages: + if 'required-package' not in getattr(args, 'okmissing', []): logging.error("package '%s' requires nonexistent package '%s'" % (p, r)) error = True + continue - # a package is should not appear in it's own requires - if r == p: - lvl = logging.WARNING if p not in past_mistakes.self_requires else logging.INFO - logging.log(lvl, "package '%s' requires itself" % (p)) + # requiring a source-only package makes no sense + if 'skip' in packages[r].hints: + logging.error("package '%s' requires source-only package '%s'" % (p, r)) + error = True # if external-source is used, the package must exist if 'external-source' in packages[p].hints:
reply other threads:[~2016-07-07 18:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160707180411.6838.qmail@sourceware.org \ --to=jturney@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).