This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: setup.exe packagedb cache refresh bug
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Sat, 22 May 2010 02:13:40 -0400
- Subject: Re: setup.exe packagedb cache refresh bug
- References: <4BF773B2.3080808@redhat.com>
- Reply-to: cygwin-apps at cygwin dot com
On Fri, May 21, 2010 at 11:03:30PM -0700, Brendan Conoboy wrote:
>Hi folks,
>
>There's a small bug in setup that shows up when doing side-by-side
>installs. The problem occurs because packagedb is populated before the
>user has a chance to specify what directory to use for the installation.
> When an alternate install path is specified, the installer continues
>to use the previously calculated list of packages as already being
>installed. The end result is a skeletal installation of just the
>packages from the original install tree that needed updating being
>installed in the new install tree. The attached patch resets the
>installeddbread flag, allowing the next package_db constructor to
>repopulate the list. Works for me. Changelog below.
>
>2010-05-21 Brendan Conoboy <blc@redhat.com>
>
> * package_db.cc (packagedb::resetDBRead): New. Resets
> installeddbread flag.
> * package_db.h: Define packagedb::resetDBRead().
> * mount.cc (set_root_dir): Call packagedb::resetDBRead() to
> allow packagedb to repopulate with new root package list.
It seems like this patch would always throw away the previously read
packages. I haven't looked closely but that suggests a memory leak.
Wouldn't it make more sense to only populate the package list when you
know where your root lives?
cgf