per-version hints proposal

Ken Brown kbrown@cornell.edu
Wed Apr 12 20:51:00 GMT 2017


On 4/8/2017 1:00 PM, Achim Gratz wrote:
> Jon Turney writes:
>> cygport will be updated to (details TBC) accept a --test flag which is
>> significant to the cygport package stage, and adds this 'test:' line
>> to all the generated PVR.hint files.
>
> I've opted to make it a command (package-test or pkg-test) instead, as
> that seems to fall more in line with my usage pattern and types easier.

What about just using a variable (say PKG_TEST) in the cygport file. 
For example, the line

   PKG_TEST=1

would cause the 'test:' line to be added to the hint files.

The attached patch implements this.

Ken

-------------- next part --------------
>From a9a63675dd83416a4ec510c3a2e2c2ca9eda9ad4 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Wed, 12 Apr 2017 15:39:26 -0400
Subject: [PATCH] pkg_pkg: implement PKG_TEST

---
 lib/pkg_pkg.cygpart | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 5552040..69910fc 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -717,6 +717,12 @@ _EOF
 message: ${pkg_name[${n}]} "${!pkg_message_var}"
 _EOF
 			fi
+			if defined PKG_TEST
+			then
+				cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF
+test:
+_EOF
+			fi
 		else
 			warning "${pkg_hint[${n}]%.hint}.hint is missing";
 		fi
-- 
2.8.3



More information about the Cygwin-apps mailing list