[pacman-dev] test/sync999 - pacman segfault

Aurelien Foret aurelien at archlinux.org
Wed Feb 22 14:57:25 EST 2006


Hi,

Running pactest today showed that sync999 test case no longer works.
Eventually, pactest return on investment does not seem null anymore :)

It seems the flaw appeared with lib/libalpm/conflict.c:1.15.
The same test with conflict.c:1.14 is ok.

Here's the log from pactest:

flow2: PM_OPT_DBPATH set to 'var/lib/pacman'
flow2: PM_OPT_CACHEDIR set to 'var/cache/pacman/pkg'
debug: opening database 'local'
debug: opening database 'sync'
:: Starting local database upgrade...
flow1: checking for package replacements
debug: loading package cache (infolevel=0x3) for repository 'sync'
flow1: checking for package upgrades
debug: loading package cache (infolevel=0x3) for repository 'local'
debug: CACHE: fetching 'sync/pkg1'
flow2: pkg1-1.0-1 elected for upgrade (1.0-1 => 1.0-2)
debug: CACHE: fetching 'sync/pkg2'
flow2: pkg2-1.0-1 elected for upgrade (1.0-1 => 1.0-2)
resolving dependencies...
flow1: resolving targets dependencies
done.
looking for inter-conflicts...
flow1: looking for unresolvable dependencies
debug: CACHE: fetching 'local/pkg1'
debug: CACHE: fetching 'local/pkg2'
flow1: looking for conflicts
debug: targs vs db: found pkg2 as a conflict for pkg1
debug: targs vs targs: found pkg2 as a conflict for pkg1
debug: db vs targs: found pkg1 as a conflict for pkg2
flow2: package 'pkg1' is conflicting with 'pkg2'
debug: CACHE: fetching 'local/pkg2'
debug: package 'pkg1' provides its own conflict
debug: resolving package 'pkg1' conflict
flow2: electing 'pkg2' for removal
flow2: removing 'pkg2' from target list
flow2: package 'pkg2' is conflicting with 'pkg1'
debug: CACHE: fetching 'local/pkg1'


When handling conflict pkg1, pkg2 is removed from targets.
Then, the library tries to handle pkg2 conflict... but find_pkginsync() 
returns NULL...

I've committed a fix (sync.c:1.66) to skip conflict resolution in such a 
case.
Thoughts?

The test suite is ok with it ;)
-- 
Aurelien




More information about the pacman-dev mailing list