ソースを参照

* apt-pkg/deb/deblistparser.cc:
- Handle architecture wildcards (Closes: #547724).

Julian Andres Klode 16 年 前
コミット
d4af23c2d8
共有2 個のファイルを変更した11 個の追加1 個の削除を含む
  1. 9 1
      apt-pkg/deb/deblistparser.cc
  2. 2 0
      debian/changelog

+ 9 - 1
apt-pkg/deb/deblistparser.cc

@@ -19,6 +19,7 @@
 #include <apt-pkg/md5.h>
 #include <apt-pkg/macros.h>
 
+#include <fnmatch.h>
 #include <ctype.h>
 									/*}}}*/
 
@@ -572,8 +573,15 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
 	       I++;
             }
 
-	    if (stringcmp(arch,I,End) == 0)
+	    if (stringcmp(arch,I,End) == 0) {
 	       Found = true;
+	    } else {
+	       std::string wildcard = SubstVar(string(I, End), "any", "*");
+	       if (fnmatch(wildcard.c_str(), arch.c_str(), 0) == 0)
+	          Found = true;
+	       else if (fnmatch(wildcard.c_str(), ("linux-" + arch).c_str(), 0) == 0)
+	          Found = true;
+	    }
 	    
 	    if (*End++ == ']') {
 	       I = End;

+ 2 - 0
debian/changelog

@@ -2,6 +2,8 @@ apt (0.7.26~exp8) experimental; urgency=low
 
   * methods/ftp.h:
     - Handle different logins are on the same server (Closes: #586904).
+  * apt-pkg/deb/deblistparser.cc:
+    - Handle architecture wildcards (Closes: #547724).
 
  -- Julian Andres Klode <jak@debian.org>  Thu, 24 Jun 2010 10:56:39 +0200