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

Reply via email to