From 10ecfe4f8a617ab285abd99d67917ae332ed2e4a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Jul 2014 11:27:01 +0200 Subject: Do not clean "/" in pkgAcquire::Clean/pkgArchiveCleaner Having "/" here is most likely a user configuration error and may cause removal of import symlinks like /vmlinuz Closes: #753531 --- apt-pkg/clean.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg/clean.cc') diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 0ee3b765d..37128e9aa 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -34,7 +34,10 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache) { bool CleanInstalled = _config->FindB("APT::Clean-Installed",true); - + + if(Dir == "/") + return _error->Error(_("Clean of %s is not supported"), Dir.c_str()); + DIR *D = opendir(Dir.c_str()); if (D == 0) return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); -- cgit v1.2.3 From 862bafea48af2ceaf96345db237b461307a021f6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 13 Oct 2014 08:05:57 +0200 Subject: do not inline virtual destructors with d-pointers Reimplementing an inline method is opening a can of worms we don't want to open if we ever want to us a d-pointer in those classes, so we do the only thing which can save us from hell: move the destructors into the cc sources and we are good. Technically not an ABI break as the methods inline or not do the same (nothing), so a program compiled against the old version still works with the new version (beside that this version is still in experimental, so nothing really has been build against this library anyway). Git-Dch: Ignore --- apt-pkg/clean.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/clean.cc') diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 37128e9aa..606f4ec8c 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -131,3 +131,5 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache) return true; } /*}}}*/ + +pkgArchiveCleaner::~pkgArchiveCleaner() {} -- cgit v1.2.3 From 9d653a6de2ca952247cc4e628256259d225570a6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 13 Oct 2014 09:54:21 +0200 Subject: fix compile and tests error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I am pretty sure I did that before committing broken stuff… Git-Dch: Ignore --- apt-pkg/clean.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/clean.cc') diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 606f4ec8c..6edce5b6d 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -132,4 +132,4 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache) } /*}}}*/ -pkgArchiveCleaner::~pkgArchiveCleaner() {} +APT_CONST pkgArchiveCleaner::~pkgArchiveCleaner() {} -- cgit v1.2.3