From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77226 invoked by alias); 25 Jun 2018 15:10:43 -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 77204 invoked by uid 89); 25 Jun 2018 15:10:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Packaging, ba, H*m:edu, auto-generated X-HELO: limerock03.mail.cornell.edu Received: from limerock03.mail.cornell.edu (HELO limerock03.mail.cornell.edu) (128.84.13.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Jun 2018 15:10:41 +0000 Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id w5PFAdTQ010244; Mon, 25 Jun 2018 11:10:39 -0400 Received: from nothing.nyroc.rr.com (mta-68-175-129-7.twcny.rr.com [68.175.129.7] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id w5PFAVwV023114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 25 Jun 2018 11:10:38 -0400 From: Ken Brown To: cygwin-apps@cygwin.com Subject: [PATCH cygport 1/4] pkg_dist: use 'depends:' instead of 'requires:' in generated .hint files Date: Mon, 25 Jun 2018 15:10:00 -0000 Message-Id: <20180625151031.13164-2-kbrown@cornell.edu> In-Reply-To: <20180625151031.13164-1-kbrown@cornell.edu> References: <20180625151031.13164-1-kbrown@cornell.edu> X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00030.txt.bz2 This paves the way for supporting dependencies with version relations, which are allowed in the 'depends:' field but not in the 'requires:' field. --- lib/pkg_pkg.cygpart | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart index 3f9a9a7..91a0865 100644 --- a/lib/pkg_pkg.cygpart +++ b/lib/pkg_pkg.cygpart @@ -515,6 +515,7 @@ __pkg_dist() { local distsubdir; local obssubdir obspkg; local pkg_category_var pkg_requires_var pkg_summary_var; + local pkg_bin_requires pkg_depends; local pkg_description_var pkg_message_var pkg_obsoletes_var; local pkg_tag=${1}; @@ -598,8 +599,8 @@ __pkg_dist() { #**** #****v* Packaging/REQUIRES # DESCRIPTION -# A single-line strings containing a list of packages on which this -# package depends. This will be added to the requires: field of the +# A single-line string containing a list of packages on which this +# package depends. This will be added to the depends: field of the # auto-generated .hint file. # NOTES # * cygport attempts to automatically detect many types of package @@ -614,8 +615,8 @@ __pkg_dist() { #**** #****v* Packaging/PKG_REQUIRES # DESCRIPTION -# A single-line strings containing a list of packages on which this -# package depends. This will be added to the requires: field of the +# A single-line string containing a list of packages on which this +# package depends. This will be added to the depends: field of the # auto-generated .hint file. # # Note that the PKG_REQUIRES name is descriptive rather than literal, @@ -677,6 +678,7 @@ __pkg_dist() { then declare ${pkg_requires_var}="${REQUIRES}" fi + declare ${pkg_requires_var}="$(echo ${!pkg_requires_var} | sed -e 's/ /, /g')" if [ -z "${distsubdir}${!pkg_obsoletes_var}" -a -n "${OBSOLETES+yes}" ] then declare ${pkg_obsoletes_var}="${OBSOLETES}" @@ -691,16 +693,22 @@ __pkg_dist() { then pkg_bin_requires=$(__list_deps $(sort -fu ${T}/.${pkg_name[${n}]}.lst | sed -e '\|/$|d;s| |^_^|g') \ | sort -fu | sed -e "/^${pkg_name[${n}]}-[0-9].*$/d;s/-[0-9].*$//g" \ - | sed -e ':a;N;$!ba;s/\n/ /g') - __step "${pkg_name[${n}]} requires: ${pkg_bin_requires} ${!pkg_requires_var}" + | sed -e ':a;N;$!ba;s/\n/, /g') + if [ -n "${pkg_bin_requires}" -a -n "${!pkg_requires_var}" ] + then + pkg_depends="${pkg_bin_requires}, ${!pkg_requires_var}" + else + pkg_depends="${pkg_bin_requires}${!pkg_requires_var}" + fi + __step "${pkg_name[${n}]} requires: ${pkg_depends}" else - pkg_bin_requires= + pkg_depends="${!pkg_requires_var}" inform "ADD ${distsubdir:-${PN}} DLL DEPENDENCIES TO ${PN}${distsubdir:+/}${distsubdir}/${pkg_name[${n}]}-${PVR}.hint" fi cat > ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF category: ${!pkg_category_var:-${CATEGORY}} -requires: ${pkg_bin_requires} ${!pkg_requires_var} +depends: ${pkg_depends} sdesc: "${!pkg_summary_var:-${SUMMARY}}" ldesc: "${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY}}}}" _EOF -- 2.17.0