summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-01-19 13:46:09 +0100
committerMichael Vogt <egon@debian-devbox>2012-01-19 13:46:09 +0100
commit4f8f5e3d8de21d578c6acd46896fcf62447a7cfd (patch)
tree44bc915f8c36e77dc9dce92a46094a1bac3cd0a7 /apt-pkg/deb/dpkgpm.cc
parent0d5603b886f67562c105b03820c595ac7ae3451a (diff)
parent3a5ec3053c00ff5db058f1ddd99bf23591b9a181 (diff)
* apt-pkg/deb/dpkgpm.cc:
- redirect out/input of dpkg --assert-multi-arch to /dev/null - if multi-arch is detected ensure that pkg:all is reported as pkg:all
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 4dc0baa50..6feada4cc 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -858,6 +858,11 @@ bool pkgDPkgPM::Go(int OutStatusFd)
pid_t dpkgAssertMultiArch = ExecFork();
if (dpkgAssertMultiArch == 0)
{
+ // redirect everything to the ultimate sink as we only need the exit-status
+ int const nullfd = open("/dev/null", O_RDONLY);
+ dup2(nullfd, STDIN_FILENO);
+ dup2(nullfd, STDOUT_FILENO);
+ dup2(nullfd, STDERR_FILENO);
execv(Args[0], (char**) &Args[0]);
_error->WarningE("dpkgGo", "Can't detect if dpkg supports multi-arch!");
_exit(2);
@@ -1085,7 +1090,10 @@ bool pkgDPkgPM::Go(int OutStatusFd)
}
else
{
- char * const fullname = strdup(I->Pkg.FullName(false).c_str());
+ std::string name = I->Pkg.Name();
+ pkgCache::VerIterator PkgVer = Cache[I->Pkg].InstVerIter(Cache);
+ name.append(":").append(PkgVer.Arch());
+ char * const fullname = strdup(name.c_str());
Packages.push_back(fullname);
ADDARG(fullname);
}