From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56650 invoked by alias); 11 Jul 2018 14:28:51 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 56629 invoked by uid 9795); 11 Jul 2018 14:28:50 -0000 Date: Wed, 11 Jul 2018 14:28:00 -0000 Message-ID: <20180711142850.56597.qmail@sourceware.org> From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20180605-3-g373f110 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 268cde3c74e7e84baa0b3eda679b8fb811f971a7 X-Git-Newrev: 373f110e82b764fdd2deea36edab05deccca267a X-SW-Source: 2018-q3/txt/msg00002.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=373f110e82b764fdd2deea36edab05deccca267a commit 373f110e82b764fdd2deea36edab05deccca267a Author: Jon Turney Date: Sun Jun 10 13:03:19 2018 +0100 Emit setup-minimum-version: When a setup version is specified, also emit a setup-minimum-version: header. This is mainly just to document the minimum version supported, as this header is only interpreted by very recent setup versions... 2.844 is chosen as an initial minimum version, as prior to that only x86 installs were supported, and setup.ini was located at a different URL path. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=f1bcb5503b859abde953750bf711592463571ef4 commit f1bcb5503b859abde953750bf711592463571ef4 Author: Jon Turney Date: Wed Jun 13 13:16:31 2018 +0100 Write 'conflicts:' from hints into setup.ini https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=a456e8ec0f40b1808bb3aafafd841eedc01e8e68 commit a456e8ec0f40b1808bb3aafafd841eedc01e8e68 Author: Jon Turney Date: Wed Jun 6 12:50:34 2018 +0100 Write 'provides:' from hints into setup.ini Diff: --- calm/hint.py | 2 ++ calm/package.py | 15 +++++++++++++++ test/testdata/inifile/setup.ini.expected | 3 +++ test/testdata/process_arch/rel_area.expected | 1 + test/testdata/process_arch/setup.ini.expected | 3 +++ .../x86/release/cygwin/cygwin-2.3.0-0.3.hint | 6 ++++++ 6 files changed, 30 insertions(+), 0 deletions(-) diff --git a/calm/hint.py b/calm/hint.py index f6c8f47..e32d095 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -85,6 +85,8 @@ hintkeys[pvr] = merge_dicts(commonkeys, { 'test': 'noval', # mark the package as a test version 'version': 'val', # version override 'disable-check': 'val', + 'provides': 'val', + 'conflicts': 'val', }) hintkeys[override] = merge_dicts(versionkeys, overridekeys) diff --git a/calm/package.py b/calm/package.py index cbae949..5768224 100755 --- a/calm/package.py +++ b/calm/package.py @@ -845,7 +845,16 @@ def write_setup_ini(args, packages, arch): print("release: %s" % args.release, file=f) print("arch: %s" % arch, file=f) print("setup-timestamp: %d" % tz, file=f) + if args.setup_version: + # not implemented until 2.890, ignored by earlier versions + # + # (versions prior to 2.844 only supported x86 installs, since x86_64 + # wasn't available yet, and setup.ini was located at a different URL + # path) + print("setup-minimum-version: 2.844", file=f) + + # for setup to check if a setup upgrade is possible print("setup-version: %s" % args.setup_version, file=f) # for each package @@ -981,6 +990,12 @@ def write_setup_ini(args, packages, arch): if bd: print("build-depends: %s" % ', '.join(bd), file=f) + if packages[p].version_hints[version].get('provides', ''): + print("provides: %s" % packages[p].version_hints[version]['provides'], file=f) + + if packages[p].version_hints[version].get('conflicts', ''): + print("conflicts: %s" % packages[p].version_hints[version]['conflicts'], file=f) + # helper function to output details for a particular tar file def tar_line(p, category, v, f): diff --git a/test/testdata/inifile/setup.ini.expected b/test/testdata/inifile/setup.ini.expected index a852352..da6c0e3 100644 --- a/test/testdata/inifile/setup.ini.expected +++ b/test/testdata/inifile/setup.ini.expected @@ -8,6 +8,7 @@ 'release: testing\n' 'arch: x86\n' 'setup-timestamp: 1458221800\n' + 'setup-minimum-version: 2.844\n' 'setup-version: 4.321\n' '\n' '@ arc\n' @@ -72,6 +73,8 @@ 'source: x86/release/cygwin/cygwin-2.3.0-0.3-src.tar.xz 228 ' 'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n' 'depends2: base-cygwin\n' + 'provides: cygwin-api0_291\n' + 'conflicts: fruit-juice\n' '\n' '@ cygwin-debuginfo\n' 'sdesc: "Debug info for cygwin"\n' diff --git a/test/testdata/process_arch/rel_area.expected b/test/testdata/process_arch/rel_area.expected index a105cdc..fd14f14 100644 --- a/test/testdata/process_arch/rel_area.expected +++ b/test/testdata/process_arch/rel_area.expected @@ -24,6 +24,7 @@ 'cygwin-2.2.1-1-src.tar.xz', 'cygwin-2.2.1-1.tar.xz', 'cygwin-2.3.0-0.3-src.tar.xz', + 'cygwin-2.3.0-0.3.hint', 'cygwin-2.3.0-0.3.tar.xz', 'setup.hint', 'sha512.sum'], diff --git a/test/testdata/process_arch/setup.ini.expected b/test/testdata/process_arch/setup.ini.expected index 60023ba..0f144c1 100644 --- a/test/testdata/process_arch/setup.ini.expected +++ b/test/testdata/process_arch/setup.ini.expected @@ -8,6 +8,7 @@ 'release: trial\n' 'arch: x86\n' 'setup-timestamp: 1473797080\n' + 'setup-minimum-version: 2.844\n' 'setup-version: 3.1415\n' '\n' '@ arc\n' @@ -72,6 +73,8 @@ 'source: x86/release/cygwin/cygwin-2.3.0-0.3-src.tar.xz 228 ' 'e675b0ac4bc2c3e1c4971bc56d77b0cd53a9bdf5632873a235d7582e29dfd3e8a7bb04b28f6cdee3e6b3d14c25ed39392538e3f628a9bfda6c905646ebc3c225\n' 'depends2: base-cygwin\n' + 'provides: cygwin-api0_291\n' + 'conflicts: fruit-juice\n' '\n' '@ cygwin-debuginfo\n' 'sdesc: "Debug info for cygwin"\n' diff --git a/test/testdata/relarea/x86/release/cygwin/cygwin-2.3.0-0.3.hint b/test/testdata/relarea/x86/release/cygwin/cygwin-2.3.0-0.3.hint new file mode 100644 index 0000000..e9c4d59 --- /dev/null +++ b/test/testdata/relarea/x86/release/cygwin/cygwin-2.3.0-0.3.hint @@ -0,0 +1,6 @@ +sdesc: "The UNIX emulation engine" +ldesc: "The UNIX emulation engine" +category: Base +requires: base-cygwin +provides: cygwin-api0_291 +conflicts: fruit-juice