Package: deets
Version: 0.1.1-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch

Hi Clint,

Deets has been failing to build in Ubuntu because the libdpkg API has
changed there due to multiarch.  The attached patch has therefore been
applied to deets in Ubuntu to correct this, making deets
multiarch-compatible (but not multiarch-aware).

It's premature to apply this in Debian of course since dpkg 1.16.0 does not
include the multiarch changes, and it's even possible that there will be
further API changes before this finally lands in Debian; but I figure it's
better to forward the patch on than let it languish in the Ubuntu archive,
at any rate.

Hope that helps,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]
diff -Nru deets-0.1.1/debian/patches/multiarch-dpkg deets-0.1.1/debian/patches/multiarch-dpkg
--- deets-0.1.1/debian/patches/multiarch-dpkg	1969-12-31 16:00:00.000000000 -0800
+++ deets-0.1.1/debian/patches/multiarch-dpkg	2011-09-14 16:54:25.000000000 -0700
@@ -0,0 +1,45 @@
+Description: port to multiarched libdpkg.
+ multiarch dpkg implies API changes to some of the dpkg structures.  Update
+ luau.c accordingly.
+Author: Steve Langasek <[email protected]>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/749092
+
+--- deets-0.1.1.orig/luau.c
++++ deets-0.1.1/luau.c
+@@ -68,7 +68,7 @@ dpkg_status (lua_State * L)
+ 	  lua_error (L);
+ 	}
+ 
+-      p = pkg_db_find (lua_tostring (L, i));
++      p = pkg_db_find_pkg (lua_tostring (L, i), dpkg_arch_get_native());
+       switch (p->status)
+ 	{
+ 	case stat_notinstalled:
+@@ -107,15 +107,15 @@ static int
+ dpkg_pkglist (lua_State * L)
+ {
+   struct pkgiterator *iter;
+-  struct pkginfo *pkg;
++  struct pkgset *set;
+   int i = 0;
+ 
+   lua_newtable (L);
+ 
+-  for (iter = pkg_db_iter_new (); (pkg = pkg_db_iter_next (iter));)
++  for (iter = pkg_db_iter_new (); (set = pkg_db_iter_next_set (iter));)
+     {
+       lua_pushnumber (L, ++i);
+-      lua_pushstring (L, pkg->name);
++      lua_pushstring (L, set->name);
+       lua_rawset (L, -3);
+     }
+   pkg_db_iter_free (iter);
+@@ -137,7 +137,7 @@ dpkg_conffilelist (lua_State * L)
+       lua_error (L);
+     }
+ 
+-  p = pkg_db_find (lua_tostring (L, 1));
++  p = pkg_db_find_pkg (lua_tostring (L, 1), dpkg_arch_get_native());
+   if (!(c = p->installed.conffiles))
+     {
+       lua_pushnil (L);
diff -Nru deets-0.1.1/debian/patches/series deets-0.1.1/debian/patches/series
--- deets-0.1.1/debian/patches/series	1969-12-31 16:00:00.000000000 -0800
+++ deets-0.1.1/debian/patches/series	2011-09-14 16:54:03.000000000 -0700
@@ -0,0 +1 @@
+multiarch-dpkg

Reply via email to