public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: [RFC] 1.7 Packaging: Obsolete packages
Date: Fri, 22 Aug 2008 10:11:00 -0000	[thread overview]
Message-ID: <20080822101259.GT29104@calimero.vinschen.de> (raw)
In-Reply-To: <20080822092437.GS29104@calimero.vinschen.de>

On Aug 22 11:24, Corinna Vinschen wrote:
> On Aug 22 01:52, Brian Dessent wrote:
> > As far as the actual freeing of memory, I think it would go something
> > like
> > 
> > for (vector <packagemeta *>::iterator i = packages.begin ();
> >      i != packages.end (); ++i)
> >   {
> >     delete *i;
> >   }
> > packages.clear();
> > 
> > (And likewise for sourcePackages.)
> 
> If that works, it should be fairly simple.  Since the installed.db is
> the first time read when pressing the "Next" button in the root dir
> dialog, it might be best to place the cleanup above in the same
> place, right before initializing the packagedb.

Too simple, apparently.  I created a new static method packagedb::clear()
which I call in RootPage::OnNext():

  void
  packagedb::clear ()
  {
    for (vector <packagemeta *>::iterator i = packages.begin ();
	 i != packages.end (); ++i)
      delete *i;
    packages.clear ();
    for (vector <packagemeta *>::iterator i = sourcePackages.begin ();
	 i != sourcePackages.end (); ++i)
      {

/* If you don't clear the categories, deleting the source packages
   SEGVs.  Are the categories lists shared with the binary packagemeta? */

	(*i)->categories.clear ();
	delete *i;
      }
    sourcePackages.clear ();
    installeddbread = 0;
  }

For testing I started setup and just clicked "Next" up to the package
selection dialog.  This picked up all information from a former 1.5
install and there's a list of packages to update. 

Then I clicked "Back" up to the root dir dialog, changed the root dir to
a non-existing "Cygwin-1.7" and clicked "Next" again up to the package
selection.  The result was that Setup now thinks it has nothing to
install/update.  Nothing at all.

Something's obviously missing...


Corinna

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

  parent reply	other threads:[~2008-08-22 10:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24  4:44 Yaakov (Cygwin Ports)
2008-07-24  9:43 ` Corinna Vinschen
2008-07-24 23:44   ` Yaakov (Cygwin Ports)
2008-07-25  9:40     ` Corinna Vinschen
2008-07-25 14:53       ` Christopher Faylor
2008-07-25 15:16         ` Corinna Vinschen
2008-07-25 16:13           ` Christopher Faylor
2008-07-28  2:20         ` Yaakov (Cygwin Ports)
2008-07-28  8:45           ` Corinna Vinschen
2008-07-28 16:40           ` Brian Dessent
2008-07-30 12:17       ` Corinna Vinschen
2008-07-30 15:01         ` Yaakov (Cygwin Ports)
2008-07-30 15:25         ` Christopher Faylor
2008-08-21  4:22         ` Yaakov (Cygwin Ports)
2008-08-21  8:24           ` Corinna Vinschen
2008-08-21 10:34             ` Corinna Vinschen
2008-08-21 11:45               ` Corinna Vinschen
2008-08-22  1:30                 ` Brian Dessent
2008-08-22  8:18                   ` Corinna Vinschen
2008-08-22  8:53                     ` Brian Dessent
2008-08-22  9:12                       ` Brian Dessent
2008-08-22  9:23                       ` Corinna Vinschen
2008-08-22  9:30                         ` Brian Dessent
2008-08-22 10:11                         ` Corinna Vinschen [this message]
2008-08-22 10:54                           ` Brian Dessent
2008-08-25 10:27                             ` Corinna Vinschen
2008-08-22  9:26                       ` Brian Dessent
2008-08-22 11:25                       ` Charles Wilson
2008-08-21 23:47               ` Yaakov (Cygwin Ports)
2008-07-25 19:31   ` Nicholas Wourms

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080822101259.GT29104@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).