summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2016-01-06 20:54:00 +0300
committerDmitry Shachnev <mitya57@gmail.com>2016-01-06 20:54:00 +0300
commite6f6a1540dab28b7c46a833f94df78e1efe00d90 (patch)
treeb268aa09fc12699f767ac23bff26dc0a8150ca1d
parente673d031ed466de0dd453c3a0a3f7d971e844839 (diff)
downloadpkg-kde-tools-e6f6a1540dab28b7c46a833f94df78e1efe00d90.tar.gz
pkgkde-mark-qt5-private-symbols: Make --write-results option the default.
Add option --print-diff for the old behavior.
-rw-r--r--debian/changelog4
-rw-r--r--man1/pkgkde-mark-qt5-private-symbols.17
-rwxr-xr-xpkgkde-mark-qt5-private-symbols12
3 files changed, 15 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index b5c91fc..2199ee6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
pkg-kde-tools (0.15.21) UNRELEASED; urgency=medium
+ [ Dmitry Shachnev ]
+ * pkgkde-mark-qt5-private-symbols:
+ - Make --write-results option the default, add option --print-diff for the
+ old behavior.
-- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Wed, 06 Jan 2016 20:52:49 +0300
diff --git a/man1/pkgkde-mark-qt5-private-symbols.1 b/man1/pkgkde-mark-qt5-private-symbols.1
index b2597aa..c39ef9d 100644
--- a/man1/pkgkde-mark-qt5-private-symbols.1
+++ b/man1/pkgkde-mark-qt5-private-symbols.1
@@ -5,7 +5,7 @@
\- a helper tool to mark private symbols in Qt symbols files
.SH SYNOPSIS
-.B pkgkde\-mark\-qt5\-private\-symbols [ \-\-write\-results ]
+.B pkgkde\-mark\-qt5\-private\-symbols [ \-\-write\-results | \-\-print\-diff ]
.SH DESCRIPTION
\fBpkgkde\-mark\-qt5\-private\-symbols\fR is a helper tool to mark private
@@ -14,9 +14,8 @@ buildsystem.
Symbols that are tagged with \fBQt_5_PRIVATE_API\fR will be marked as private.
-\fBpkgkde\-mark\-qt5\-private\-symbols\fR will by default write the differences
-as patches to stdout. If the option \fB\-\-write\-results\fR is passed, it will
-instead overwrite the original symbols files.
+If \fB\-\-print\-diff\fR option is passed, this script will print the diff
+into stdout instead of overwriting the original symbols files.
.SH LICENSE
This program is free software distributed under the terms of the Expat license.
diff --git a/pkgkde-mark-qt5-private-symbols b/pkgkde-mark-qt5-private-symbols
index 8514ac2..a547453 100755
--- a/pkgkde-mark-qt5-private-symbols
+++ b/pkgkde-mark-qt5-private-symbols
@@ -58,13 +58,17 @@ def process_symbols_file(symbols_file_path, write_results=False):
if __name__ == '__main__':
parser = ArgumentParser(description=__doc__)
- parser.add_argument('--write-results',
- help='write results back into symbols files',
- action='store_true')
+ group = parser.add_mutually_exclusive_group()
+ group.add_argument('--write-results',
+ help='write results back into symbols files (default)',
+ action='store_false')
+ group.add_argument('--print-diff',
+ help='print diffs into stdout instead of applying them',
+ action='store_true')
args = parser.parse_args()
symbols_files = glob('debian/*.symbols')
if not symbols_files:
print('No symbols files found!', file=stderr)
for symbols_file_path in symbols_files:
- process_symbols_file(symbols_file_path, args.write_results)
+ process_symbols_file(symbols_file_path, not args.print_diff)