From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130844 invoked by alias); 3 Jun 2015 16:30:42 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 130773 invoked by uid 89); 3 Jun 2015 16:30:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: rgout0507.bt.lon5.cpcloud.co.uk Received: from rgout0507.bt.lon5.cpcloud.co.uk (HELO rgout0507.bt.lon5.cpcloud.co.uk) (65.20.0.228) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Jun 2015 16:30:35 +0000 X-OWM-Source-IP: 31.51.205.195(GB) X-OWM-Env-Sender: jonturney@btinternet.com X-CTCH-RefID: str=0001.0A090204.556F2BA8.0030,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-Junkmail-Premium-Raw: score=27/50,refid=2.7.2:2015.6.2.130915:17:27.888,ip=31.51.205.195,rules=__HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __SUBJ_ALPHA_END, __HAS_MSGID, __SANE_MSGID, __HAS_X_MAILER, __ANY_URI, URI_ENDS_IN_HTML, __URI_NO_WWW, __URI_NO_PATH, __STOCK_PHRASE_7, BODY_SIZE_3000_3999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, __URI_NS, SXL_IP_DYNAMIC[195.205.51.31.fur], HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_7000_LESS X-CTCH-Spam: Unknown Received: from localhost.localdomain (31.51.205.195) by rgout05.bt.lon5.cpcloud.co.uk (8.6.122.06) (authenticated as jonturney@btinternet.com) id 556DA854008BEFCC; Wed, 3 Jun 2015 17:30:24 +0100 From: Jon TURNEY To: cygwin-apps@cygwin.com Cc: Jon TURNEY Subject: [PATCH setup] Allow setup to parse more than 3 versions from the setup.ini file Date: Wed, 03 Jun 2015 16:30:00 -0000 Message-Id: <1433349024-9776-1-git-send-email-jon.turney@dronecode.org.uk> X-SW-Source: 2015-06/txt/msg00034.txt.bz2 Reminded by a recent request as to how to install xorg-server-1.17.1-2, which has disappeared beyond setup's ken (in order to determine if there was a regression in the curent version), this is a re-send of a patch I originally submitted back in 2011 [1], which received an ambiguous response then. [1] https://cygwin.com/ml/cygwin-apps/2011-04/msg00053.html 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 neccessary sorting in version order etc. to use these additional versions. Since the value of carries no meaning, it might make sense to update the setup.ini specification to mandate the use of specific strings like "[also]" or "[other]", or perhaps "[prev-1]", "[prev-2]", etc. I have written a corresponding patch to genini. I'm not sure what expiry policy is currently used by upset for old packages, but presumably that would need to be made more sophisticated, along with the changes needed to generate setup.ini entries for other versions. Signed-off-by: Jon TURNEY --- ChangeLog | 7 +++++++ PackageTrust.h | 2 +- inilex.ll | 1 + iniparse.yy | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 854ba05..a4f9240 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-05-15 Jon TURNEY + + * 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. + 2015-03-25 Corinna Vinschen * install.cc (sha512_one): Raise buffer size to 64K for performance 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 81a7f24..cb6c6b4 100644 --- a/inilex.ll +++ b/inilex.ll @@ -134,6 +134,7 @@ STR [!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 cab84f2..8dbb792 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 SHA512 MD5 INSTALLEDSIZE MAINTAINER PRIORITY %token DESCTAG DESCRIPTION FILESIZE ARCHITECTURE SOURCEPACKAGE MD5LINE %token RECOMMENDS PREDEPENDS @@ -98,6 +98,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); } -- 2.1.4