public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon Turney <jturney@sourceware.org> To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-75-gd561703 Date: Mon, 25 Mar 2024 21:59:55 +0000 (GMT) [thread overview] Message-ID: <20240325215955.7D7283858D33@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=d561703e8d4234f6d67eb50ebaa6ec4bf5ed4896 commit d561703e8d4234f6d67eb50ebaa6ec4bf5ed4896 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Mon Mar 25 21:57:22 2024 +0000 Preparations for python3.5 removal https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=73f09ddd6f19c8300e85e80570c7d1d05a675303 commit 73f09ddd6f19c8300e85e80570c7d1d05a675303 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Sun Mar 24 22:22:38 2024 +0000 Improve fix-requires-by-linkage tool to allow it to run on entire relarea Also: allow replacing an existing dependency (e.g python3 -> python35) Also: don't spam with objdump warnings for symlinks https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=db2f6141ef2aa1ff553354eba26a4bb72d7fafc0 commit db2f6141ef2aa1ff553354eba26a4bb72d7fafc0 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Sun Mar 24 16:52:53 2024 +0000 Support an easy way to trigger a relarea rescan via a .touch file This will be used by vault and scan-relarea Diff: --- calm/calm.py | 2 +- calm/fix-requires-by-linkage.py | 22 +++++++++++++++++----- calm/past_mistakes.py | 5 +++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/calm/calm.py b/calm/calm.py index 65e75dc..cf4e397 100755 --- a/calm/calm.py +++ b/calm/calm.py @@ -758,7 +758,7 @@ def do_daemon(args, state): if path.startswith(args.rel_area): # ignore sha512.sum and modifications to setup.* # files in the arch directory - if (filename != 'sha512.sum') and (path.count(os.path.sep) > depth): + if (filename != 'sha512.sum') and ((path.count(os.path.sep) > depth) or filename == ".touch"): action |= Event.read_relarea elif path.startswith(args.stagingdir): action |= Event.read_uploads diff --git a/calm/fix-requires-by-linkage.py b/calm/fix-requires-by-linkage.py index 9f50c29..7de5f3f 100644 --- a/calm/fix-requires-by-linkage.py +++ b/calm/fix-requires-by-linkage.py @@ -59,13 +59,16 @@ def fix_one_hint(args, dirpath, hintfile, tf): if args.requires in requires: return - # check if this package installs linked the specified DLL, and if - # so, add to the requires, if not already present + # check if this package installs executables linked to the specified DLL, + # and if so, add to the requires, if not already present exe = False try: with xtarfile.open(os.path.join(dirpath, tf), mode='r') as a: for m in a.getmembers(): + if not m.isfile(): + continue + if re.search(r'\.(exe|dll)$', m.name): logging.info('Found executable %s' % m.name) a.extract(m) @@ -82,6 +85,8 @@ def fix_one_hint(args, dirpath, hintfile, tf): if exe: requires = hints.get('requires', '').split() if args.requires not in requires: + if args.replace and args.replace in requires: + requires.remove(args.replace) requires.append(args.requires) requires = sorted(requires) modified = True @@ -94,7 +99,8 @@ def fix_one_hint(args, dirpath, hintfile, tf): # write updated hints shutil.copy2(pn, pn + '.bak') hint.hint_file_write(pn, hints) - # os.system('/usr/bin/diff -uBZ %s %s' % (pn + '.bak', pn)) + if args.verbose: + os.system('/usr/bin/diff -uBZ %s %s' % (pn + '.bak', pn)) def fix_hints(args): @@ -108,7 +114,12 @@ def fix_hints(args): pn = root.rsplit('-', 2)[0] - if pn not in args.package: + # is pn in the list of packages (if specified)? + if args.package and (pn not in args.package): + continue + + # it is pointless to check for adding a self-dependency + if pn == args.requires: continue logging.info('Checking %s' % root) @@ -126,9 +137,10 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Add DEPATOM to requires: of packages which contain an executable linked with DLL') parser.add_argument('dll', metavar='DLL', help='DLL to check for linkage') parser.add_argument('requires', metavar='DEPATOM', help='require to add') - parser.add_argument('package', metavar='PACKAGE', action='extend', nargs='+', help='packages to check') + parser.add_argument('package', metavar='PACKAGE', action='extend', nargs='*', help='packages to check') parser.add_argument('-v', '--verbose', action='count', dest='verbose', help='verbose output', default=0) parser.add_argument('--releasearea', action='store', metavar='DIR', help="release directory (default: " + relarea_default + ")", default=relarea_default, dest='relarea') + parser.add_argument('--replace', action='store', metavar='DEPATOM', help="replace existing DEPATOM if present") (args) = parser.parse_args() if args.verbose: diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py index bd3d844..e1bef6b 100644 --- a/calm/past_mistakes.py +++ b/calm/past_mistakes.py @@ -168,6 +168,10 @@ historical_provides = [ # we use regex patterns to match version provides which might have been expired, # or not uploaded yet. nonexistent_provides = historical_provides + [ + # python3 + 'python35-gi', + 'glade3', + # python2 'python2', 'python2-devel', 'python27', @@ -199,6 +203,7 @@ nonexistent_provides = historical_provides + [ 'python2-cython', 'python2-wheel', 'python2-cairo-devel', + # general '_windows', r'perl5_\d+', r'ruby_\d+',
reply other threads:[~2024-03-25 21:59 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=20240325215955.7D7283858D33@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).