[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20171204-1-gc2edc98

jturney-9JcytcrH/[email protected]
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=c2edc980b0d7efb9ffeceadffef3dfcbfde5b121

commit c2edc980b0d7efb9ffeceadffef3dfcbfde5b121
Author: Jon Turney <[email protected]>
Date:   Thu Nov 30 12:42:43 2017 +0000

    Treat 'not on the package list' as an error
    
    Update tests appropriately


Diff:
---
 calm/package.py                        |    8 ++++++--
 test/testdata/pkglist/cygwin-pkg-maint |    5 +++++
 test/testdata/pkglist/expected         |    2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/calm/package.py b/calm/package.py
index 45f752f..48da76b 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -754,15 +754,16 @@ def validate_packages(args, packages):
             logging.error("install packages from source package '%s' have non-unique current versions %s" % (source_p, ', '.join(reversed(out))))
 
     # validate that all packages are in the package maintainers list
-    validate_package_maintainers(args, packages)
+    error = validate_package_maintainers(args, packages) or error
 
     return not error
 
 
 #
 def validate_package_maintainers(args, packages):
+    error = False
     if not args.pkglist:
-        return
+        return error
 
     # read maintainer list
     mlist = {}
@@ -781,6 +782,9 @@ def validate_package_maintainers(args, packages):
             continue
         if not is_in_package_list(packages[p].path, all_packages):
             logging.error("package '%s' is not in the package list" % (p))
+            error = True
+
+    return error
 
 
 #
diff --git a/test/testdata/pkglist/cygwin-pkg-maint b/test/testdata/pkglist/cygwin-pkg-maint
index 75fad88..0d26f32 100644
--- a/test/testdata/pkglist/cygwin-pkg-maint
+++ b/test/testdata/pkglist/cygwin-pkg-maint
@@ -1337,6 +1337,8 @@ nss                                          Yaakov Selkowitz
 ntl                                          Yue Ren/Marco Atzeri
 nttcp                                        Jari Aalto
 obconf                                       Yaakov Selkowitz
+obs-a                                        ORPHANED
+obs-b                                        ORPHANED
 ocaml                                        Damien Doligez
 ocaml-facile                                 Yaakov Selkowitz
 oclock                                       Yaakov Selkowitz
@@ -2174,6 +2176,9 @@ telepathy-qt                                 Yaakov Selkowitz
 terminus-fonts                               Yaakov Selkowitz
 tesseract-ocr                                Marco Atzeri
 testpackage                                  Blooey McFooey
+test-c                                       ORPHANED
+test-d                                       ORPHANED
+test-e                                       ORPHANED
 tetzle                                       Yaakov Selkowitz
 texi2html                                    Dr. Volker Zell
 texinfo                                      Ken Brown
diff --git a/test/testdata/pkglist/expected b/test/testdata/pkglist/expected
index 4c38b0b..2b1123b 100644
--- a/test/testdata/pkglist/expected
+++ b/test/testdata/pkglist/expected
@@ -44,7 +44,7 @@
  'Michael Wild': maintainers.Maintainer('Michael Wild', [], ['ssh-pageant', 'tmux']),
  'Mike DePaulo': maintainers.Maintainer('Mike DePaulo', [], ['gtkperf']),
  'Mikhail Usenko': maintainers.Maintainer('Mikhail Usenko', [], ['cygcheck-dep']),
- 'ORPHANED': maintainers.Maintainer('ORPHANED', [], ['alternatives', 'aria2', 'asciidoc', 'astyle', 'autobuild', 'byacc', 'ccache', 'ccdoc', 'cgoban', 'colordiff', 'cramfs', 'ctris', 'cvsps', 'cygutils', 'distcc', 'flex', 'gaffitter', 'gcc-tools-epoch1-autoconf', 'gcc-tools-epoch1-automake', 'gcc-tools-epoch2-autoconf', 'gcc-tools-epoch2-automake', 'gnugo', 'googlecl', 'gsl', 'hdparm', 'hexedit', 'inetutils', 'ioperm', 'libassuan', 'libksba', 'libtextcat', 'libustr', 'libXpm-noX', 'maradns', 'mathomatic', 'mhash', 'mingw-binutils', 'mingw-bzip2', 'mingw-gcc', 'mingw-libgcrypt', 'mingw-libgpg-error', 'mingw-pthreads', 'mingw-runtime', 'mingw-w32api', 'mingw-xz', 'mingw-zlib', 'mksh', 'mtd', 'naim', 'nfrotz', 'nfs-server', 'pal', 'pinentry', 'popt', 'protobuf', 'pth', 'python-backports.ssl_
 match_hostname', 'python-gdata', 'rsh', 'run2', 'rxvt', 'scsh', 'sunrpc', 'tack', 'tcp_wrappers', 'typespeed', 'ucspi-tcp', 'units', 'wtf', 'xsri', '_update-info-dir']),
+ 'ORPHANED': maintainers.Maintainer('ORPHANED', [], ['alternatives', 'aria2', 'asciidoc', 'astyle', 'autobuild', 'byacc', 'ccache', 'ccdoc', 'cgoban', 'colordiff', 'cramfs', 'ctris', 'cvsps', 'cygutils', 'distcc', 'flex', 'gaffitter', 'gcc-tools-epoch1-autoconf', 'gcc-tools-epoch1-automake', 'gcc-tools-epoch2-autoconf', 'gcc-tools-epoch2-automake', 'gnugo', 'googlecl', 'gsl', 'hdparm', 'hexedit', 'inetutils', 'ioperm', 'libassuan', 'libksba', 'libtextcat', 'libustr', 'libXpm-noX', 'maradns', 'mathomatic', 'mhash', 'mingw-binutils', 'mingw-bzip2', 'mingw-gcc', 'mingw-libgcrypt', 'mingw-libgpg-error', 'mingw-pthreads', 'mingw-runtime', 'mingw-w32api', 'mingw-xz', 'mingw-zlib', 'mksh', 'mtd', 'naim', 'nfrotz', 'nfs-server', 'obs-a', 'obs-b', 'pal', 'pinentry', 'popt', 'protobuf', 'pth', 'pyt
 hon-backports.ssl_match_hostname', 'python-gdata', 'rsh', 'run2', 'rxvt', 'scsh', 'sunrpc', 'tack', 'tcp_wrappers', 'test-c', 'test-d', 'test-e', 'typespeed', 'ucspi-tcp', 'units', 'wtf', 'xsri', '_update-info-dir']),
  'Pavel Fedin': maintainers.Maintainer('Pavel Fedin', [], ['onc-rpc-devel', 'rpcbind', 'rpm']),
  'Peter A. Castro': maintainers.Maintainer('Peter A. Castro', [], ['suite3270', 'zsh']),
  'Peter Rosin': maintainers.Maintainer('Peter Rosin', [], ['libggi2', 'libggimisc2', 'libggiwmh0', 'libgii1']),
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.