From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54412 invoked by alias); 23 May 2017 16:47:22 -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 54302 invoked by uid 89); 23 May 2017 16:47:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=categories, Hx-languages-length:3186, HX-Junkmail-Premium-Raw:sk:__FRAUD X-HELO: rgout0806.bt.lon5.cpcloud.co.uk Received: from rgout0806.bt.lon5.cpcloud.co.uk (HELO rgout0806.bt.lon5.cpcloud.co.uk) (65.20.0.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 May 2017 16:47:20 +0000 X-OWM-Source-IP: 86.164.192.158 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-Junkmail-Premium-Raw: score=7/50,refid=2.7.2:2017.5.23.161815:17:7.944,ip=,rules=__HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __HAS_CC_HDR, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __HAS_MSGID, __SANE_MSGID, __HAS_X_MAILER, __IN_REP_TO, __REFERENCES, __FROM_DOMAIN_IN_ANY_CC1, __STOCK_PHRASE_7, __OEM_PRICE, __FRAUD_MONEY_CURRENCY_DOLLAR, __NO_HTML_TAG_RAW, BODY_SIZE_3000_3999, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __SXL_SIG_TIMEOUT[2250c669008af79ec44afef35b14c477.sig.vir2.sophosxl.com], HTML_00_01, HTML_00_10, __FRAUD_MONEY_CURRENCY, BODY_SIZE_5000_LESS, IN_REP_TO, MSG_THREAD, __FROM_DOMAIN_IN_RCPT, __CC_REAL_NAMES, MULTIPLE_REAL_RCPTS, LEGITIMATE_SIGNS, NO_URI_FOUND, NO_CTA_URI_FOUND, __MIME_TEXT_P, REFERENCES, NO_URI_HTTPS, BODY_SIZE_7000_LESS Received: from localhost.localdomain (86.164.192.158) by rgout08.bt.lon5.cpcloud.co.uk (9.0.019.13-1) (authenticated as jonturney@btinternet.com) id 58BFF08008A268A2; Tue, 23 May 2017 17:47:17 +0100 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH setup 06/10] Fold IniDBBuilderPackage::buildInstallSize() into buildPackageInstall() Date: Tue, 23 May 2017 16:47:00 -0000 Message-Id: <20170523164558.50320-7-jon.turney@dronecode.org.uk> In-Reply-To: <20170523164558.50320-1-jon.turney@dronecode.org.uk> References: <20170523164558.50320-1-jon.turney@dronecode.org.uk> X-SW-Source: 2017-05/txt/msg00134.txt.bz2 As mentioned in 5a3799dc, this ripples through into ScanFindVisitor as well. --- IniDBBuilderPackage.cc | 10 +++------- IniDBBuilderPackage.h | 3 +-- ScanFindVisitor.cc | 4 ++-- iniparse.yy | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/IniDBBuilderPackage.cc b/IniDBBuilderPackage.cc index b5b5f4c..c90bfe3 100644 --- a/IniDBBuilderPackage.cc +++ b/IniDBBuilderPackage.cc @@ -119,9 +119,11 @@ IniDBBuilderPackage::buildPackageLDesc (const std::string& theDesc) } void -IniDBBuilderPackage::buildPackageInstall (const std::string& path) +IniDBBuilderPackage::buildPackageInstall (const std::string& path, + const std::string& size) { process_src (*cbpv.source(), path); + setSourceSize (*cbpv.source(), size); } void @@ -198,12 +200,6 @@ IniDBBuilderPackage::buildBeginDepends () } void -IniDBBuilderPackage::buildInstallSize (const std::string &size) -{ - setSourceSize (*cbpv.source(), size); -} - -void IniDBBuilderPackage::buildInstallSHA512 (unsigned char const *sha512) { if (sha512 && !cbpv.source()->sha512_isSet) { diff --git a/IniDBBuilderPackage.h b/IniDBBuilderPackage.h index 4df1bdb..1dab41b 100644 --- a/IniDBBuilderPackage.h +++ b/IniDBBuilderPackage.h @@ -34,13 +34,12 @@ public: void buildPackageVersion (const std::string& ); void buildPackageSDesc (const std::string& ); void buildPackageLDesc (const std::string& ); - void buildPackageInstall (const std::string& ); + void buildPackageInstall (const std::string&, const std::string&); void buildPackageSource (const std::string&, const std::string&); void buildPackageTrust (int); void buildPackageCategory (const std::string& ); void buildBeginDepends (); - void buildInstallSize (const std::string& ); void buildInstallSHA512 (unsigned char const[64]); void buildSourceSHA512 (unsigned char const[64]); void buildInstallMD5 (unsigned char const[16]); diff --git a/ScanFindVisitor.cc b/ScanFindVisitor.cc index 02cd6e8..14c3722 100644 --- a/ScanFindVisitor.cc +++ b/ScanFindVisitor.cc @@ -46,8 +46,8 @@ ScanFindVisitor::visitFile(const std::string& basePath, if (!f.what.size()) { //assume binary - _Builder.buildPackageInstall (basePath + theFile->cFileName); - _Builder.buildInstallSize(stringify(theFile->nFileSizeLow)); + _Builder.buildPackageInstall (basePath + theFile->cFileName, + stringify(theFile->nFileSizeLow)); } else // patch or src, assume src until someone complains diff --git a/iniparse.yy b/iniparse.yy index 2480cc6..98b51bb 100644 --- a/iniparse.yy +++ b/iniparse.yy @@ -96,7 +96,7 @@ singleitem /* non-empty */ | T_OTHER NL { iniBuilder->buildPackageTrust (TRUST_OTHER); } | SOURCEPACKAGE source NL | CATEGORY categories NL - | INSTALL STRING STRING { iniBuilder->buildPackageInstall ($2); iniBuilder->buildInstallSize($3);} installchksum NL + | INSTALL STRING STRING { iniBuilder->buildPackageInstall ($2, $3);} installchksum NL | SOURCE STRING STRING sourcechksum NL {iniBuilder->buildPackageSource ($2, $3);} | DEPENDS { iniBuilder->buildBeginDepends(); } versionedpackagelist NL | REQUIRES { iniBuilder->buildBeginDepends(); } versionedpackagelistsp NL -- 2.12.3