diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-12 09:17:22 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-12 09:17:22 -0600 |
commit | 30f53cfe8d3f07bc9f350387b55ddf8579dd75e3 (patch) | |
tree | a0104cf68f6ed413e9cbbff37b53d3521194539a /lib/libalpm/db.h | |
parent | cae2bdafec93381284ba487010738d72d0992aab (diff) | |
download | pacman-30f53cfe8d3f07bc9f350387b55ddf8579dd75e3.tar.xz |
Fix double read issue in maint releases
This is essentially a backport/cherry-pick of commit 33240e87b99e from
master, but has to be done by hand because the DB format has diverged. Read
more in the commit message used there, which follows.
Due to the way we funk around with package data loading, we had a condition
where the filelist got doubled up because it was loaded twice.
Packages are originally loaded with INFRQ_BASE. In an upgrade/sync, the
package is checked for file conflicts next, leaving us in an "INFRQ_BASE |
INFRQ_FILES" state. Later, when committing a single package, we have an
explicit call to _alpm_local_db_read() with INFRQ_ALL as the level. Because
the package's level did not match this, we skipped over our previous "does
the incoming level match where I'm at" shortcut, and continued to load
things again, because of a lack of fine-grained checking for each of DESC,
FILES, and INSTALL.
The end result is we loaded the filelist twice, causing our remove logic to
iterate twice over the installed files, spewing a bunch of "cannot find file
X" messages.
Fix the problem by doing a bit more bitmasking logic throughout the load
method, and also fix the sanity check at the beginning of the function- this
should *only* be used for local packages as opposed to the "not a package"
check that was there before.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.h')
0 files changed, 0 insertions, 0 deletions