[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20200401-5-gff54523

Jon TURNEY via Cygwin-apps-cvs <[email protected]>
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


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

commit ff54523189fd97ba7af1bfef5f2cb4e3153a3703
Author: Jon Turney <[email protected]>
Date:   Wed Apr 8 20:42:26 2020 +0100

    Restore mksetupini producing output for an empty relarea

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

commit b846746164a56f24755549004450c6930ada4ac4
Author: Jon Turney <[email protected]>
Date:   Wed Apr 8 18:09:16 2020 +0100

    Configure 'core.sharedrepository = all' for all gitolite repos
    
    This ensures that they are world-readable, even when pushed to directly
    by a sourceware account (as ssh seems to set 0077 umask by default)

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

commit 2cb5bd26e8b83fab1a87e335a17f5bf283c822ca
Author: Jon Turney <[email protected]>
Date:   Tue Apr 7 21:48:42 2020 +0100

    Improve homepage: hint fixing

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

commit 98f4ecdd898ec50e72257c1a8d8321f1c0dffd53
Author: Jon Turney <[email protected]>
Date:   Sun Apr 5 21:59:49 2020 +0100

    Remove hints which will be ignored after copying for source only packages


Diff:
---
 calm/fixes.py          | 4 ++--
 calm/mkgitoliteconf.py | 1 +
 calm/package.py        | 2 +-
 calm/uploads.py        | 5 +++--
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/calm/fixes.py b/calm/fixes.py
index e6f5340..be11b57 100644
--- a/calm/fixes.py
+++ b/calm/fixes.py
@@ -84,10 +84,10 @@ def fix_homepage_src_hint(dirpath, hf, tf):
                 if homepage:
                     logging.warning('multiple HOMEPAGE lines in .cygport in srcpkg %s', tf)
                 homepage = match.group(2)
-                homepage = re.sub(r'\$({|)(PN|ORIG_PN|NAME)(|})', pn, homepage)
+                homepage = re.sub(r'\$({|)(PN|ORIG_PN|NAME)(}|)', pn, homepage)
 
     if homepage and '$' in homepage:
-        logging.warning('unknown shell parameter expansions in HOMEPAGE in .cygport in srcpkg %s', tf)
+        logging.warning('unknown shell parameter expansions in HOMEPAGE="%s" in .cygport in srcpkg %s' % (homepage, tf))
         homepage = None
 
     if not homepage:
diff --git a/calm/mkgitoliteconf.py b/calm/mkgitoliteconf.py
index 65a08dc..55ff3ce 100755
--- a/calm/mkgitoliteconf.py
+++ b/calm/mkgitoliteconf.py
@@ -77,6 +77,7 @@ def do_main(args):
     print('    RW = @leads')
     print('    R  = @all')
     print('    R  = gitweb daemon')
+    print('    config core.sharedrepository = all')
     print('- VREF/MAX_NEWBIN_SIZE/1024 = @all')
     print('# this rejects binary files over the size limit, text files of any size are still permiited')
     print('')
diff --git a/calm/package.py b/calm/package.py
index 180a343..8628b28 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -478,7 +478,7 @@ def sort_key(k):
 def validate_packages(args, packages):
     error = False
 
-    if not packages:
+    if packages is None:
         return False
 
     for p in sorted(packages.keys()):
diff --git a/calm/uploads.py b/calm/uploads.py
index fe938fa..a334066 100644
--- a/calm/uploads.py
+++ b/calm/uploads.py
@@ -188,8 +188,9 @@ def scan(m, all_packages, arch, args):
                     shutil.copy2(os.path.join(dirpath, old), os.path.join(dirpath, new))
                     files.append(new)
                     if f.replace('-src', '') not in files:
-                        logging.info("ignoring '%s'" % (old))
-                        files.remove(old)
+                        logging.info("discarding '%s'" % (old))
+                        files.remove(os.path.join(dirpath, old))
+                        remove.append(old)
 
                 # see if we can fix-up missing homepage: in -src.hint file
                 if (new in files):
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.