public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-76-g10a4242
@ 2024-03-26 16:58 Jon Turney
0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2024-03-26 16:58 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=10a4242d26b1fc7c54b9aab8d2d14209fed38e73
commit 10a4242d26b1fc7c54b9aab8d2d14209fed38e73
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Tue Mar 26 13:49:27 2024 +0000
Add replace option to fix-requires-by-path tool as well
Diff:
---
calm/fix-requires-by-path.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/calm/fix-requires-by-path.py b/calm/fix-requires-by-path.py
index 31d86e7..4fa9e65 100644
--- a/calm/fix-requires-by-path.py
+++ b/calm/fix-requires-by-path.py
@@ -70,6 +70,8 @@ def fix_one_hint(args, dirpath, hintfile, tf):
if ivp:
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
@@ -82,7 +84,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):
@@ -109,6 +112,7 @@ if __name__ == "__main__":
parser.add_argument('requires', metavar='DEPATOM', help='require to add')
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 not args.path.startswith('/'):
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-26 16:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 16:58 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-76-g10a4242 Jon Turney
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).