The following commit has been merged in the master branch:
commit 1c30f9bbbdb7abd08910213e480491d6cbdc8bf8
Author: Guillem Jover <[email protected]>
Date:   Tue Nov 1 04:50:34 2011 +0100

    libdpkg: Add new varbuf_add_archqual()

diff --git a/lib/dpkg/arch.c b/lib/dpkg/arch.c
index cbb9bab..669f15c 100644
--- a/lib/dpkg/arch.c
+++ b/lib/dpkg/arch.c
@@ -29,6 +29,7 @@
 #include <dpkg/i18n.h>
 #include <dpkg/ehandle.h>
 #include <dpkg/dpkg-db.h>
+#include <dpkg/varbuf.h>
 #include <dpkg/arch.h>
 
 /**
@@ -172,3 +173,13 @@ dpkg_arch_reset_list(void)
 {
        arch_item_any.next = NULL;
 }
+
+void
+varbuf_add_archqual(struct varbuf *vb, const struct dpkg_arch *arch)
+{
+       if (arch->type == arch_none)
+               return;
+
+       varbuf_add_char(vb, ':');
+       varbuf_add_str(vb, arch->name);
+}
diff --git a/lib/dpkg/arch.h b/lib/dpkg/arch.h
index e3ca20b..9d5fa7e 100644
--- a/lib/dpkg/arch.h
+++ b/lib/dpkg/arch.h
@@ -23,6 +23,7 @@
 #define LIBDPKG_ARCH_H
 
 #include <dpkg/macros.h>
+#include <dpkg/varbuf.h>
 
 DPKG_BEGIN_DECLS
 
@@ -46,6 +47,8 @@ struct dpkg_arch *dpkg_arch_get_native(void);
 struct dpkg_arch *dpkg_arch_get_list(void);
 void dpkg_arch_reset_list(void);
 
+void varbuf_add_archqual(struct varbuf *vb, const struct dpkg_arch *arch);
+
 DPKG_END_DECLS
 
 #endif /* LIBDPKG_ARCH_H */

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to