This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] Incidental setup.exe patches #3: Simplify packagedb task handling
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Wed, 14 Apr 2010 10:21:37 +0200
- Subject: Re: [PATCH] Incidental setup.exe patches #3: Simplify packagedb task handling
- References: <4BC54A7D.firstname.lastname@example.org>
- Reply-to: cygwin-apps at cygwin dot com
On Apr 14 05:54, Dave Korn wrote:
> I found out why we never see packages being set to "Retrieve" in download
> mode any more. There was a bit of a refactoring accident here:
> > 2008-08-12
> > Revamp for Cygwin 1.7.
> > * package_db.cc (chosen_db_task): New global variable.
> > * package_db.h (chosen_db_task): Declare.
> > (RootPage::OnNext): Initialize packagedb here the first time, to
> > avoid fetching wrong data from different previous installation.
> > * source.cc (save_dialog): Don't initialize packagedb here, rather
> > just memorize setting in chosen_db_task for the deferred initialization
> > in RootPage::OnNext.
> The problem with this design is that the root page isn't run in download
> mode, so the deferred assignment never happens. As it happens, the default
> setting is PackageDB_Install, which means that download mode is the only mode
> in which the deferred assignment would actually change anything - but it's
> also the one mode in which the deferred assignment never takes place!
> Fortunately, as far as I can tell, it no longer matters. I couldn't work
> out what the original problem referred to might have been, because subsequent
> changes have apparently rendered it moot. The one and only thing for which
> the packagedb's task setting is used any more is in order to decide whether to
> return the string "Reinstall" or "Retrieve" when generating the action caption
> for the PickPackageLine related to a given packagemeta.
> So, I think we can now safely remove chosen_db_task and the whole deferred
> init construct, giving the attached patch.
Are you sure? Please check again. The original situation which this
was supposed to fix is this:
- You have an existing installation in C:\cygwin
- You want to create a new installation in D:\cygwin-new
- You choose D:\cygwin-new as root dir in the root dir dialog
- The package list was nevertheless based on the c:\cygwin directory
installation, because the package_db stuff was already initialized
with the Cygwin root dir set to C:\cygwin
Can you make sure that this doesn't happen after your change?
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com