- // we need to detect if we can qualify packages with the architecture or not
- Args.push_back("--assert-multi-arch");
- Args.push_back(NULL);
-
- pid_t dpkgAssertMultiArch = ExecFork();
- if (dpkgAssertMultiArch == 0)
- {
- dpkgChrootDirectory();
- // 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);
- execvp(Args[0], (char**) &Args[0]);
- _error->WarningE("dpkgGo", "Can't detect if dpkg supports multi-arch!");
- _exit(2);
- }