From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77662 invoked by alias); 25 Jun 2018 15:10:45 -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 77499 invoked by uid 89); 25 Jun 2018 15:10:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.8 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=ALSO, relation, H*Ad:U*cygwin-apps X-HELO: limerock01.mail.cornell.edu Received: from limerock01.mail.cornell.edu (HELO limerock01.mail.cornell.edu) (128.84.13.241) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Jun 2018 15:10:43 +0000 Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id w5PFAehM004244; Mon, 25 Jun 2018 11:10:40 -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 w5PFAVwX023114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 25 Jun 2018 11:10:40 -0400 From: Ken Brown To: cygwin-apps@cygwin.com Subject: [PATCH cygport 3/4] pkg_dist: record package versions in "depends:" Date: Mon, 25 Jun 2018 15:10:00 -0000 Message-Id: <20180625151031.13164-4-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/msg00031.txt.bz2 For each generated dependency, add a version relation that specifies a version greater than or equal to the currently installed version. This should prevent users from updating a package without updating its dependencies. https://cygwin.com/ml/cygwin/2018-03/msg00365.html --- lib/pkg_pkg.cygpart | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart index ef3acc3..ae85428 100644 --- a/lib/pkg_pkg.cygpart +++ b/lib/pkg_pkg.cygpart @@ -627,9 +627,10 @@ __pkg_dist() { # libfoo-devel will use libfoo_devel_REQUIRES. # NOTES # * cygport attempts to automatically detect many types of package -# dependencies, which do not need to be listed in REQUIRES. This is still -# needed for commands called by scripts or in code with fork(), libraries -# which are accessed by dlopen(), or data used by your package at runtime. +# dependencies, which do not need to be listed in PKG_REQUIRES. +# This is still needed for commands called by scripts or in code +# with fork(), libraries which are accessed by dlopen(), or data +# used by your package at runtime. # * Any newlines in this variable must be escaped. # SEE ALSO # PKG_DEPENDS @@ -643,6 +644,10 @@ __pkg_dist() { # NOTES # * Do not confuse DEPENDS with DEPEND, which is an obsolete alias # for BUILD_DEPENDS. +# * cygport attempts to automatically detect many types of package +# dependencies, which do not need to be listed in DEPENDS. This is still +# needed for commands called by scripts or in code with fork(), libraries +# which are accessed by dlopen(), or data used by your package at runtime. # * Dependencies without version relations can be listed either in # DEPENDS or in REQUIRES. # * If there is more than one package in PKG_NAMES, this variable will be @@ -667,6 +672,11 @@ __pkg_dist() { # NOTES # * Dependencies without version relations can be listed either in # PKG_DEPENDS or in PKG_REQUIRES. +# * cygport attempts to automatically detect many types of package +# dependencies, which do not need to be listed in PKG_DEPENDS. +# This is still needed for commands called by scripts or in code +# with fork(), libraries which are accessed by dlopen(), or data +# used by your package at runtime. # * Any newlines in this variable must be escaped. # SEE ALSO # PKG_REQUIRES @@ -742,7 +752,7 @@ __pkg_dist() { if [ "${CBUILD##*-}" = "cygwin" ] 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" \ + | sort -fu | sed -e "/^${pkg_name[${n}]}-[0-9].*$/d;s/-\([0-9].*\)$/ (>=\1)/g" \ | sed -e ':a;N;$!ba;s/\n/, /g') if [ -n "${pkg_bin_requires}" -a -n "${pkg_depends}" ] then -- 2.17.0