From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128818 invoked by alias); 8 Feb 2020 13:47:57 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 128723 invoked by uid 89); 8 Feb 2020 13:47:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.0 required=5.0 tests=AWL,BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=Packaging, 6727, relations X-HELO: sa-prd-fep-040.btinternet.com Received: from mailomta13-sa.btinternet.com (HELO sa-prd-fep-040.btinternet.com) (213.120.69.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 13:47:54 +0000 Received: from sa-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.38.7]) by sa-prd-fep-040.btinternet.com with ESMTP id <20200208134751.BCXR32765.sa-prd-fep-040.btinternet.com@sa-prd-rgout-004.btmx-prd.synchronoss.net>; Sat, 8 Feb 2020 13:47:51 +0000 Authentication-Results: btinternet.com; none X-OWM-Source-IP: 31.51.207.12 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean Received: from localhost.localdomain (31.51.207.12) by sa-prd-rgout-004.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5E3A27DB008E4BCF; Sat, 8 Feb 2020 13:47:51 +0000 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH cygport 2/2] Add provides: and conflicts: hints Date: Sat, 08 Feb 2020 13:47:00 -0000 Message-Id: <20200208134634.58200-3-jon.turney@dronecode.org.uk> In-Reply-To: <20200208134634.58200-1-jon.turney@dronecode.org.uk> References: <20200208134634.58200-1-jon.turney@dronecode.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2020-02/txt/msg00010.txt.bz2 Add the ability to specify provides: and conflicts: hints in the cygport. --- lib/pkg_pkg.cygpart | 74 ++++++++++++++++++- .../libmultiple1/libmultiple1-3.14-1.hint | 2 + testsuite/hints/multiple/multiple.cygport | 2 + .../dist/single/single-2.3.4-1.hint | 2 + testsuite/hints/single/single.cygport | 2 + 5 files changed, 80 insertions(+), 2 deletions(-) diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart index 2566190..753de9e 100644 --- a/lib/pkg_pkg.cygpart +++ b/lib/pkg_pkg.cygpart @@ -648,12 +648,56 @@ __pkg_dist() { # package replaces. An empty package will be created for each listed # obsoletion which will cause PKG to be installed in its place. # -# Note that the PKG_REQUIRES name is descriptive rather than literal, +# Note that the PKG_OBSOLETES name is descriptive rather than literal, # where "PKG" should be substituted with the name of the binary package # whose contents it describes. When a package contains a character which # cannot be used in a shell variable name (namely '+', '-', and '.'), # that character must be substituted with an underscore ('_'), e.g. # libfoo-devel will use libfoo_devel_OBSOLETES. +#**** +#****v* Packaging/PROVIDES +# DESCRIPTION +# A single-line string containing a list of names which this package also +# provides. +# NOTE +# If there is more than one package in PKG_NAMES, this variable will be +# ignored; you must use PKG_PROVIDES instead. +# SEE ALSO +# PKG_PROVIDES +#**** +#****v* Packaging/PKG_PROVIDES +# DESCRIPTION +# A single-line string containing a list of names which this package also +# provides. +# +# Note that the PKG_PROVIDES name is descriptive rather than literal, +# where "PKG" should be substituted with the name of the binary package +# whose contents it describes. When a package contains a character which +# cannot be used in a shell variable name (namely '+', '-', and '.'), +# that character must be substituted with an underscore ('_'), e.g. +# libfoo-devel will use libfoo_devel_PROVIDES. +#**** +#****v* Packaging/CONFLICTS +# DESCRIPTION +# A single-line string containing a comma-separated list of packages, possibly +# with version relations which this package conflicts with. +# NOTE +# If there is more than one package in PKG_NAMES, this variable will be +# ignored; you must use PKG_CONFLICTS instead. +# SEE ALSO +# PKG_CONFLICTS +#**** +#****v* Packaging/PKG_CONFLICTS +# DESCRIPTION +# A single-line string containing a comma-separated list of packages, possibly +# with version relations which this package conflicts with. +# +# Note that the PKG_CONFLICTS name is descriptive rather than literal, +# where "PKG" should be substituted with the name of the binary package +# whose contents it describes. When a package contains a character which +# cannot be used in a shell variable name (namely '+', '-', and '.'), +# that character must be substituted with an underscore ('_'), e.g. +# libfoo-devel will use libfoo_devel_CONFLICTS. #**** n=0; @@ -665,6 +709,8 @@ __pkg_dist() { pkg_description_var=${pkg_name[${n}]//[-+\.]/_}_DESCRIPTION; pkg_message_var=${pkg_name[${n}]//[-+\.]/_}_MESSAGE; pkg_obsoletes_var=${pkg_name[${n}]//[-+\.]/_}_OBSOLETES; + pkg_provides_var=${pkg_name[${n}]//[-+\.]/_}_PROVIDES; + pkg_conflicts_var=${pkg_name[${n}]//[-+\.]/_}_CONFLICTS; dbg_obsoletes_var=${PN//[-+\.]/_}_debuginfo_OBSOLETES; case ${pkg_name[${n}]} in @@ -672,7 +718,7 @@ __pkg_dist() { *) distsubdir=${pkg_name[${n}]} ;; esac - # allow REQUIRES and OBSOLETES only for single packages + # allow REQUIRES, OBSOLETES etc. only for single packages if [ -z "${distsubdir}${!pkg_requires_var}" -a -n "${REQUIRES+yes}" ] then declare ${pkg_requires_var}="${REQUIRES}" @@ -681,6 +727,15 @@ __pkg_dist() { then declare ${pkg_obsoletes_var}="${OBSOLETES}" fi + if [ -z "${distsubdir}${!pkg_provides_var}" -a -n "${PROVIDES+yes}" ] + then + declare ${pkg_provides_var}="${PROVIDES}" + fi + + if [ -z "${distsubdir}${!pkg_conflicts_var}" -a -n "${CONFLICTS+yes}" ] + then + declare ${pkg_conflicts_var}="${CONFLICTS}" + fi if [ -f ${C}/${pkg_hint[${n}]%.hint}.hint ] then @@ -710,6 +765,21 @@ _EOF obsoletes: ${!pkg_obsoletes_var} _EOF fi + + if [ -n "${!pkg_provides_var}" ] + then + cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF +provides: ${!pkg_provides_var} +_EOF + fi + + if [ -n "${!pkg_conflicts_var}" ] + then + cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF +conflicts: ${!pkg_conflicts_var} +_EOF + fi + if defined distsubdir then cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF diff --git a/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint index 989bfb1..90f0f57 100644 --- a/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint +++ b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint @@ -2,5 +2,7 @@ category: Base requires: cygwin sdesc: "Summary of hints for multiple package test" ldesc: "Description of hints for multiple package test" +provides: also-provides +conflicts: conflicts-with external-source: multiple diff --git a/testsuite/hints/multiple/multiple.cygport b/testsuite/hints/multiple/multiple.cygport index b269ff5..ab6ade9 100644 --- a/testsuite/hints/multiple/multiple.cygport +++ b/testsuite/hints/multiple/multiple.cygport @@ -13,6 +13,8 @@ multiple_CATEGORY="Base" libmultiple1_CONTENTS="" libmultiple1_CATEGORY="Base" libmultiple1_REQUIRES="cygwin" +libmultiple1_PROVIDES="also-provides" +libmultiple1_CONFLICTS="conflicts-with" libmultiple_devel_CONTENTS="usr/include" libmultiple_devel_CATEGORY="Devel" diff --git a/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint index aa534a0..a59628c 100644 --- a/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint +++ b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint @@ -3,4 +3,6 @@ requires: cygwin sdesc: "Summary of hints for single package test" ldesc: "Description of hints for single package test" obsoletes: obsoleted-by-single +provides: also-provides +conflicts: conflicts-with diff --git a/testsuite/hints/single/single.cygport b/testsuite/hints/single/single.cygport index fca0706..9908a70 100644 --- a/testsuite/hints/single/single.cygport +++ b/testsuite/hints/single/single.cygport @@ -7,6 +7,8 @@ DESCRIPTION="Description of hints for single package test" CATEGORY="Base" REQUIRES="cygwin" OBSOLETES="obsoleted-by-single" +PROVIDES="also-provides" +CONFLICTS="conflicts-with" src_compile() { : -- 2.21.0