Re: [PATCH] cygport: suppress spurious package dependencies

2020-06-14 Thread Achim Gratz
Achim Gratz writes:
>> What exactly are you trying to "fix" with this?
>
> The same thing as always: perl getting pulled in as a dependency for
> perl_base, which defeats the whole purpose of having a base package in
> the first place.  Again, the dependency extraction just doesn't quite
> work for things that have optional dependencies that are used if present
> and do no harm if not: cygport will always pull them in and makes them a
> hard requirement.
>
> There's an obvious copy&paste bug in the patch, btw.

The corrected patch can be had from:
https://repo.or.cz/cygport/rpm-style.git/commitdiff/46a1534b523ada57855f5412f683c77a29dbed00


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds


Re: [PATCH] cygport: suppress spurious package dependencies

2020-06-03 Thread Achim Gratz
Yaakov Selkowitz writes:
> On Wed, 2020-06-03 at 13:51 +0200, Achim Gratz wrote:
>> The automatically generated dependencies sometimes have unwanted
>> components.  This patch allows to suppress these on a per-package basis,
>> rather than requiring to patch the generated hint files after the fact.
>
> What exactly are you trying to "fix" with this?

The same thing as always: perl getting pulled in as a dependency for
perl_base, which defeats the whole purpose of having a base package in
the first place.  Again, the dependency extraction just doesn't quite
work for things that have optional dependencies that are used if present
and do no harm if not: cygport will always pull them in and makes them a
hard requirement.

There's an obvious copy&paste bug in the patch, btw.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs


Re: [PATCH] cygport: suppress spurious package dependencies

2020-06-03 Thread Yaakov Selkowitz
On Wed, 2020-06-03 at 13:51 +0200, Achim Gratz wrote:
> The automatically generated dependencies sometimes have unwanted
> components.  This patch allows to suppress these on a per-package basis,
> rather than requiring to patch the generated hint files after the fact.

What exactly are you trying to "fix" with this?

--
Yaakov




[PATCH] cygport: suppress spurious package dependencies

2020-06-03 Thread Achim Gratz

The automatically generated dependencies sometimes have unwanted
components.  This patch allows to suppress these on a per-package basis,
rather than requiring to patch the generated hint files after the fact.

>From 009dbf010418afb873a75bdb204d77fdf1f83ac7 Mon Sep 17 00:00:00 2001
From: Achim Gratz 
Date: Wed, 3 Jun 2020 13:41:18 +0200
Subject: [PATCH] pkg_pkg: allow suppression of spurious package dependencies

Allow suppression of spurious automatic package dependencies by
introducing a new variable PKG_REQUIRES_SUPPRESS, containing a
single-line string of space-separated package list.  Any of the
packages listed are automatically determined to be a requirement are
suppressed so that they do not show up in the generated hint file(s).
---
 lib/pkg_pkg.cygpart | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 7189f36..9603c1d 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -1,3 +1,4 @@
+# -*- mode: sh; sh-shell: bash -*-
 
 #
 # pkg_pkg.cygpart - cygport packaging functions
@@ -787,6 +788,7 @@ __pkg_dist() {
 	do
 		pkg_category_var=${pkg_name[${n}]//[-+\.]/_}_CATEGORY;
 		pkg_requires_var=${pkg_name[${n}]//[-+\.]/_}_REQUIRES;
+		pkg_requires_suppress_var=${pkg_name[${n}]//[-+\.]/_}_REQUIRES_SUPPRESS;
 		pkg_summary_var=${pkg_name[${n}]//[-+\.]/_}_SUMMARY;
 		pkg_description_var=${pkg_name[${n}]//[-+\.]/_}_DESCRIPTION;
 		pkg_message_var=${pkg_name[${n}]//[-+\.]/_}_MESSAGE;
@@ -806,6 +808,10 @@ __pkg_dist() {
 		then
 			declare ${pkg_requires_var}="${REQUIRES}"
 		fi
+		if [ -z "${distsubdir}${!pkg_requires_suppress_var}" -a -n "${REQUIRES_SUPPRESS+yes}" ]
+		then
+			declare ${pkg_requires_var}="${REQUIRES_SUPPRESS}"
+		fi
 		if [ -z "${distsubdir}${!pkg_obsoletes_var}" -a -n "${OBSOLETES+yes}" ]
 		then
 			declare ${pkg_obsoletes_var}="${OBSOLETES}"
@@ -827,9 +833,11 @@ __pkg_dist() {
 		then
 			if [ "${CBUILD##*-}" = "cygwin" ]
 			then
-pkg_bin_requires=$(__list_deps $(sort -fu ${T}/.${pkg_name[${n}]}.lst | sed -e '\|/$|d;s| |^_^|g') \
-		   | sed -e "/^${pkg_name[${n}]}-[0-9].*$/d;s/-[0-9].*$//g" \
-		   | sort -fu | sed -e ':a;N;$!ba;s/\n/ /g' )
+			pkg_bin_requires=$( echo ${!pkg_requires_suppress_var} ${!pkg_requires_suppress_var} \
+		$(__list_deps $(sort -fu ${T}/.${pkg_name[${n}]}.lst | sed -e '\|/$|d;s| |^_^|g') \
+		  | sed -e "/^${pkg_name[${n}]}-[0-9].*$/d;s/-[0-9].*$//g" \
+		  | sort -fu | sed -e ':a;N;$!ba;s/\n/ /g' ) \
+		| tr ' ' '\n' | sort | uniq -u | tr '\n' ' ' )
 __step "${pkg_name[${n}]} requires: ${pkg_bin_requires} ${!pkg_requires_var}"
 			else
 pkg_bin_requires=
-- 
2.26.2



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra