diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2016-01-06 21:02:56 +0300 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2016-01-06 21:03:02 +0300 |
commit | 374ed6b5e0c3ded82bd356bb025a0b292594060d (patch) | |
tree | 6d359d1b18c2b72df0bd79559ec33f5f9a8d169d | |
parent | e6f6a1540dab28b7c46a833f94df78e1efe00d90 (diff) | |
download | pkg-kde-tools-374ed6b5e0c3ded82bd356bb025a0b292594060d.tar.gz |
pkgkde-mark-qt5-private-symbols: Do nothing when alternative is not specified.
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | pkgkde-mark-qt5-private-symbols | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 2199ee6..4b9b8d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ pkg-kde-tools (0.15.21) UNRELEASED; urgency=medium * pkgkde-mark-qt5-private-symbols: - Make --write-results option the default, add option --print-diff for the old behavior. + - Do not try to mark private symbols if alternative dependency is not + specified in the symbols file. -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Wed, 06 Jan 2016 20:52:49 +0300 diff --git a/pkgkde-mark-qt5-private-symbols b/pkgkde-mark-qt5-private-symbols index a547453..56eedb6 100755 --- a/pkgkde-mark-qt5-private-symbols +++ b/pkgkde-mark-qt5-private-symbols @@ -36,6 +36,7 @@ from sys import stdout, stderr def process_symbols_file(symbols_file_path, write_results=False): old_lines = [] new_lines = [] + has_alternative = False with open(symbols_file_path) as symbols_file: for line in symbols_file: old_lines.append(line) @@ -44,8 +45,13 @@ def process_symbols_file(symbols_file_path, write_results=False): line = line[:-2] if '@Qt_5_PRIVATE_API' in line: line += ' 1' + if line.startswith('| '): + has_alternative = True new_lines.append(line + '\n') - if write_results: + if not has_alternative: + print('Skipping file %s, no alternative dependency specified.' % + symbols_file_path) + elif write_results: with open(symbols_file_path, 'w') as symbols_file: for line in new_lines: symbols_file.write(line) |