From 6fd4b4c0b693b52cb8b593b76e5b60f77e500454 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Feb 2016 22:54:49 +0100 Subject: always download changelogs into /tmp first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pkgAcqChangelog has the default behaviour of downloading a changelog to a temporary directory (inside /tmp, not /tmp directly), which is cleaned up on shutdown, but this can be overridden to store the changelog more permanently – but that caries a permission problem. For changelog we can 'easily' solve this by always downloading to a temporary directory and only move it out of there on done. --- apt-pkg/acquire.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/acquire.cc') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index e515255ae..17ee691d7 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -559,7 +559,7 @@ static void CheckDropPrivsMustBeDisabled(pkgAcquire const &Fetcher) I != Fetcher.ItemsEnd(); ++I) { // no need to drop privileges for a complete file - if ((*I)->Complete == true) + if ((*I)->Complete == true || (*I)->Status != pkgAcquire::Item::StatIdle) continue; // if destination file is inaccessible all hope is lost for privilege dropping -- cgit v1.2.3