public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20190530-52-ge10575b
@ 2019-07-10 17:00 jturney
0 siblings, 0 replies; only message in thread
From: jturney @ 2019-07-10 17:00 UTC (permalink / raw)
To: cygwin-apps-cvs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3340 bytes --]
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=e10575b0572fa0e82082c2f1133745a99a9228da
commit e10575b0572fa0e82082c2f1133745a99a9228da
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Wed Jul 10 17:57:29 2019 +0100
Don't assume a binary package exists for uploads
As written, this assumes a binary package exist for anything uploaded,
which fails when only a source pacakge exists.
This simple fix prevents replacement hint uploading from working, so
something more sophisticated might be needed.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=c19eb253d32f1bb2789b8b6108e9314354be0b37
commit c19eb253d32f1bb2789b8b6108e9314354be0b37
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Fri Jul 5 19:01:00 2019 +0100
Always mark source packages as skip
Diff:
---
calm/package.py | 11 ++++++-----
test/testdata/uploads/pkglist.expected | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/calm/package.py b/calm/package.py
index ccca563..842bb31 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -237,10 +237,8 @@ def read_package_dir(packages, basedir, dirpath, files, remove=[], upload=False)
# read package
result = False
for kind in Kind:
- # always create binary packages when uploading to allow replacement
- # hints, otherwise, only create a package if there's archives for it to
- # contain
- if fl[kind] or (upload and kind == Kind.binary):
+ # only create a package if there's archives for it to contain
+ if fl[kind]:
result = read_one_package(packages, p, relpath, dirpath, fl[kind] + fl['all'], remove, kind) or result
# warn about unexpected files, including tarfiles which don't match the
@@ -411,7 +409,10 @@ def read_one_package(packages, p, relpath, dirpath, files, remove, kind):
packages[pn].tars = actual_tars
packages[pn].hints = hints
packages[pn].pkgpath = pkgpath
- packages[pn].skip = any(['skip' in version_hints[vr] for vr in version_hints])
+ if kind == Kind.source:
+ packages[pn].skip = True
+ else:
+ packages[pn].skip = any(['skip' in version_hints[vr] for vr in version_hints])
packages[pn].kind = kind
# since we are kind of inventing the source package names, and don't
# want to report them, keep track of the real name
diff --git a/test/testdata/uploads/pkglist.expected b/test/testdata/uploads/pkglist.expected
index 5595a50..a928e8d 100644
--- a/test/testdata/uploads/pkglist.expected
+++ b/test/testdata/uploads/pkglist.expected
@@ -13,7 +13,7 @@
'Bézier."',
'category': 'Devel',
'requires': 'cygwin',
- 'depends': 'cygwin'}}, {}, False),
+ 'depends': 'cygwin'}}, {}, True),
'testpackage-subpackage': Package('testpackage/testpackage-subpackage', {'1.0-1': {'testpackage-subpackage-1.0-1.tar.bz2': Tar('testpackage-subpackage-1.0-1.tar.bz2', 'x86/release/testpackage/testpackage-subpackage', 'aff488008bee3486e25b539fe6ccd1397bd3c5c0ba2ee2cf34af279554baa195af7493ee51d6f8510735c9a2ea54436d776a71e768165716762aec286abbbf83', 195, False)}}, {'1.0-1': {'sdesc': '"A test subpackage"',
'ldesc': '"A test subpackage"',
'category': 'Devel',
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-10 17:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 17:00 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20190530-52-ge10575b jturney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).