tags 681376 +patch
thanks

On Thu, 2012-07-12 at 12:37 -0600, Ian Campbell wrote:
> One possible solution would be to turn those virtual packages into real
> ones, at which point I expect the versioning would cause the expected
> upgrade.

Perhaps inevitably this wasn't quite sufficient. The problem is that
even if xen-hypervisor-amd64 becomes a real package on upgrade the
dependency is already satisfied by xen-hypervisor-4.0-amd64 so apt
doesn't do the upgrade.

I can't really think of a solution for this in Wheezy. However what we
can, and I think should, do for Wheezy is to add an explicit real
package "xen-hypervisor-latest-ARCH". It will still require manual
action on upgrade to Wheezy but things should then Just Work for Wheezy
+1.

Also the xen-linux-system-* packages should include the latest package
as the preferred alternative.

Ian.
>From a49af532706f14b82c6b9b930a7bcbed93ffe227 Mon Sep 17 00:00:00 2001
From: Ian Campbell <i...@hellion.org.uk>
Date: Sat, 14 Jul 2012 18:25:00 +0100
Subject: [PATCH] Add xen-linux-system dependency on xen-hypervisor-latest as
 prefered alternative

---
 linux/debian/bin/gencontrol.py |    1 +
 linux/debian/changelog         |    4 ++++
 2 files changed, 5 insertions(+)

diff --git a/linux/debian/bin/gencontrol.py b/linux/debian/bin/gencontrol.py
index 5fd5cda..e181a0d 100755
--- a/linux/debian/bin/gencontrol.py
+++ b/linux/debian/bin/gencontrol.py
@@ -266,6 +266,7 @@ class Gencontrol(Base):
             p = self.process_packages(self.templates['control.xen-linux-system'], vars)
             l = PackageRelationGroup()
             for xen_flavour in config_entry_xen['flavours']:
+                l.append("xen-hypervisor-latest-%s" % xen_flavour)
                 l.append("xen-hypervisor-%s" % xen_flavour)
             p[0]['Depends'].append(l)
             packages_dummy.extend(p)
diff --git a/linux/debian/changelog b/linux/debian/changelog
index 575c028..101eda1 100644
--- a/linux/debian/changelog
+++ b/linux/debian/changelog
@@ -34,6 +34,10 @@ linux (3.2.23-1) UNRELEASED; urgency=low
   * udf: Improve table length check to avoid possible overflow
   * CIFS: Respect negotiated MaxMpxCount (deferred from 3.2.14)
 
+  [ Ian Campbell ]
+  * Add xen-linux-system dependency on xen-hypervisor-latest as prefered
+    alternative.
+
  -- Ben Hutchings <b...@decadent.org.uk>  Fri, 29 Jun 2012 15:01:22 +0100
 
 linux (3.2.21-3) unstable; urgency=low
-- 
1.7.10

>From 0656c6126fc105e6e1132a6985f3b03b137180d0 Mon Sep 17 00:00:00 2001
From: Ian Campbell <i...@hellion.org.uk>
Date: Fri, 13 Jul 2012 22:55:52 +0100
Subject: [PATCH] Add xen-hypervisor-latest-ARCH as a real package

---
 xen/debian/changelog                       |    1 +
 xen/debian/rules.real                      |    9 +++++++++
 xen/debian/templates/control.hypervisor.in |    7 +++++++
 3 files changed, 17 insertions(+)

diff --git a/xen/debian/changelog b/xen/debian/changelog
index 9fec290..1b222b7 100644
--- a/xen/debian/changelog
+++ b/xen/debian/changelog
@@ -2,6 +2,7 @@ xen (4.1.3~rc1+hg-20120614.a9c0a89c08f2-5) UNRELEASED; urgency=low
 
   [ Ian Campbell ]
   * Set tap device MAC addresses to fe:ff:ff:ff:ff:ff (Closes: #671018)
+  * Add xen-hypervisor-latest as a real package to aid upgrade (Closes: #681376)
 
   [ Bastian Blank ]
   * Actually build-depend on new enough version of dpkg-dev.
diff --git a/xen/debian/rules.real b/xen/debian/rules.real
index 99ae1f0..5791b83 100644
--- a/xen/debian/rules.real
+++ b/xen/debian/rules.real
@@ -23,6 +23,7 @@ binary-arch-arch: install-xenstore-utils_$(ARCH)
 binary-arch-arch: install-lib-ocaml-dev_$(ARCH)
 binary-arch-arch: install-lib-ocaml_$(ARCH)
 binary-arch-flavour: install-hypervisor_$(ARCH)_$(FLAVOUR)
+binary-arch-flavour: install-hypervisor-latest_$(ARCH)_$(FLAVOUR)
 
 binary-indep: install-docs
 binary-indep: install-utils-common
@@ -140,6 +141,14 @@ install-hypervisor_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(
 	cp $(DIR)/xen/xen.gz debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR).gz
 	+$(MAKE_SELF) install-base
 
+install-hypervisor-latest_$(ARCH)_$(FLAVOUR): PACKAGE_NAME = xen-hypervisor-latest-$(FLAVOUR)
+install-hypervisor-latest_$(ARCH)_$(FLAVOUR): DH_OPTIONS = -p$(PACKAGE_NAME)
+install-hypervisor-latest_$(ARCH)_$(FLAVOUR):
+	dh_testdir
+	dh_testroot
+	dh_prep
+	+$(MAKE_SELF) install-base
+
 install-libxen_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH)
 install-libxen_$(ARCH): DH_OPTIONS = -plibxen-$(VERSION)
 install-libxen_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH)
diff --git a/xen/debian/templates/control.hypervisor.in b/xen/debian/templates/control.hypervisor.in
index b0ee0dd..b6b7ad6 100644
--- a/xen/debian/templates/control.hypervisor.in
+++ b/xen/debian/templates/control.hypervisor.in
@@ -14,3 +14,10 @@ Description: Xen Hypervisor on @class@
  specifically crafted to work as the Domain 0, mediating hardware access for
  XEN itself.
 
+Package: xen-hypervisor-latest@localversion@
+Depends: xen-hypervisor-@version@@localversion@, ${misc:Depends}
+Description: Latest Xen Hypervisor on @class@
+ This package depends on the latest version of the Xen hypervisor for @class@
+ .
+ @desc@
+
-- 
1.7.10

Reply via email to