[wpkg-users] Define conditionally a variable...

Marco Gaiarin gaio at lilliput.linux.it
Fri Mar 27 13:22:58 CET 2026


Mandi! Adam Thorn
  In chel di` si favelave...

> By "variable", do you mean "environment variable on the client system"?

Yep.


> You can use <check> elements inside a <varable>.

Ah! I've totally missed the note in the wiki (https://wpkg.org/Packages.xml):

 Host
 Host checks were announced in 1.3.0. They appear to allow matching against at least hostname, OS, architecture and environment variables. 

So to remain in my example, i can do:

<variable name="PROXY" value="proxy.%LOCALNET%.%NETNAME%:8080">
	<condition>
		<check type="host" condition="environment" value="PROXY=^$" />
	</condition>
</variable>

In this way i'll set PROXY variable if and only if the same is empty.


Correct? Thanks.

-- 




More information about the wpkg-users mailing list