From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102955 invoked by alias); 7 Dec 2016 12:59:27 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 102750 invoked by uid 9795); 7 Dec 2016 12:59:26 -0000 Date: Wed, 07 Dec 2016 12:59:00 -0000 Message-ID: <20161207125926.102710.qmail@sourceware.org> From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program used to install Cygwin and keep it up to date] branch master, updated. release_2.876-8-g20cf793 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 77ddbf45b5c16faeb0c7247ded8c7a5f6fb59b19 X-Git-Newrev: 20cf793baea56494dd7ab2221f33741303902f22 X-SW-Source: 2016-q4/txt/msg00010.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=20cf793baea56494dd7ab2221f33741303902f22 commit 20cf793baea56494dd7ab2221f33741303902f22 Author: Jon Turney Date: Wed Aug 31 11:31:22 2016 +0100 Allow setup to parse more than 3 versions from the setup.ini file This recognizes any "[foo]" line as introducing the information for another version, which doesn't have one of the trust levels [curr], [prev] or [test], and so isn't automatically selected when setup is told to install all packages at that trust level (by default, [curr]). Setup already does all the necessary sorting in version order etc. to use these additional versions. The value of carries no meaning, but the setup.ini specification will be amended to mandate the use of "[ver]". * PackageTrust.h (trusts): Add TRUST_OTHER. * inilex.ll: tokenize any other [version] as the T_OTHER token. * iniparse.yy: Add T_OTHER token and set package trust to TRUST_OTHER when it is used. Signed-off-by: Jon Turney Diff: --- PackageTrust.h | 2 +- inilex.ll | 1 + iniparse.yy | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PackageTrust.h b/PackageTrust.h index 3e6801d..4904705 100644 --- a/PackageTrust.h +++ b/PackageTrust.h @@ -20,10 +20,10 @@ typedef enum { TRUST_UNKNOWN, + TRUST_OTHER, TRUST_PREV, TRUST_CURR, TRUST_TEST, - NTRUST } trusts; diff --git a/inilex.ll b/inilex.ll index 49bbfa6..7daca34 100644 --- a/inilex.ll +++ b/inilex.ll @@ -159,6 +159,7 @@ B64 [a-zA-Z0-9_-] "[test]" return T_TEST; "[exp]" return T_TEST; "[prev]" return T_PREV; +"["{STR}"]" return T_OTHER; "(" return OPENBRACE; ")" return CLOSEBRACE; diff --git a/iniparse.yy b/iniparse.yy index da3e5d0..173c665 100644 --- a/iniparse.yy +++ b/iniparse.yy @@ -41,7 +41,7 @@ void add_correct_version(); %token SETUP_TIMESTAMP SETUP_VERSION PACKAGEVERSION INSTALL SOURCE SDESC LDESC %token CATEGORY DEPENDS REQUIRES %token APATH PPATH INCLUDE_SETUP EXCLUDE_PACKAGE DOWNLOAD_URL -%token T_PREV T_CURR T_TEST +%token T_PREV T_CURR T_TEST T_OTHER %token INSTALLEDSIZE MAINTAINER PRIORITY %token MD5 MD5LINE SHA512 SHA512LINE %token DESCTAG DESCRIPTION FILESIZE ARCHITECTURE SOURCEPACKAGE @@ -99,6 +99,7 @@ singleitem /* non-empty */ | T_PREV NL { iniBuilder->buildPackageTrust (TRUST_PREV); } | T_CURR NL { iniBuilder->buildPackageTrust (TRUST_CURR); } | T_TEST NL { iniBuilder->buildPackageTrust (TRUST_TEST); } + | T_OTHER NL { iniBuilder->buildPackageTrust (TRUST_OTHER); } | PRIORITY STRING NL { iniBuilder->buildPriority ($2); } | INSTALLEDSIZE STRING NL { iniBuilder->buildInstalledSize ($2); } | MAINTAINER STRING NL { iniBuilder->buildMaintainer ($2); }