X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type:date:from:to:subject :in-reply-to:references:message-id; q=dns; s=default; b=yKbwKtA+ e/ShajmwUeLZAOArplAjO8WEsSSTYTag2mBhJSB+TV2XZ8rLvAhDIsoNtVa/wNCS l9tNocws1wRBF+E6w/fpUrd8VBxipRKlQOGvTR+K6hc0ipSD9GZse+3pJKDrc+Fv 3NVj0XaK8Zo6esQHWKIGox31rWiQZpphMCk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type:date:from:to:subject :in-reply-to:references:message-id; s=default; bh=9aqnutuT+6vEuQ Hjkn7ZVjJykkY=; b=eZ6s1cV1CTYddguLS0OYVvWllEXrAiEVVq+3mzmB5rwtNq s67AE8koyhondha/SA85nNkh+db1c7bqGAnyp7SrW/oBm0e9vHsqHZI0jVaLUmBW ji9TXhk/a5XS0wRw7HL2c6GIQTTW+lCSHVk5sMBkOnsGE1mpaFnco07zl28VI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPAM_SUBJECT1,SPF_PASS autolearn=no version=3.3.2 spammy=ALSO, repo, speaks, study X-HELO: lb2-smtp-cloud3.xs4all.net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_ce03936e0744cde128e8964687c789d4" Date: Wed, 06 Apr 2016 12:29:13 +0200 From: Houder To: cygwin AT cygwin DOT com Subject: Re: Package choosing algorithm ... In-Reply-To: <20160322095250.GK7179@calimero.vinschen.de> References: <20160321100007 DOT GK3422 AT calimero DOT vinschen DOT de> <1a2fa4d86b78fbf1ccf8bc9a690e82e5 AT xs4all DOT nl> <20160322095250 DOT GK7179 AT calimero DOT vinschen DOT de> Message-ID: X-Sender: houder AT xs4all DOT nl (jjXMBYj3Uef20HkOuXafBA==) User-Agent: XS4ALL Webmail X-IsSubscribed: yes --=_ce03936e0744cde128e8964687c789d4 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Title: Re: Package choosing agorithm ... Hi Corinna, (Of course I am formally addressing the project leader, but Achim, Jon, Yaakov, others? are welcome to correct me if I am wrong below). D w/o I = Download without Install I f LD = Install from Local Directory As a reminder: I reported that a new test release of Cygwin is NOT offered for install (having installed the previous test release) in my case. https://cygwin.com/ml/cygwin/2016-03/msg00425.html Relevant in my case is: - I am not using a local mirror ... - but a "partially populated Local Directory" - I do not invoke setup.exe with the -m option - my local directory does not have the current release of Cygwin As you replied "it works for me" and "not using the -m option should not make a difference", I decided to study the source code of setup.exe. As I had never seen the source code of setup before, I started my study where you had "left off" modifying (about a year ago). Subsequently, I reported back to the list, announcing that I found the bug, but was not sure I had. https://cygwin.com/ml/cygwin/2016-03/msg00480.html I was wrong. My patch did work, but for the wrong reasons. So does your modification of packagemeta::trustp ... Here is another attempt of mine (attempt? I seriously doubt whether there is someone which fully understands the source code in all its details ...) You will find 2 patch files attached. These patch files modify (correct): 1. packagemeta::ScanDownLoadedFiles and 2. packagemeta::trustp (yes, I do realize, that this correction to setup, is NOT important enough to most of you - using a local mirror and all that; consequently, do whatever you like with my post - I am merely providing info to the list). My argument for the correction is as follows: - packagedb::packages, a class variable, is the "package database" that is used by setup. - basically, it is a list of pairs (mapping between the packagename and its entry in setup.ini) (one where installed.db has been "integrated"). - formally: - typedef std::map packagecollection; - static packagecollection packages; - packagemeta is the type that describes a "package entry" from setup.ini - an object of type packagemeta does not only describe the previous, current and experimental (if applicable) lines from a package entry in setup.ini, it also describes the installed version of a package, as if installed.db is part of setup.ini. -- - bottom-line: the prev, curr, exp and installed data member of packagemeta are "static": these data members represent the info from setup.ini (and installed.db) and they should never be "nullified". - yet, that is exactly what happens in metapackage::ScanDownLoadedFiles. -- - packagemeta ALSO has a "not so static" data member, called versions; like packages, the contents of versions is "variable" - versions, a set of type packageversion, contains the versions of the package that are available (the source code speaks about "accessible") - available (in my simplistic view) means whether or not the tarball is present in the (local) repo - unfortunately, though versions specifies which versions are available, it does not tell us whether the previous, current or experimental version of a package is available or not -- - bottom-line: version numbers can be compared if that info is present in setup.ini; however, although the info may be present, it does not tell us that the associated tarball is available (neither does versions). - consequently, metapackage:trustp does not only have to verify that setup.ini has the required info, it also has to verify that the tarball is available, before it can give the "go-ahead". Lastly: No, I have not tested (been able) my modification for each possible configuration out there (for instance, I do not install source tarballs). Regards, Henri ===== --=_ce03936e0744cde128e8964687c789d4 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=package_meta_cc.patch Content-Disposition: attachment; filename=package_meta_cc.patch; size=869 ZGlmZiAtLWdpdCBhL3BhY2thZ2VfbWV0YS5jYyBiL3BhY2thZ2VfbWV0YS5j YwppbmRleCAzNGZmNzhjLi5mZjc4N2E4IDEwMDY0NAotLS0gYS9wYWNrYWdl X21ldGEuY2MKKysrIGIvLi4vc3JjMi9wYWNrYWdlX21ldGEuY2MKQEAgLTY4 MywxNSArNjgzLDE4IEBAIHBhY2thZ2VtZXRhOjpTY2FuRG93bmxvYWRlZEZp bGVzIChib29sIG1pcnJvcl9tb2RlKQogCSAgLyogRm9yIGxvY2FsIGluc3Rh bGxzLCBpZiB0aGVyZSBpcyBubyBzcmMgYW5kIG5vIGJpbiwgdGhlIHZlcnNp b24KIAkgICAqIGlzIHVuYXZhaWxhYmxlCiAJICAgKi8KLQkgIGlmICghaS0+ YWNjZXNzaWJsZSAoKSAmJiAhcGtnc3JjdmVyLmFjY2Vzc2libGUgKCkKLQkg ICAgICAmJiAqaSAhPSBwa2cuaW5zdGFsbGVkKQorCSAgaWYgKCppICE9IHBr Zy5pbnN0YWxsZWQKKwkgICAgICAmJiAhaS0+YWNjZXNzaWJsZSAoKSAmJiAh cGtnc3JjdmVyLmFjY2Vzc2libGUgKCkgKQogCSAgICB7CisvLyBIZW5yaTog aW5uaWhpbGF0ZSB0aGUgaW5mbyB0aGF0IGhhcyBiZWVuIGNvbGxlY3RlZCBm cm9tIHNldHVwLmluaT8gRE8gTk9UIQorCSAgICAgICNpZiAwCiAJICAgICAg aWYgKHBrZy5wcmV2ID09ICppKQogCQlwa2cucHJldiA9IHBhY2thZ2V2ZXJz aW9uICgpOwogCSAgICAgIGlmIChwa2cuY3VyciA9PSAqaSkKIAkJcGtnLmN1 cnIgPSBwYWNrYWdldmVyc2lvbiAoKTsKIAkgICAgICBpZiAocGtnLmV4cCA9 PSAqaSkKIAkJcGtnLmV4cCA9IHBhY2thZ2V2ZXJzaW9uICgpOworCSAgICAg ICNlbmRpZgogCSAgICAgIHBrZy52ZXJzaW9ucy5lcmFzZSAoaSsrKTsKIAkg ICAgICAvKiBGb3Igbm93LCBsZWF2ZSB0aGUgc291cmNlIHZlcnNpb24gYWxv bmUgKi8KIAkgICAgfQo= --=_ce03936e0744cde128e8964687c789d4 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=package_meta_h.patch Content-Disposition: attachment; filename=package_meta_h.patch; size=856 ZGlmZiAtLWdpdCBhL3BhY2thZ2VfbWV0YS5oIGIvcGFja2FnZV9tZXRhLmgK aW5kZXggYjI0ZDRmYy4uM2QyYjc3NSAxMDA2NDQKLS0tIGEvcGFja2FnZV9t ZXRhLmgKKysrIGIvLi4vc3JjMi9wYWNrYWdlX21ldGEuaApAQCAtMTA1LDEy ICsxMDUsMTQgQEAgcHVibGljOgogICAgIGlmIChfZGVmYXVsdCAmJiBjdXJy ICYmIGluc3RhbGxlZAogCSYmIHBhY2thZ2V2ZXJzaW9uOjpjb21wYXJlVmVy c2lvbnMgKGN1cnIsIGluc3RhbGxlZCkgPCAwKQogICAgICAgewotCWlmIChl eHAgJiYgcGFja2FnZXZlcnNpb246OmNvbXBhcmVWZXJzaW9ucyAoaW5zdGFs bGVkLCBleHApIDwgMCkKKy8vIEhlbnJpOiBubywgbm8sIG5vIC4uLiBmaXJz dCBjaGVjayB3aGV0aGVyIHRoZSBhc3NvY2lhdGVkIHRhcmJhbGwgaXMgaW4g dGhlIHJlcG8gb3Igbm90IQorCWlmIChleHAuYWNjZXNzaWJsZSgpICYmIGV4 cCAmJiBwYWNrYWdldmVyc2lvbjo6Y29tcGFyZVZlcnNpb25zIChpbnN0YWxs ZWQsIGV4cCkgPCAwKQogCSAgcmV0dXJuIGV4cDsKIAlyZXR1cm4gaW5zdGFs bGVkOwogICAgICAgfQogICAgIC8qIE90aGVyd2lzZSwgaWYgYSAiY3VyciIg dmVyc2lvbiBleGlzdHMsIHJldHVybiAiY3VyciIuICovCi0gICAgaWYgKGN1 cnIpCisvLyBIZW5yaTogbm8sIG5vLCBubyAuLi4gZmlyc3QgY2hlY2sgd2hl dGhlciB0aGUgYXNzb2NpYXRlZCB0YXJiYWxsIGlzIGluIHRoZSByZXBvIG9y IG5vdCEKKyAgICBpZiAoY3Vyci5hY2Nlc3NpYmxlKCkgJiYgY3VycikKICAg ICAgIHJldHVybiBjdXJyOwogICAgIC8qIE90aGVyd2lzZSByZXR1cm4gdGhl IGluc3RhbGxlZCB2ZXJzaW9uLiAqLwogICAgIHJldHVybiBpbnN0YWxsZWQ7 Cg== --=_ce03936e0744cde128e8964687c789d4 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --=_ce03936e0744cde128e8964687c789d4--