diff options
author | Michael Vogt <mvo@debian.org> | 2013-11-28 20:04:14 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-11-28 20:04:14 +0100 |
commit | 05f4e3b8441a3dc867ea7956736202a93b36e95b (patch) | |
tree | b8c117fd2c139eed91ce86fc785064a16e5908dd | |
parent | 17ab57f41a249fabb15cdbeeff5a5c0942ccf4ac (diff) | |
parent | f832a745920c988188c64ba018d1e2b436627ad5 (diff) |
Merge branch 'debian/sid' into ubuntu/master
Conflicts:
debian/changelog
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 26 | ||||
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 1 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 2 | ||||
-rw-r--r-- | apt-private/private-cmndline.cc | 5 | ||||
-rw-r--r-- | apt-private/private-list.cc | 4 | ||||
-rw-r--r-- | apt-private/private-output.cc | 12 | ||||
-rw-r--r-- | apt-private/private-output.h | 3 | ||||
-rw-r--r-- | debian/changelog | 34 |
8 files changed, 73 insertions, 14 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index d2be276c7..3a6bdfe2e 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -760,16 +760,13 @@ bool WaitFd(int Fd,bool write,unsigned long timeout) return true; } /*}}}*/ -// ExecFork - Magical fork that sanitizes the context before execing /*{{{*/ +// MergeKeepFdsFromConfiguration - Merge APT::Keep-Fds configuration /*{{{*/ // --------------------------------------------------------------------- -/* This is used if you want to cleanse the environment for the forked - child, it fixes up the important signals and nukes all of the fds, - otherwise acts like normal fork. */ -pid_t ExecFork() +/* This is used to merge the APT::Keep-Fds with the provided KeepFDs + * set. + */ +void MergeKeepFdsFromConfiguration(std::set<int> &KeepFDs) { - set<int> KeepFDs; - - // FIXME: remove looking at APT::Keep-Fds eventually, its a hack Configuration::Item const *Opts = _config->Tree("APT::Keep-Fds"); if (Opts != 0 && Opts->Child != 0) { @@ -782,6 +779,19 @@ pid_t ExecFork() KeepFDs.insert(fd); } } +} + /*}}}*/ +// ExecFork - Magical fork that sanitizes the context before execing /*{{{*/ +// --------------------------------------------------------------------- +/* This is used if you want to cleanse the environment for the forked + child, it fixes up the important signals and nukes all of the fds, + otherwise acts like normal fork. */ +pid_t ExecFork() +{ + set<int> KeepFDs; + // we need to merge the Keep-Fds as external tools like + // debconf-apt-progress use it + MergeKeepFdsFromConfiguration(KeepFDs); return ExecFork(KeepFDs); } diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 63a999c30..e9a9aab28 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -184,6 +184,7 @@ void SetNonBlock(int Fd,bool Block); bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0); pid_t ExecFork(); pid_t ExecFork(std::set<int> keep_fds); +void MergeKeepFdsFromConfiguration(std::set<int> &keep_fds); bool ExecWait(pid_t Pid,const char *Name,bool Reap = false); // File string manipulators diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 1a8790f29..8ab0c74c6 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -416,6 +416,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) // Create the pipes std::set<int> KeepFDs; + MergeKeepFdsFromConfiguration(KeepFDs); int Pipes[2]; if (pipe(Pipes) != 0) return _error->Errno("pipe","Failed to create IPC pipe to subprocess"); @@ -1379,6 +1380,7 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress) d->progress->StartDpkg(); std::set<int> KeepFDs; KeepFDs.insert(fd[1]); + MergeKeepFdsFromConfiguration(KeepFDs); pid_t Child = ExecFork(KeepFDs); if (Child == 0) { diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 8ba6629a8..f4348c979 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -149,7 +149,11 @@ bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const * const else if (CmdMatches("build-dep")) { addArg('a', "host-architecture", "APT::Get::Host-Architecture", CommandLine::HasArg); + addArg(0, "purge", "APT::Get::Purge", 0); addArg(0, "solver", "APT::Solver", CommandLine::HasArg); + // this has no effect *but* sbuild is using it (see LP: #1255806) + // once sbuild is fixed, this option can be removed + addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0); } else if (CmdMatches("clean", "autoclean", "check", "download", "changelog") || CmdMatches("markauto", "unmarkauto")) // deprecated commands @@ -223,6 +227,7 @@ bool addArgumentsAPT(std::vector<CommandLine::Args> &Args, char const * const Cm addArg(0,"installed","APT::Cmd::Installed",0); addArg(0,"upgradable","APT::Cmd::Upgradable",0); addArg('a', "all-versions", "APT::Cmd::AllVersions", 0); + addArg('v', "verbose", "APT::Cmd::List-Include-Summary", 0); } else if (addArgumentsAPTGet(Args, Cmd) || addArgumentsAPTCache(Args, Cmd)) { diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index 8c61fcae8..08851eb7e 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -132,6 +132,8 @@ bool List(CommandLine &Cmd) std::map<std::string, std::string> output_map; std::map<std::string, std::string>::const_iterator K; + bool includeSummary = _config->FindB("APT::Cmd::List-Include-Summary"); + PackageNameMatcher matcher(patterns); LocalitySortedVersionSet bag; OpTextProgress progress; @@ -149,7 +151,7 @@ bool List(CommandLine &Cmd) output_map.insert(std::make_pair<std::string, std::string>( V.ParentPkg().Name(), outs.str())); } else { - ListSingleVersion(CacheFile, records, V, outs); + ListSingleVersion(CacheFile, records, V, outs, includeSummary); output_map.insert(std::make_pair<std::string, std::string>( V.ParentPkg().Name(), outs.str())); } diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc index 6fadf7274..91d13f31b 100644 --- a/apt-private/private-output.cc +++ b/apt-private/private-output.cc @@ -158,7 +158,8 @@ std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pk } /*}}}*/ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ - pkgCache::VerIterator V, std::ostream &out) + pkgCache::VerIterator V, std::ostream &out, + bool include_summary) { pkgCache::PkgIterator P = V.ParentPkg(); @@ -224,9 +225,12 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ out << GetVersion(CacheFile, V); } out << " " << GetArchitecture(CacheFile, P) << " "; - out << std::endl - << " " << GetShortDescription(CacheFile, records, P) - << std::endl; + if (include_summary) + { + out << std::endl + << " " << GetShortDescription(CacheFile, records, P) + << std::endl; + } } } /*}}}*/ diff --git a/apt-private/private-output.h b/apt-private/private-output.h index 9283e39ab..c3c76bb92 100644 --- a/apt-private/private-output.h +++ b/apt-private/private-output.h @@ -24,7 +24,8 @@ extern unsigned int ScreenWidth; bool InitOutput(); void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, - pkgCache::VerIterator V, std::ostream &out); + pkgCache::VerIterator V, std::ostream &out, + bool include_summary=true); diff --git a/debian/changelog b/debian/changelog index 6dece999f..9e6f4c6c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,37 @@ +apt (0.9.13.1) unstable; urgency=low + + [ Colin Watson ] + * fix "apt-get --purge build-dep" (closes: #720597) + * fix regression that APT::Keep-Fds is not honored (closes: #730490) + + [ Michael Vogt ] + * add "-f" option to "build-dep" as sbuild is using it to fix + regression with cross-building (LP: #1255806) + * merge mvo/feature/short-list + + -- Michael Vogt <mvo@debian.org> Thu, 28 Nov 2013 20:02:39 +0100 + +apt (0.9.13) unstable; urgency=low + + [ TJ Guthrie ] + * Changed MinAgeSec to MinAge in /etc/cron.daily/apt:200,204 + LP: #1206047 + + -- Michael Vogt <mvo@debian.org> Sun, 24 Nov 2013 10:56:22 +0100 + +apt (0.9.13~exp1ubuntu3) trusty; urgency=low + + * Fix "apt-get --purge build-dep" (closes: #720597). + + -- Colin Watson <cjwatson@ubuntu.com> Tue, 26 Nov 2013 15:40:02 +0000 + +apt (0.9.13~exp1ubuntu2) trusty; urgency=low + + * Fix two subprocess calls to continue to honour APT::Keep-Fds + (LP: #1254696). + + -- Colin Watson <cjwatson@ubuntu.com> Mon, 25 Nov 2013 16:49:25 +0000 + apt (0.9.13~exp1ubuntu1) trusty; urgency=low * merged from the debian/sid branch: |