Просмотр исходного кода

no value for MultiArch field is 'no', not 'none'

Git-Dch: Ignore
David Kalnischkies лет назад: 11
Родитель
Сommit
22df31be37

+ 3 - 3
apt-pkg/deb/deblistparser.cc

@@ -95,14 +95,14 @@ unsigned char debListParser::ParseMultiArch(bool const showErrors)	/*{{{*/
    unsigned char MA;
    unsigned char MA;
    string const MultiArch = Section.FindS("Multi-Arch");
    string const MultiArch = Section.FindS("Multi-Arch");
    if (MultiArch.empty() == true || MultiArch == "no")
    if (MultiArch.empty() == true || MultiArch == "no")
-      MA = pkgCache::Version::None;
+      MA = pkgCache::Version::No;
    else if (MultiArch == "same") {
    else if (MultiArch == "same") {
       if (ArchitectureAll() == true)
       if (ArchitectureAll() == true)
       {
       {
 	 if (showErrors == true)
 	 if (showErrors == true)
 	    _error->Warning("Architecture: all package '%s' can't be Multi-Arch: same",
 	    _error->Warning("Architecture: all package '%s' can't be Multi-Arch: same",
 		  Section.FindS("Package").c_str());
 		  Section.FindS("Package").c_str());
-	 MA = pkgCache::Version::None;
+	 MA = pkgCache::Version::No;
       }
       }
       else
       else
 	 MA = pkgCache::Version::Same;
 	 MA = pkgCache::Version::Same;
@@ -116,7 +116,7 @@ unsigned char debListParser::ParseMultiArch(bool const showErrors)	/*{{{*/
       if (showErrors == true)
       if (showErrors == true)
 	 _error->Warning("Unknown Multi-Arch type '%s' for package '%s'",
 	 _error->Warning("Unknown Multi-Arch type '%s' for package '%s'",
 	       MultiArch.c_str(), Section.FindS("Package").c_str());
 	       MultiArch.c_str(), Section.FindS("Package").c_str());
-      MA = pkgCache::Version::None;
+      MA = pkgCache::Version::No;
    }
    }
 
 
    if (ArchitectureAll() == true)
    if (ArchitectureAll() == true)

+ 1 - 1
apt-pkg/pkgcache.h

@@ -599,7 +599,7 @@ struct pkgCache::Version
    map_stringitem_t SourceVerStr;
    map_stringitem_t SourceVerStr;
 
 
    /** \brief Multi-Arch capabilities of a package version */
    /** \brief Multi-Arch capabilities of a package version */
-   enum VerMultiArch { None = 0, /*!< is the default and doesn't trigger special behaviour */
+   enum VerMultiArch { No = 0, /*!< is the default and doesn't trigger special behaviour */
 		       All = (1<<0), /*!< will cause that Ver.Arch() will report "all" */
 		       All = (1<<0), /*!< will cause that Ver.Arch() will report "all" */
 		       Foreign = (1<<1), /*!< can satisfy dependencies in another architecture */
 		       Foreign = (1<<1), /*!< can satisfy dependencies in another architecture */
 		       Same = (1<<2), /*!< can be co-installed with itself from other architectures */
 		       Same = (1<<2), /*!< can be co-installed with itself from other architectures */

+ 2 - 2
cmdline/apt-get.cc

@@ -1172,12 +1172,12 @@ static bool DoBuildDep(CommandLine &CmdL)
 	       for (; Ver != verlist.end(); ++Ver)
 	       for (; Ver != verlist.end(); ++Ver)
 	       {
 	       {
 		  forbidden.clear();
 		  forbidden.clear();
-		  if (Ver->MultiArch == pkgCache::Version::None || Ver->MultiArch == pkgCache::Version::All)
+		  if (Ver->MultiArch == pkgCache::Version::No || Ver->MultiArch == pkgCache::Version::All)
 		  {
 		  {
 		     if (colon == string::npos)
 		     if (colon == string::npos)
 			Pkg = Ver.ParentPkg().Group().FindPkg(hostArch);
 			Pkg = Ver.ParentPkg().Group().FindPkg(hostArch);
 		     else if (strcmp(D->Package.c_str() + colon, ":any") == 0)
 		     else if (strcmp(D->Package.c_str() + colon, ":any") == 0)
-			forbidden = "Multi-Arch: none";
+			forbidden = "Multi-Arch: no";
 		     else if (strcmp(D->Package.c_str() + colon, ":native") == 0)
 		     else if (strcmp(D->Package.c_str() + colon, ":native") == 0)
 			Pkg = Ver.ParentPkg().Group().FindPkg("native");
 			Pkg = Ver.ParentPkg().Group().FindPkg("native");
 		  }
 		  }

+ 2 - 2
test/integration/test-bug-632221-cross-dependency-satisfaction

@@ -23,7 +23,7 @@ insertpackage 'unstable' 'linux-stuff' 'amd64,armel' '1.0'
 
 
 insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev, arm-stuff [any-armel] | linux-stuff [ linux-any]'
 insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev, arm-stuff [any-armel] | linux-stuff [ linux-any]'
 
 
-insertsource 'unstable' 'forbidden-none' 'any' '1' 'Build-Depends: amdboot:any'
+insertsource 'unstable' 'forbidden-no' 'any' '1' 'Build-Depends: amdboot:any'
 insertsource 'unstable' 'forbidden-same' 'any' '1' 'Build-Depends: libc6:any'
 insertsource 'unstable' 'forbidden-same' 'any' '1' 'Build-Depends: libc6:any'
 insertsource 'unstable' 'forbidden-foreign' 'any' '1' 'Build-Depends: doxygen:any'
 insertsource 'unstable' 'forbidden-foreign' 'any' '1' 'Build-Depends: doxygen:any'
 
 
@@ -37,7 +37,7 @@ setupaptarchive
 
 
 testfailureequal "Reading package lists...
 testfailureequal "Reading package lists...
 Building dependency tree...
 Building dependency tree...
-E: Build-Depends dependency for forbidden-none can't be satisfied because amdboot:any is not allowed on 'Multi-Arch: none' packages" aptget build-dep forbidden-none -s -a armel
+E: Build-Depends dependency for forbidden-no can't be satisfied because amdboot:any is not allowed on 'Multi-Arch: no' packages" aptget build-dep forbidden-no -s -a armel
 testfailureequal "Reading package lists...
 testfailureequal "Reading package lists...
 Building dependency tree...
 Building dependency tree...
 E: Build-Depends dependency for forbidden-same can't be satisfied because libc6:any is not allowed on 'Multi-Arch: same' packages" aptget build-dep forbidden-same -s -a armel
 E: Build-Depends dependency for forbidden-same can't be satisfied because libc6:any is not allowed on 'Multi-Arch: same' packages" aptget build-dep forbidden-same -s -a armel