[RFC] 1.7 Packaging: Obsolete packages

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Aug 21 11:45:00 GMT 2008


On Aug 21 12:35, Corinna Vinschen wrote:
> On Aug 21 10:26, Corinna Vinschen wrote:
> > On Aug 20 23:21, Yaakov (Cygwin Ports) wrote:
> > > Corinna Vinschen wrote:
> > > > What if we add an "obsoletes:" line to setup.{ini,hint}?
> > > > [...]
> > > Any progress yet on this one?
> > 
> > Unfortunately not.  The package management in setup is written in some
> > sort of martial-arts C++, which I have trouble to follow through.  For
> > this and for the problem I describe in
> > 
> > http://cygwin.com/ml/cygwin-apps/2008-08/msg00162.html
> > 
> > I would need help.
> 
> Setup.exe apparently already understands package lists in setup.ini
> which start with "Replaces:" (upper case R), collects the information
> and stores it in an internal list, but then doesn't seem to use it
> later on.  Too bad.

IIUC, the ConnectedLoopFinder::visit() function is the core function
which creates the dependency order.  What I don't get is this: The
function starts with:

  if (!db.packages[nodeToVisit]->installed)
    /* Can't visit this node, and it is not less than any visted node */
    return db.packages.size() + 1;

So, it skips packages which are not installed?  What about packages
which are about to be installed the first time?  Isn't their "installed"
packageversion NULL and only "desired" is a vaild version?

And then, assuming a package is about to be uninstalled.  Doesn't that
package have a "desired" of NULL?  And shouldn't such a package be
skipped in the dependency tracking?

I don't see where "installed" is set to the "desired" packageversion
before the dependency tracking is called.  Can anybody help me to
understand this?


Corinna


-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-apps mailing list