summaryrefslogtreecommitdiff
path: root/prepare-release
diff options
context:
space:
mode:
Diffstat (limited to 'prepare-release')
-rwxr-xr-xprepare-release178
1 files changed, 100 insertions, 78 deletions
diff --git a/prepare-release b/prepare-release
index 969e9bc45..d62212eff 100755
--- a/prepare-release
+++ b/prepare-release
@@ -224,88 +224,110 @@ elif [ "$1" = 'coverage' ]; then
'apt-inst' 'apt-inst/deb' 'apt-inst/contrib' 'apt-private'
done
genhtml --output-directory "${DIR}" "${DIR}/apt.coverage.fixed" ${LCOVRC}
-elif [ "$1" = 'spellcheckers' ]; then
- echo '### codespell in source directories:'
- codespell --enable-colors $(find . -mindepth 1 -maxdepth 1 -type d \! -name '.git' \! -name 'doc' \! -name 'po' \! -name 'build' \! -name 'test') | \
- grep -v -e '^.*debian/changelog.*Troup.*==>.*Troupe.*$' \
- -e '^.*apt-pkg/contrib/fileutl\.cc.*creat.*==>.*create.*$' \
- -e '^.*methods/aptmethod\.h.*creat.*==>.*create.*$' \
- -e '^.*dselect/install.*ans.*==>.*and.*$' \
+elif [ "$1" = 'spellcheckers' -o "$1" = 'lint' ]; then
+ is_available() {
+ if dpkg-checkbuilddeps -d "$1" 2>/dev/null; then
+ return 0
+ fi
+ echo "### SKIPPING ${2:-$1} functionality as ${1} isn't installed"
+ }
+ if is_available 'codespell'; then
+ echo '### codespell in source directories:'
+ codespell --enable-colors $(find . -mindepth 1 -maxdepth 1 -type d \! -name '.git' \! -name 'doc' \! -name 'po' \! -name 'build' \! -name 'test') \
+ | grep -v -e '^.*debian/changelog.*Troup.*==>.*Troupe.*$' \
+ -e '^.*apt-pkg/contrib/fileutl\.cc.*creat.*==>.*create.*$' \
+ -e '^.*methods/aptmethod\.h.*creat.*==>.*create.*$' \
+ -e '^.*dselect/install.*ans.*==>.*and.*$' \
+ || true
+ echo '### codespell in testcases:'
+ codespell --enable-colors $(find test -type f \! -name 'status-*' \! -name 'Packages-*' \! -name '*.deb' \! -name '*.sec' \! -name '*.pub' \! -name '*.db') \
+ | grep -v -e '^.*test/libapt/file-helpers\.cc.*creat.*==>.*create.*$' \
+ -e '^.*test/libapt/tagfile_test\.cc.*tyes.*==>.*types.*$' \
+ -e '^.*test/libapt/strutil_test\.cc.*Fiel.*==>.*Feel.*$' \
+ -e '^.*test/integration/skip-bug-601016-description-translation.*Paket.*==>.*Packet.*$' \
+ -e '^.*test/integration/skip-bug-601016-description-translation.*Wege.*==>.*Wedge.*$' \
+ || true
+ echo '### codespell in documentation:'
+ codespell --enable-colors doc/*.xml doc/*.txt doc/*.dbk doc/*.ent doc/*.cmake.in doc/xml.add doc/po4a.conf doc/examples doc/po/apt-doc.pot \
+ po/apt-all.pot README.* COPYING \
+ || true
+ fi
+ if is_available 'lintian' 'spellintian'; then
+ echo '### spellintian in source directories:'
+ {
+ for DIR in $(find . -mindepth 1 -maxdepth 1 -type d \! -name '.git' \! -name 'doc' \! -name 'po' \! -name 'build' \! -name 'test'); do
+ spellintian $(find "$DIR" -type f)
+ done
+ } \
+ | grep -v \
+ -e '^.*: long long (duplicate word) -> long$' \
+ -e '^./apt-pkg/pkgcache.h: ID ID (duplicate word) -> ID$' \
+ -e '^./apt-pkg/contrib/mmap.cc: WorkSpace WorkSpace (duplicate word) -> WorkSpace$' \
+ -e '^./apt-pkg/contrib/md5.cc: z z (duplicate word) -> z$' \
+ -e '^./apt-pkg/metaindex.cc: const const (duplicate word) -> const$' \
+ -e '^./apt-pkg/acquire-method.cc: QueueBack QueueBack (duplicate word) -> QueueBack$' \
+ -e '^./CMake/Translations.cmake: domain domain (duplicate word) -> domain$' \
+ -e '^./CMake/apti18n.h.in: m m (duplicate word) -> m$' \
+ -e '^./CMake/run_if_exists.sh: fi fi (duplicate word) -> fi$' \
+ -e '^./ftparchive/byhash.cc: ByHash ByHash (duplicate word) -> ByHash$' \
+ -e '^./ftparchive/writer.cc: this Packages -> these packages$' \
+ -e '^./ftparchive/byhash.h: ByHash ByHash (duplicate word) -> ByHash$' \
+ -e '^./cmdline/apt-key.in: done done (duplicate word) -> done$' \
+ -e '^./cmdline/apt-key.in: fi fi (duplicate word) -> fi$' \
+ -e '^./cmdline/apt-key.in: echo echo (duplicate word) -> echo$' \
+ -e '^./triehash/.travis.yml: perl perl (duplicate word) -> perl$' \
+ -e '^./triehash/README.md: Performance Performance (duplicate word) -> Performance$' \
+ -e '^./debian/apt.apt-compat.cron.daily: fi fi (duplicate word) -> fi$' \
+ -e '^./debian/apt.auto-removal.sh: done done (duplicate word) -> done$' \
+ -e '^./debian/apt.systemd.daily: fi fi (duplicate word) -> fi$' \
+ -e '^./debian/apt.postinst: fi fi (duplicate word) -> fi$' \
+ -e '^./methods/http.cc: Sz Sz (duplicate word) -> Sz$' \
+ -e '^./methods/ftp.cc: AFMap AFMap (duplicate word) -> AFMap$' \
+ -e '^./dselect/install: fi fi (duplicate word) -> fi$' \
+ -e '^./CMake/Documentation.cmake: endforeach endforeach (duplicate word) -> endforeach$' \
+ -e '^./apt-pkg/deb/deblistparser.cc: c c (duplicate word) -> c$' \
+ -e '^./apt-private/private-install.cc: result result (duplicate word) -> result$' \
+ -e '^./debian/changelog: the the (duplicate word) -> the$' \
+ -e '^./debian/changelog: procceed -> proceed$' \
+ -e '^./methods/aptmethod.h: QueueBack QueueBack (duplicate word) -> QueueBack$' \
|| true
- echo '### codespell in testcases:'
- codespell --enable-colors $(find test -type f \! -name 'status-*' \! -name 'Packages-*' \! -name '*.deb' \! -name '*.sec' \! -name '*.pub' \! -name '*.db') | \
- grep -v -e '^.*test/libapt/file-helpers\.cc.*creat.*==>.*create.*$' \
- -e '^.*test/libapt/tagfile_test\.cc.*tyes.*==>.*types.*$' \
- -e '^.*test/libapt/strutil_test\.cc.*Fiel.*==>.*Feel.*$' \
- -e '^.*test/integration/skip-bug-601016-description-translation.*Paket.*==>.*Packet.*$' \
- -e '^.*test/integration/skip-bug-601016-description-translation.*Wege.*==>.*Wedge.*$' \
+ echo '### spellintian in testcases:'
+ spellintian $(find test -type f \! -name 'status-*' \! -name 'Packages-*' \! -name '*.deb' \! -name '*.sec' \! -name '*.pub' \! -name '*.db') \
+ | grep -v \
+ -e '^.*: long long (duplicate word) -> long$' \
+ -e '^test/integration/.*: fi fi (duplicate word) -> fi$' \
+ -e '^test/integration/.*: done done (duplicate word) -> done$' \
+ -e '^test/integration/.*: echo echo (duplicate word) -> echo$' \
+ -e '^test/integration/test-00-commands-have-help: moo moo (duplicate word) -> moo$' \
+ -e '^test/integration/test-apt-cache: bar bar (duplicate word) -> bar$' \
+ -e '^test/integration/test-sourceslist-trusted-options: everythingsucceeds everythingsucceeds (duplicate word) -> everythingsucceeds$' \
+ -e '^test/integration/test-sourceslist-trusted-options: everythingfails everythingfails (duplicate word) -> everythingfails$' \
+ -e '^test/integration/test-apt-get-changelog: foo foo (duplicate word) -> foo$' \
+ -e '^test/integration/test-ubuntu-bug-761175-remove-purge: testround testround (duplicate word) -> testround$' \
+ -e '^test/integration/test-apt-get-download: apt apt (duplicate word) -> apt$' \
+ -e '^test/integration/test-apt-showlist-orgroup-in-recommends: zzz zzz (duplicate word) -> zzz$' \
+ -e '^test/integration/test-bug-691453-apt-cache-search-multi-pattern: bar bar (duplicate word) -> bar$' \
+ -e '^test/integration/test-allow: hold hold (duplicate word) -> hold$' \
+ -e '^test/integration/test-apt-by-hash-update: ensureitsbroken ensureitsbroken (duplicate word) -> ensureitsbroken$' \
+ -e '^test/integration/test-apt-source-and-build-dep: foo foo (duplicate word) -> foo$' \
|| true
- echo '### codespell in documentation:'
- codespell --enable-colors doc/*.xml doc/*.txt doc/*.dbk doc/*.ent doc/*.cmake.in doc/xml.add doc/po4a.conf doc/examples doc/po/apt-doc.pot po/apt-all.pot README.* COPYING || true
+ echo '### spellintian in documentation:'
+ spellintian doc/*.xml doc/*.txt doc/*.dbk doc/*.ent doc/*.cmake.in doc/xml.add doc/po4a.conf doc/examples/* doc/po/apt-doc.pot po/apt-all.pot README.* COPYING \
+ | grep -v \
+ -e '^doc/examples/configure-index: https https (duplicate word) -> https$' \
+ || true
+ fi
- echo '### spellintian in source directories:'
- {
- for DIR in $(find . -mindepth 1 -maxdepth 1 -type d \! -name '.git' \! -name 'doc' \! -name 'po' \! -name 'build' \! -name 'test'); do
- spellintian $(find "$DIR" -type f)
- done
- } | grep -v \
- -e '^.*: long long (duplicate word) -> long$' \
- -e '^./apt-pkg/pkgcache.h: ID ID (duplicate word) -> ID$' \
- -e '^./apt-pkg/contrib/mmap.cc: WorkSpace WorkSpace (duplicate word) -> WorkSpace$' \
- -e '^./apt-pkg/contrib/md5.cc: z z (duplicate word) -> z$' \
- -e '^./apt-pkg/metaindex.cc: const const (duplicate word) -> const$' \
- -e '^./apt-pkg/acquire-method.cc: QueueBack QueueBack (duplicate word) -> QueueBack$' \
- -e '^./CMake/Translations.cmake: domain domain (duplicate word) -> domain$' \
- -e '^./CMake/apti18n.h.in: m m (duplicate word) -> m$' \
- -e '^./CMake/run_if_exists.sh: fi fi (duplicate word) -> fi$' \
- -e '^./ftparchive/byhash.cc: ByHash ByHash (duplicate word) -> ByHash$' \
- -e '^./ftparchive/writer.cc: this Packages -> these packages$' \
- -e '^./ftparchive/byhash.h: ByHash ByHash (duplicate word) -> ByHash$' \
- -e '^./cmdline/apt-key.in: done done (duplicate word) -> done$' \
- -e '^./cmdline/apt-key.in: fi fi (duplicate word) -> fi$' \
- -e '^./cmdline/apt-key.in: echo echo (duplicate word) -> echo$' \
- -e '^./triehash/.travis.yml: perl perl (duplicate word) -> perl$' \
- -e '^./triehash/README.md: Performance Performance (duplicate word) -> Performance$' \
- -e '^./debian/apt.apt-compat.cron.daily: fi fi (duplicate word) -> fi$' \
- -e '^./debian/apt.auto-removal.sh: done done (duplicate word) -> done$' \
- -e '^./debian/apt.systemd.daily: fi fi (duplicate word) -> fi$' \
- -e '^./debian/apt.postinst: fi fi (duplicate word) -> fi$' \
- -e '^./methods/http.cc: Sz Sz (duplicate word) -> Sz$' \
- -e '^./methods/ftp.cc: AFMap AFMap (duplicate word) -> AFMap$' \
- -e '^./dselect/install: fi fi (duplicate word) -> fi$' \
- -e '^./CMake/Documentation.cmake: endforeach endforeach (duplicate word) -> endforeach$' \
- -e '^./apt-pkg/deb/deblistparser.cc: c c (duplicate word) -> c$' \
- -e '^./apt-private/private-install.cc: result result (duplicate word) -> result$' \
- -e '^./debian/changelog: the the (duplicate word) -> the$' \
- -e '^./debian/changelog: procceed -> proceed$' \
- -e '^./methods/aptmethod.h: QueueBack QueueBack (duplicate word) -> QueueBack$' \
- || true
- echo '### spellintian in testcases:'
- spellintian $(find test -type f \! -name 'status-*' \! -name 'Packages-*' \! -name '*.deb' \! -name '*.sec' \! -name '*.pub' \! -name '*.db') \
- | grep -v \
- -e '^.*: long long (duplicate word) -> long$' \
- -e '^test/integration/.*: fi fi (duplicate word) -> fi$' \
- -e '^test/integration/.*: done done (duplicate word) -> done$' \
- -e '^test/integration/.*: echo echo (duplicate word) -> echo$' \
- -e '^test/integration/test-00-commands-have-help: moo moo (duplicate word) -> moo$' \
- -e '^test/integration/test-apt-cache: bar bar (duplicate word) -> bar$' \
- -e '^test/integration/test-sourceslist-trusted-options: everythingsucceeds everythingsucceeds (duplicate word) -> everythingsucceeds$' \
- -e '^test/integration/test-sourceslist-trusted-options: everythingfails everythingfails (duplicate word) -> everythingfails$' \
- -e '^test/integration/test-apt-get-changelog: foo foo (duplicate word) -> foo$' \
- -e '^test/integration/test-ubuntu-bug-761175-remove-purge: testround testround (duplicate word) -> testround$' \
- -e '^test/integration/test-apt-get-download: apt apt (duplicate word) -> apt$' \
- -e '^test/integration/test-apt-showlist-orgroup-in-recommends: zzz zzz (duplicate word) -> zzz$' \
- -e '^test/integration/test-bug-691453-apt-cache-search-multi-pattern: bar bar (duplicate word) -> bar$' \
- -e '^test/integration/test-allow: hold hold (duplicate word) -> hold$' \
- -e '^test/integration/test-apt-by-hash-update: ensureitsbroken ensureitsbroken (duplicate word) -> ensureitsbroken$' \
- -e '^test/integration/test-apt-source-and-build-dep: foo foo (duplicate word) -> foo$' \
- || true
- echo '### spellintian in documentation:'
- spellintian doc/*.xml doc/*.txt doc/*.dbk doc/*.ent doc/*.cmake.in doc/xml.add doc/po4a.conf doc/examples/* doc/po/apt-doc.pot po/apt-all.pot README.* COPYING \
- | grep -v \
- -e '^doc/examples/configure-index: https https (duplicate word) -> https$' \
- || true
+ # stay true to the old name
+ if [ "$1" = 'spellcheckers' ]; then exit; fi
+ if is_available 'i18nspector'; then
+ echo '### i18nspector on translation files:'
+ i18nspector po/*.po po/*.pot doc/po/*.pot doc/po/*.po \
+ | grep -v \
+ -e '^I: po/es.po: duplicate-header-field X-POFile-SpellExtra$' \
+ || true
+ fi
else
echo >&1 "Usage:\t$0 pre-export
\t$0 pre-build