[Lucid-LBM] SRU: Make gobi_loader unique to ABI and flavour

Stefan Bader stefan.bader at canonical.com
Tue Sep 14 15:35:54 UTC 2010


SRU Justification:

Impact: When adding the gobi loader and its udev rule to the wwan package
(to support certain wwan cards) it was not taken into account that these
files are installed into common directories and by that are not unique to
the package. This causes problems when trying to upgrade the package to a
newer kernel ABI as packages are considered different but still provide
the same files. Also this would not allow to install multiple flavors in
parallel.

Fix: For the packaging the udev rules file is modified to check for the
current kernel version and run a <abi>-<flavor> postfixed version of the
gobi_loader. And both the rules file and the loader are renamed to be
<abi>-<flavor> postfixed.

Testcase: Installing two flavors of the wwan package or upgrade between
abi version currently fails.

>From 644ff5a21c8eeca4f41ecda7b4bdc9e87ee77a60 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader at canonical.com>
Date: Tue, 14 Sep 2010 12:05:52 +0200
Subject: [PATCH] UBUNTU: wwan: Make gobi_loader unique to ABI and flavour

BugLink: http://bugs.launchpad.net/bugs/638115

This resolves the problems of packages being held back on ABI bumps and
multiple flavours not being installable in parallel.

Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
---
 debian/rules.d/2-binary-arch.mk |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 37739a5..25f3a1b 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -185,6 +185,26 @@ endif
 	done
 	$(MAKE) -C $(wwsrcdir) prefix=$(wwpkgdir) install
 	install -d $(wwpkgdir)/DEBIAN
+
+	#
+	# Hack to make the udev rule and firmware loader specific to the
+	# package.
+	#
+	POSTFIX="$(abinum)-$(target_flavour)"				\
+	R='PROGRAM="\/bin\/uname -r",';					\
+	R=$$R' RESULT!="'$(release)-$$POSTFIX'",';			\
+	R=$$R' GOTO="gobi_rules_end"';					\
+	sed -i -e "s/^\(LABEL=\"gobi_rules\"\)$$/\0\n$$R\n/"		\
+	    -e "s/\(gobi_loader\)/\0-$$POSTFIX/"			\
+	    $(wwpkgdir)/lib/udev/rules.d/60-gobi.rules
+
+	TGTFILE="$(wwpkgdir)/lib/udev/rules.d/60-gobi";			\
+	chmod 644 $${TGTFILE}.rules;					\
+	mv $${TGTFILE}.rules $${TGTFILE}-$(abinum)-$(target_flavour).rules
+
+	TGTFILE="$(wwpkgdir)/lib/udev/gobi_loader";			\
+	mv $$TGTFILE $$TGTFILE-$(abinum)-$(target_flavour)
+
 	for script in postinst postrm; do				       \
 		sed -e 's/@@KVER@@/$(release)-$(abinum)-$*/g'		       \
 			debian/control-scripts/$$script			       \
-- 
1.7.0.4





More information about the kernel-team mailing list