Re: Review of pu/multiarch/master
On Fri, 25 Nov 2011, Raphael Hertzog wrote:
> Some other comments:
Following up... I have updated the test suite to work with the new
--add-architecture/--remove-architecture. Then I tried to run the test
suite and it doesn't work. I identified several issues:
1/ The decision to allow pkgbin->installed.arch / pkgbin->available.arch
to be NULL causes segfault while checking dependencies on virtual
I pushed a new commit that modifies pkg_db_find_set() to initialize
pkgset->pkg.installed.arch & pkgset->pkg.installed.available. It still
enables to output different warnings for missing architecture field
and empty architecture field in parsedb() since that code uses first a
statically allocated pkgset and not one allocated by pkg_db_find_set().
“libdpkg: Change pkg_db_find_pkg() to create new arch instances”
I adjusted this commit to drop a case in the corresponding assert().
2/ --remove-architecture doesn't work because modstatdb_open() calls
dpkg_arch_load_list() a second time and all the struct dpkg_arch are
“libdpkg: Add new dpkg_arch database interface”
I added a static boolean to avoid loading the list twice.
3/ pkgbin->name_arch is not initialized to NULL
“Add new package name accessors"
I added the missing initialization.
4/ Triggers are no longer working as expected with M-A: same packages.
process_archive() calls trig_parse_ci() while the interesting content is
only in pkg->available but it doesn't forward this information further
down... trig_file_interests_update() calls pkg_name() and thus stores a
package name without its expected architecture qualifier (since
pkg->installed is empty).
If you install another instance of the package, the unqualified entry
gets his qualifier by the magic of reloading it. But the newly added
entry still doesn't have it. This is then an error because "foo:<native>"
and "foo" are the same package...
“Update triggers support to understand multi-arch”
I fixed this by extending trig_options and ensuring we can initialize
it right from trig_parse_ci() and let it trickle down up to where we need
With all those fixes, the test-suite passes again. Thus I have update
my test-build branch with this code.
All the fixes can be reviewed individually in pu/multiarch/for-guillem:
Raphaël Hertzog ◈ Debian Developer
Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/go/ulule-rh/