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 <[email protected]> > > * 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
