deblistparser.cc   deblistparser.cc 
skipping to change at line 464 skipping to change at line 464
break; break;
} }
return I; return I;
} }
/* /*
* CompleteArch: * CompleteArch:
* *
* The complete architecture, consisting of <kernel>-<cpu>. * The complete architecture, consisting of <kernel>-<cpu>.
*/ */
static string CompleteArch(std::string& arch) { static string CompleteArch(std::string const &arch) {
if (arch == "armel") return "linux-arm"; if (arch == "armel") return "linux-arm";
if (arch == "armhf") return "linux-arm"; if (arch == "armhf") return "linux-arm";
if (arch == "lpia") return "linux-i386"; if (arch == "lpia") return "linux-i386";
if (arch == "powerpcspe") return "linux-powerpc"; if (arch == "powerpcspe") return "linux-powerpc";
if (arch == "uclibc-linux-armel") return "linux-arm"; if (arch == "uclibc-linux-armel") return "linux-arm";
if (arch == "uclinux-armel") return "uclinux-arm"; if (arch == "uclinux-armel") return "uclinux-arm";
return (arch.find("-") != string::npos) ? arch : "linux-" + arch; return (arch.find("-") != string::npos) ? arch : "linux-" + arch;
} }
/*}} }*/ /*}} }*/
skipping to change at line 503 skipping to change at line 503
if (I != Stop && *I == ')') if (I != Stop && *I == ')')
return 0; return 0;
if (I == Start) if (I == Start)
return 0; return 0;
// Stash the package name // Stash the package name
Package.assign(Start,I - Start); Package.assign(Start,I - Start);
// We don't want to confuse library users which can't handle MultiArch // We don't want to confuse library users which can't handle MultiArch
string const arch = _config->Find("APT::Architecture");
if (StripMultiArch == true) { if (StripMultiArch == true) {
size_t const found = Package.rfind(':'); size_t const found = Package.rfind(':');
if (found != string::npos) if (found != string::npos &&
(strcmp(Package.c_str() + found, ":any") == 0 ||
strcmp(Package.c_str() + found, ":native") == 0 ||
strcmp(Package.c_str() + found + 1, arch.c_str()) == 0))
Package = Package.substr(0,found); Package = Package.substr(0,found);
} }
// Skip white space to the '(' // Skip white space to the '('
for (;I != Stop && isspace(*I) != 0 ; I++); for (;I != Stop && isspace(*I) != 0 ; I++);
// Parse a version // Parse a version
if (I != Stop && *I == '(') if (I != Stop && *I == '(')
{ {
// Skip the '(' // Skip the '('
skipping to change at line 546 skipping to change at line 550
{ {
Ver.clear(); Ver.clear();
Op = pkgCache::Dep::NoOp; Op = pkgCache::Dep::NoOp;
} }
// Skip whitespace // Skip whitespace
for (;I != Stop && isspace(*I) != 0; I++); for (;I != Stop && isspace(*I) != 0; I++);
if (ParseArchFlags == true) if (ParseArchFlags == true)
{ {
string arch = _config->Find("APT::Architecture");
string completeArch = CompleteArch(arch); string completeArch = CompleteArch(arch);
// Parse an architecture // Parse an architecture
if (I != Stop && *I == '[') if (I != Stop && *I == '[')
{ {
// malformed // malformed
I++; I++;
if (I == Stop) if (I == Stop)
return 0; return 0;
 End of changes. 4 change blocks. 
3 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/