[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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
packages.

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().

commit a8c90816abb1f8b4c077e92a04faed5311c7483f
“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
recreated.

commit 6f9e1a99f6f048e28959caa3c4d79bf0256c84a6
“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

commit 2a911ab5c605c8a9cc939d04fa30fd5e646640b7
“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...

commit 6e244111c74f058e13f31140e342e4d6518f0e56
“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
it.


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:
http://anonscm.debian.org/gitweb/?p=users/hertzog/dpkg.git;a=log;h=refs/heads/pu/multiarch/for-guillem

Cheers,
-- 
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/


Reply to: