FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 12-13-2011, 07:55 AM
Raphael Hertzog
 
Default Cross-grading support

Hi Guillem,

I noticed the change below in the latest version of your branch.
This effectively removes the cross-grading failure that Sven Joachim
reported but I'm concerned about the implications.

Most of the upgrade code has been written under the assumption that
an upgrade always works with the same pkginfo (with the new package
in pkg.available). Allowing the cross-grade here means that
we have upgrades where the relevant pkg.installed and pkg.available are no
longer in the same pkginfo struct.

So this change will break other stuff. You need to carefully review other
parts of the code with this in mind.

Given this is a change in the underlying specifications used during my
development, it obviously breaks my test suite.

FWIW, we had a discussion on this topic on February but you did
not took position at this time:
http://lists.debian.org/debian-dpkg/2011/02/msg00040.html

My personal preference at this point would be to get full cross-grading
support in a second step and finalize what's already working correctly.
We really need to have a multiarch enabled dpkg in sid before Christmas.
And such a fundamental change does not really help.

Cheers,

@@ -516,20 +531,20 @@ void process_archive(const char *filename) {
* that we need. */
pkg->clientdata->istobe= itb_installnew;

+ /* Check if the new package can either be co-installed, installed anew or
+ * replaced (or cross-graded). */
+ if (pkg->available.multiarch != multiarch_same &&
+ pkg_installed_instances(pkg->set) > 1)
+ ohshit(_("%s %s (Multi-Arch: %s) is not co-installable with "
+ "%s which currently has multiple installed instances"),
+ pkg_name(pkg, pno_always),
+ versiondescribe(&pkg->available.version, vdew_nonambig),
+ multiarchinfos[pkg->available.multiarch].name,
+ pkg_name(pkg, pno_never));
+
for (otherpkg = &pkg->set->pkg; otherpkg; otherpkg = otherpkg->arch_next) {
if (otherpkg == pkg || otherpkg->status < stat_halfinstalled)
continue;
- /* Look for other instances of the same package that can't coexist */
- if (otherpkg->installed.multiarch != multiarch_same ||
- pkg->available.multiarch != multiarch_same)
- ohshit(_("%s %s (Multi-Arch: %s) is not co-installable with %s "
- "%s (Multi-Arch: %s) which is currently installed"),
- pkg_name(pkg, pno_always),
- versiondescribe(&pkg->available.version, vdew_nonambig),
- multiarchinfos[pkg->available.multiarch].name,
- pkg_name(otherpkg, pno_always),
- versiondescribe(&otherpkg->installed.version, vdew_nonambig),
- multiarchinfos[otherpkg->installed.multiarch].name);
/* Deconfigure them if they are not in sync */
if (versioncompare(&pkg->available.version, &otherpkg->installed.version) &&
otherpkg->status > stat_halfconfigured) {

--
Raphaël Hertzog ◈ Writer/Consultant ◈ Debian Developer

Pre-order a copy of The Debian Administrator's Handbook and
help liberate it: http://debian-handbook.info/liberation/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111213085501.GA4029@rivendell.home.ouaza.com">ht tp://lists.debian.org/20111213085501.GA4029@rivendell.home.ouaza.com
 
Old 12-13-2011, 08:24 AM
Raphael Hertzog
 
Default Cross-grading support

On Tue, 13 Dec 2011, Raphael Hertzog wrote:
> So this change will break other stuff. You need to carefully review other
> parts of the code with this in mind.
>
> Given this is a change in the underlying specifications used during my
> development, it obviously breaks my test suite.

FWIW the attached patch represents the changes in the specification (to be
applied on top of pu/multiarch of my pkg-tests.git). But the test suite
does not work even with this change. So this confirms what I said.

The test suite also suffers from the ambiguity of the package name input.
We're testing cross-grading... shall I refer to "foo:all" instead of "foo"
after a switch from "Arch: any, M-A: same" to "Arch: all" to avoid any
problem if foo == foo:* ?

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/
diff --git a/t-multiarch/Makefile b/t-multiarch/Makefile
index ebb5e54..da24f78 100644
--- a/t-multiarch/Makefile
+++ b/t-multiarch/Makefile
@@ -208,10 +208,10 @@ test-crossgrade-any-all-%: ma-setup
$(call pkg_is_not_installed,pkg-ma-$*)
# M-A: $* / Upgrade from arch: any-foreign -> all
$(DPKG_INSTALL) pkg-ma-$*_1.0_$(FOREIGN_ARCH).deb
- ! $(DPKG_INSTALL) pkg-ma-$*_1.0_all.deb
- $(call pkg_is_installed,pkg-ma-$*:$(FOREIGN_ARCH))
- $(call pkg_is_not_installed,pkg-ma-$*)
- $(DPKG_PURGE) pkg-ma-$*:$(FOREIGN_ARCH)
+ $(DPKG_INSTALL) pkg-ma-$*_1.0_all.deb
+ $(call pkg_is_not_installed,pkg-ma-$*:$(FOREIGN_ARCH))
+ $(call pkg_is_installed,pkg-ma-$*)
+ $(DPKG_PURGE) pkg-ma-$*

test-crossgrade-all-any-%: ma-setup
# M-A: $* / Upgrade from arch: all -> any-native
@@ -224,10 +224,10 @@ test-crossgrade-all-any-%: ma-setup
$(call pkg_is_not_installed,pkg-ma-$*:$(NATIVE_ARCH))
# M-A: $* / Upgrade from arch: all -> any-foreign
$(DPKG_INSTALL) pkg-ma-$*_1.0_all.deb
- ! $(DPKG_INSTALL) pkg-ma-$*_1.0_$(FOREIGN_ARCH).deb
- $(call pkg_is_not_installed,pkg-ma-$*:$(FOREIGN_ARCH))
- $(call pkg_is_installed,pkg-ma-$*)
- $(DPKG_PURGE) pkg-ma-$*
+ $(DPKG_INSTALL) pkg-ma-$*_1.0_$(FOREIGN_ARCH).deb
+ $(call pkg_is_installed,pkg-ma-$*:$(FOREIGN_ARCH))
+ $(call pkg_is_not_installed,pkg-ma-$*)
+ $(DPKG_PURGE) pkg-ma-$*:$(FOREIGN_ARCH)

test-crossgrade-same-all: ma-setup
# Several M-A: same installed, can't upgrade to single arch all
 

Thread Tools




All times are GMT. The time now is 07:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org