This is the mail archive of the cygwin-apps 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: [PATCH] Do not clear the prev, curr and exp fields of packagemeta. Never.


On 2016-05-23 15:44, Jon Turney wrote:
This patch rectifies

 - packagemeta::ScanDownloadedFiles (package_meta.cc), and
 - packagemeta::trustp (package_meta.h)

Clarification:
Class packagemeta has "fields" prev, curr, exp and installed, which in fact represent the info from setup.ini/installed.db, and should never be cleared therefore. _Currently_ these fields are cleared in ScanDownloadedFiles() in order to notify that the tarball for the associated field is not available. This is a mistake, as it destroys relevant info (e.g. the version number of
a version).
To ascertain whether or not the associated tarball is available, one should
invoke <field>.accesible().

Can you clarify a bit about the problem that this patch solves?  And
how you tested that it fixes it?

Hi Jon,

I reported the "problem" in March, here:

    https://cygwin.com/ml/cygwin/2016-03/msg00425.html
     - Package choosing algorithm ...

However, in a nutshell the story is as follows:

I install from "Local Directory" (i.e. not directly from a mirror; neither do
I operate a local mirror).

At that point in time I had installed a TEST version of the cygwin pkg. Then Corinna launched another TEST version of that package. After downloading that new version, I also removed the CURRENT version of that pkg (yes, nobody does
that, except me).

After that, I started setup.exe again in order to install the test version of
the cygwin pkg, which I had downloaded.

To my surprise, the new test version was NOT offered for install ... As I did
not understand why, I started the thread above.

Especially when Corinna told me, that it should work, I really started to get
curious, and decided to study the source code of setup ...

After some effort, I found the cause of the problem.

Yes, the patch has been tested, but in order to describe what I did, I really need some more time (as it has been a while), and because I still have a hard
time putting it down in English (not being my native tongue).

Thank you for your interest in my patch (although it may not solve a problem, that is really important, it does improve the 'clarity' of the source code, I
believe).

Regards,
Henri


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