Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] debian.bbclass: Fix hardcoded "lib" reference
@ 2011-09-21 11:38 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2011-09-21 11:38 UTC (permalink / raw)
  To: openembedded-core

This patch removes a hardcoded "lib" reference from debian.bbclass
allowing libdirs like "lib64" to be used. Whilst working on this area of
code, a similar assumption about "bin" is removed and the regular
expression compilation is moved to the parent function since it doesn't
change and this will improve the speed of the code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 1880830..554525d 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -24,6 +24,9 @@ python debian_package_name_hook () {
 
 	pkgdest = bb.data.getVar('PKGDEST', d, 1)
 	packages = bb.data.getVar('PACKAGES', d, 1)
+	bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$")
+	lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$")
+	so_re = re.compile("lib.*\.so")
 
 	def socrunch(s):
 		s = s.lower().replace('_', '-')
@@ -45,9 +48,6 @@ python debian_package_name_hook () {
 		return (s[stat.ST_MODE] & stat.S_IEXEC)
 
 	def auto_libname(packages, orig_pkg):
-		bin_re = re.compile(".*/s?bin$")
-		lib_re = re.compile(".*/lib$")
-		so_re = re.compile("lib.*\.so")
 		sonames = []
 		has_bins = 0
 		has_libs = 0




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-21 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21 11:38 [PATCH] debian.bbclass: Fix hardcoded "lib" reference Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox