From 25613a61f6f3b9e54d5229af7e2278d0fa54bdd9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 26 Sep 2014 22:16:26 +0200 Subject: fix: Member variable 'X' is not initialized in the constructor. Reported-By: cppcheck Git-Dch: Ignore --- apt-pkg/acquire.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/acquire.h') diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index 0113021b2..a92ecc24c 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -585,7 +585,7 @@ class pkgAcquire::UriIterator * * \param Q The queue over which this UriIterator should iterate. */ - UriIterator(pkgAcquire::Queue *Q) : CurQ(Q), CurItem(0) + UriIterator(pkgAcquire::Queue *Q) : d(NULL), CurQ(Q), CurItem(0) { while (CurItem == 0 && CurQ != 0) { -- cgit v1.2.3 From 43acd01979039b248cb7f033b82e36d778d0ebec Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 27 Sep 2014 19:45:30 +0200 Subject: allow fetcher setup without directory creation apt-get download and changelog as well as apt-helper reuse the acquire system for their own proposes without requiring the directories the fetcher wants to create, which is a problem if you run them as non-root and the directories do not exist as it greets you with: E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (13: Permission denied) Closes: 762898 --- apt-pkg/acquire.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg/acquire.h') diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index a92ecc24c..7bceb4323 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -352,8 +352,11 @@ class pkgAcquire * \param Lock defines a lock file that should be acquired to ensure * only one Acquire class is in action at the time or an empty string * if no lock file should be used. + * \param createDirectories can be used to disable the creation of directories, + * e.g. if the fetcher is used with different directories later on */ - bool Setup(pkgAcquireStatus *Progress = NULL, std::string const &Lock = ""); + bool Setup(pkgAcquireStatus *Progress = NULL, std::string const &Lock = "", + bool const createDirectories = true); void SetLog(pkgAcquireStatus *Progress) { Log = Progress; } -- cgit v1.2.3