The following commit has been merged in the master branch:
commit 0e71d799565747423d01b7d32bbf1da78ba90237
Author: Guillem Jover <guil...@debian.org>
Date:   Tue Feb 22 07:44:48 2011 +0100

    dpkg: Add --assert-multi-arch option
    
    This will allow us to query if the currently installed dpkg has
    multi-arch support.

diff --git a/debian/changelog b/debian/changelog
index 6f0c794..f4a6669 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -72,6 +72,8 @@ dpkg (1.16.2) UNRELEASED; urgency=low
   * Always ignore older versions when parsing the available file, not only
     for --update-avail and --merge-avail.
   * Mark not-installed non-arch-qualified selections for removal.
+  * Add new «dpkg --assert-multi-arch» command to allow checking for
+    multi-arch support availability.
 
   [ Raphaël Hertzog ]
   * Update Dpkg::Shlibs to look into multiarch paths when cross-building
diff --git a/src/enquiry.c b/src/enquiry.c
index 914f898..be84f20 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -377,6 +377,14 @@ assertmulticonrep(const char *const *argv)
                                 _("multiple Conflicts and Replaces"));
 }
 
+int
+assertmultiarch(const char *const *argv)
+{
+  struct versionrevision version = { 0, "1.16.2", NULL };
+
+  return assert_version_support(argv, &version, _("multi-arch"));
+}
+
 /**
  * Print a single package which:
  *  (a) is the target of one or more relevant predependencies.
diff --git a/src/main.c b/src/main.c
index a2eb788..62a3455 100644
--- a/src/main.c
+++ b/src/main.c
@@ -126,7 +126,8 @@ usage(const struct cmdinfo *ci, const char *value)
 
   printf(_(
 "For internal use: dpkg --assert-support-predepends | --predep-package |\n"
-"  --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep.\n"
+"  --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep 
|\n"
+"  --assert-multi-arch.\n"
 "\n"));
 
   printf(_(
@@ -634,6 +635,7 @@ static const struct cmdinfo cmdinfos[]= {
   ACTION( "assert-working-epoch",            0,  act_assertepoch,          
assertepoch     ),
   ACTION( "assert-long-filenames",           0,  act_assertlongfilenames,  
assertlongfilenames ),
   ACTION( "assert-multi-conrep",             0,  act_assertmulticonrep,    
assertmulticonrep ),
+  ACTION( "assert-multi-arch",               0,  act_assertmultiarch,      
assertmultiarch ),
   ACTION( "add-architecture",                0,  act_arch_add,             
arch_add        ),
   ACTION( "remove-architecture",             0,  act_arch_remove,          
arch_remove     ),
   ACTION( "print-architecture",              0,  act_printarch,            
printarch   ),
diff --git a/src/main.h b/src/main.h
index afaea45..8437873 100644
--- a/src/main.h
+++ b/src/main.h
@@ -88,6 +88,7 @@ enum action {
        act_assertepoch,
        act_assertlongfilenames,
        act_assertmulticonrep,
+       act_assertmultiarch,
 
        act_audit,
        act_unpackchk,
@@ -169,6 +170,7 @@ int assertepoch(const char *const *argv);
 int assertpredep(const char *const *argv);
 int assertlongfilenames(const char *const *argv);
 int assertmulticonrep(const char *const *argv);
+int assertmultiarch(const char *const *argv);
 int predeppackage(const char *const *argv);
 int printarch(const char *const *argv);
 int printinstarch(const char *const *argv);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to