diff options
author | Julian Andres Klode <jak@debian.org> | 2010-06-26 20:56:44 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2010-06-26 20:56:44 +0200 |
commit | d4af23c2d81116b8f7557ee795059bca126ae9f4 (patch) | |
tree | 7c36602dbdb8dbee92964d5e74af5dd34117cc0a /apt-pkg/deb | |
parent | 330463dd2374bd11757c6f2662f279fc31f035a0 (diff) | |
download | apt-d4af23c2d81116b8f7557ee795059bca126ae9f4.tar.gz |
* apt-pkg/deb/deblistparser.cc:
- Handle architecture wildcards (Closes: #547724).
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 83c5b8d2..ddbd0d31 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/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; |