From e838ca08d2b2311931b2e41699fdaba5ec04b28c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 23 Nov 2013 09:16:24 +0100 Subject: Changed MinAgeSec to MinAge in /etc/cron.daily/apt:200,204 LP: #1206047 --- debian/apt.cron.daily | 4 ++-- debian/changelog | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 3f9df9d7e..2616af1dd 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -197,11 +197,11 @@ check_size_constraints() delta=$(($now-$ctime)) fi if [ $delta -le $MinAge ]; then - debug_echo "skip remove by archive size: $file, delta=$delta < $MinAgeSec" + debug_echo "skip remove by archive size: $file, delta=$delta < $MinAge" break else # delete oldest file - debug_echo "remove by archive size: $file, delta=$delta >= $MinAgeSec (sec), size=$size >= $MaxSize" + debug_echo "remove by archive size: $file, delta=$delta >= $MinAge (sec), size=$size >= $MaxSize" rm -f $file fi fi diff --git a/debian/changelog b/debian/changelog index e6bdcb1fa..ab5609278 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.9.13) UNRELEASED; urgency=low + + [ TJ Guthrie ] + * Changed MinAgeSec to MinAge in /etc/cron.daily/apt:200,204 + LP: #1206047 + + -- Michael Vogt Sat, 23 Nov 2013 09:16:01 +0100 + apt (0.9.13~exp1) experimental; urgency=low * Improve the API for APT::Upgrade::Upgrade() -- cgit v1.2.3 From ef102a0639ac994a5dc909a8ef40a826f7ebc056 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 23 Nov 2013 09:36:50 +0100 Subject: upload 0.9.13 to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ab5609278..ebcc7399d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -apt (0.9.13) UNRELEASED; urgency=low +apt (0.9.13) unstable; urgency=low [ TJ Guthrie ] * Changed MinAgeSec to MinAge in /etc/cron.daily/apt:200,204 LP: #1206047 - -- Michael Vogt Sat, 23 Nov 2013 09:16:01 +0100 + -- Michael Vogt Sun, 24 Nov 2013 10:56:22 +0100 apt (0.9.13~exp1) experimental; urgency=low -- cgit v1.2.3 From 500347df3c544b1633215477d485d43103732743 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 25 Nov 2013 16:35:02 +0100 Subject: do not show summary in "apt list" --- apt-private/private-list.cc | 2 +- apt-private/private-output.cc | 12 ++++++++---- apt-private/private-output.h | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index 8c61fcae8..6993cd797 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -149,7 +149,7 @@ bool List(CommandLine &Cmd) output_map.insert(std::make_pair( V.ParentPkg().Name(), outs.str())); } else { - ListSingleVersion(CacheFile, records, V, outs); + ListSingleVersion(CacheFile, records, V, outs, false); output_map.insert(std::make_pair( 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); -- cgit v1.2.3 From e1dc051a11c2860abebf626df0470a5feb03677a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 26 Nov 2013 08:17:29 +0100 Subject: add APT::Cmd::List-Include-Summary --- apt-private/private-cmndline.cc | 1 + apt-private/private-list.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 8ba6629a8..b73227924 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -223,6 +223,7 @@ bool addArgumentsAPT(std::vector &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 6993cd797..08851eb7e 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -132,6 +132,8 @@ bool List(CommandLine &Cmd) std::map output_map; std::map::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( V.ParentPkg().Name(), outs.str())); } else { - ListSingleVersion(CacheFile, records, V, outs, false); + ListSingleVersion(CacheFile, records, V, outs, includeSummary); output_map.insert(std::make_pair( V.ParentPkg().Name(), outs.str())); } -- cgit v1.2.3 From e4e5d47b0e66ae7bedafbdbb685114c404381204 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Nov 2013 16:50:20 +0100 Subject: fix "apt-get --purge build-dep" (closes: #720597) --- apt-private/private-cmndline.cc | 1 + debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 8ba6629a8..b6f257bcb 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -149,6 +149,7 @@ bool addArgumentsAPTGet(std::vector &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); } else if (CmdMatches("clean", "autoclean", "check", "download", "changelog") || diff --git a/debian/changelog b/debian/changelog index ebcc7399d..7447628db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.9.13.1) unstable; urgency=low + + [ Colin Watson ] + * fix "apt-get --purge build-dep" (closes: #720597) + + -- Michael Vogt Thu, 28 Nov 2013 16:49:31 +0100 + apt (0.9.13) unstable; urgency=low [ TJ Guthrie ] -- cgit v1.2.3 From 96ae6de5d3d5ae31100079c78fffc5ebc4a0b81c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Nov 2013 17:08:53 +0100 Subject: fix regression that APT::Keep-Fds is not honored (closes: #730490) --- apt-pkg/contrib/fileutl.cc | 26 ++++++++++++++++++-------- apt-pkg/contrib/fileutl.h | 1 + apt-pkg/deb/dpkgpm.cc | 2 ++ debian/changelog | 3 ++- 4 files changed, 23 insertions(+), 9 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 &KeepFDs) { - set 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 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 keep_fds); +void MergeKeepFdsFromConfiguration(std::set &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 26d79dbb1..01c6242dc 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -417,6 +417,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf) // Create the pipes std::set KeepFDs; + MergeKeepFdsFromConfiguration(KeepFDs); int Pipes[2]; if (pipe(Pipes) != 0) return _error->Errno("pipe","Failed to create IPC pipe to subprocess"); @@ -1380,6 +1381,7 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress) d->progress->StartDpkg(); std::set KeepFDs; KeepFDs.insert(fd[1]); + MergeKeepFdsFromConfiguration(KeepFDs); pid_t Child = ExecFork(KeepFDs); if (Child == 0) { diff --git a/debian/changelog b/debian/changelog index 7447628db..92b9635dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ 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 Thu, 28 Nov 2013 16:49:31 +0100 + -- Michael Vogt Thu, 28 Nov 2013 16:49:31 +0100 apt (0.9.13) unstable; urgency=low -- cgit v1.2.3 From c872ac503156caff9d0e33306c4121dd667a6567 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Nov 2013 19:45:44 +0100 Subject: add "-f" option to "build-dep" as sbuild is using it to fix regression with cross-building (LP: #1255806) --- apt-private/private-cmndline.cc | 3 +++ debian/changelog | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index b6f257bcb..718a7ce6a 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -151,6 +151,9 @@ bool addArgumentsAPTGet(std::vector &Args, char const * const 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 diff --git a/debian/changelog b/debian/changelog index 92b9635dd..ca6bb4406 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ -apt (0.9.13.1) unstable; urgency=low +apt (0.9.13.1) UNRELEASED; 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) -- Michael Vogt Thu, 28 Nov 2013 16:49:31 +0100 -- cgit v1.2.3 From f832a745920c988188c64ba018d1e2b436627ad5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Nov 2013 20:02:51 +0100 Subject: update changelog --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ca6bb4406..8359438d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.9.13.1) UNRELEASED; urgency=low +apt (0.9.13.1) unstable; urgency=low [ Colin Watson ] * fix "apt-get --purge build-dep" (closes: #720597) @@ -7,8 +7,9 @@ apt (0.9.13.1) UNRELEASED; urgency=low [ 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 Thu, 28 Nov 2013 16:49:31 +0100 + -- Michael Vogt Thu, 28 Nov 2013 20:02:39 +0100 apt (0.9.13) unstable; urgency=low -- cgit v1.2.3