This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Package choosing algorithm ...


On 2016-03-22 10:52, Corinna Vinschen wrote:
On Mar 21 13:40, Houder wrote:

[snip]

Apparently specifying the -m option makes a difference ...

It shouldn't but apparently it does, oh well.

https://cygwin.com/acronyms#PGA anybody?

Hi Corinna,

More experimenting ... including building and testing setup.exe

All the time using "Install from Local Directory" ...

 - copied cygwin-2.5.0-0.8.tar.xz to cygwin-2.5.0-0.9.tar.xz
 - modified setup.ini
cygwin: substituted 0.9 for TEST

- using my test version of setup.exe, I found out that the current version of the cygwin tarball (setup.ini) HAD to be in my repo ... or else setup would
   not offer the new test version for install ...
 - I modified package_meta.h accordingly - see below
   (my new test version is offered for install after the modification)
 - next I downloaded the current version of the cygwin tarball and moved
   the file to appropriate place in my repo.
Using the official version of setup, I verified that my test version is now
   offered for install.

Please, keep in mind: I am NOT announcing here that I found the bug ... Please,
keep that in mind (inexperienced C++ developer and all that).

I am sure more testing is required ...

Regards,

Henri

======

package_meta.h:

  std::string action_caption () const;
  packageversion trustp (bool _default, trusts const t) const
  {
/* If the user chose "test" and a "test" version is available, return it. */
    if (t == TRUST_TEST && exp)
      return exp;
/* Are we looking for the default version and does the installed version have a higher version number than the "curr" package? This means the user has installed a "test" version, or built her own version newer than "curr". Rather than pulling the user back to "curr", we install "test" if a "test" version is available and the version number is higher, or we stick to "installed" if not. This reflects the behaviour of
       `yum update' on Fedora. */
// Henri
//Log (LOG_PLAIN) << "HENRI:" << "\t" << this->name << "\t" << _default << "\t" << prev << curr << exp << "\t" << installed << endLog;
Log (LOG_PLAIN) << "HENRI:" << "\t" << this->name << " " \
<< curr << " " << installed << " cmp(c,i): " << packageversion::compareVersions (curr, installed) << " " \ << installed << " " << exp << " cmp(i,e): " << packageversion::compareVersions (installed, exp) << endLog;

// Henri: Oops, current (setup.ini) is NOT present in repo in my case ...
//    if (_default && curr && installed
    if (_default && installed
        && packageversion::compareVersions (curr, installed) < 0)
      {
if (exp && packageversion::compareVersions (installed, exp) < 0) {
Log (LOG_PLAIN) << "HENRI!" << "\t" << this->name << endLog;
          return exp;
        }
        return installed;
      }
    /* Otherwise, if a "curr" version exists, return "curr". */
    if (curr)
      return curr;
    /* Otherwise return the installed version. */
    return installed;
  }

=====

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]