]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
merged from lp:~donkult/apt/sid
[apt.git] / apt-pkg / deb / dpkgpm.cc
index ae9143e0d842e26c930b34bc3a4c45d3dd4a8fed..6cb8bc6b61d465d90ac66d079faa5cf2fe621e65 100644 (file)
@@ -726,7 +726,7 @@ bool pkgDPkgPM::OpenLog()
       gr = getgrnam("adm");
       if (pw != NULL && gr != NULL)
          chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid);
-      chmod(logfile_name.c_str(), 0644);
+      chmod(logfile_name.c_str(), 0640);
       fprintf(d->term_out, "\nLog started: %s\n", timestr);
    }
 
@@ -1131,7 +1131,9 @@ bool pkgDPkgPM::Go(int OutStatusFd)
            if (I->Op == Item::Configure && disappearedPkgs.find(I->Pkg.Name()) != disappearedPkgs.end())
               continue;
            // We keep this here to allow "smooth" transitions from e.g. multiarch dpkg/ubuntu to dpkg/debian
-           if (dpkgMultiArch == false && (I->Pkg.Arch() == nativeArch || !strcmp(I->Pkg.Arch(), "all")))
+           if (dpkgMultiArch == false && (I->Pkg.Arch() == nativeArch ||
+                                          strcmp(I->Pkg.Arch(), "all") == 0 ||
+                                          strcmp(I->Pkg.Arch(), "none") == 0))
            {
               char const * const name = I->Pkg.Name();
               ADDARG(name);
@@ -1148,7 +1150,9 @@ bool pkgDPkgPM::Go(int OutStatusFd)
                }
               else
                  PkgVer = Cache[I->Pkg].InstVerIter(Cache);
-               if (PkgVer.end() == false)
+              if (strcmp(I->Pkg.Arch(), "none") == 0)
+                 ; // never arch-qualify a package without an arch
+              else if (PkgVer.end() == false)
                   name.append(":").append(PkgVer.Arch());
                else
                   _error->Warning("Can not find PkgVer for '%s'", name.c_str());