summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc18
-rw-r--r--apt-pkg/acquire.cc8
-rw-r--r--apt-pkg/contrib/fileutl.cc4
-rw-r--r--apt-pkg/contrib/fileutl.h2
-rw-r--r--apt-pkg/deb/dpkgpm.cc2
-rw-r--r--apt-pkg/indexcopy.cc2
-rw-r--r--apt-pkg/init.cc3
-rw-r--r--apt-pkg/init.h2
8 files changed, 22 insertions, 19 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 752bc6a99..2c4ce91a0 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1060,12 +1060,6 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*
// all cool, move Release file into place
Complete = true;
-
- string FinalFile = _config->FindDir("Dir::State::lists");
- FinalFile += URItoFileName(RealURI);
- Rename(DestFile,FinalFile);
- chmod(FinalFile.c_str(),0644);
- DestFile = FinalFile;
}
else
{
@@ -1092,8 +1086,18 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*
Desc.URI = "gpgv:" + SigFile;
QueueURI(Desc);
Mode = "gpgv";
+ return;
}
}
+
+ if (Complete == true)
+ {
+ string FinalFile = _config->FindDir("Dir::State::lists");
+ FinalFile += URItoFileName(RealURI);
+ Rename(DestFile,FinalFile);
+ chmod(FinalFile.c_str(),0644);
+ DestFile = FinalFile;
+ }
}
/*}}}*/
void pkgAcqMetaIndex::RetrievalDone(string Message) /*{{{*/
@@ -1323,7 +1327,7 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Status = StatTransientNetworkError;
_error->Warning(_("A error occurred during the signature "
"verification. The repository is not updated "
- "and the previous index files will be used."
+ "and the previous index files will be used. "
"GPG error: %s: %s\n"),
Desc.Description.c_str(),
LookupTag(Message,"Message").c_str());
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 6ec557397..9478cdfb4 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -74,12 +74,12 @@ bool pkgAcquire::Setup(pkgAcquireStatus *Progress, string const &Lock)
string const archivesDir = _config->FindDir("Dir::Cache::Archives");
string const partialArchivesDir = archivesDir + "partial/";
- if (CheckDirectory(_config->FindDir("Dir::State"), partialListDir) == false &&
- CheckDirectory(listDir, partialListDir) == false)
+ if (CreateAPTDirectoryIfNeeded(_config->FindDir("Dir::State"), partialListDir) == false &&
+ CreateAPTDirectoryIfNeeded(listDir, partialListDir) == false)
return _error->Errno("Acquire", _("List directory %spartial is missing."), listDir.c_str());
- if (CheckDirectory(_config->FindDir("Dir::Cache"), partialArchivesDir) == false &&
- CheckDirectory(archivesDir, partialArchivesDir) == false)
+ if (CreateAPTDirectoryIfNeeded(_config->FindDir("Dir::Cache"), partialArchivesDir) == false &&
+ CreateAPTDirectoryIfNeeded(archivesDir, partialArchivesDir) == false)
return _error->Errno("Acquire", _("Archives directory %spartial is missing."), archivesDir.c_str());
if (Lock.empty() == true || _config->FindB("Debug::NoLocking", false) == true)
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 94d994e8b..eabaadf90 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -251,11 +251,11 @@ bool CreateDirectory(string const &Parent, string const &Path)
return true;
}
/*}}}*/
-// CheckDirectory - ensure that the given directory exists /*{{{*/
+// CreateAPTDirectoryIfNeeded - ensure that the given directory exists /*{{{*/
// ---------------------------------------------------------------------
/* a small wrapper around CreateDirectory to check if it exists and to
remove the trailing "/apt/" from the parent directory if needed */
-bool CheckDirectory(string const &Parent, string const &Path)
+bool CreateAPTDirectoryIfNeeded(string const &Parent, string const &Path)
{
if (DirectoryExists(Path) == true)
return true;
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index f79c9032f..419506273 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -101,7 +101,7 @@ bool CreateDirectory(string const &Parent, string const &Path);
* /apt/ will be removed before CreateDirectory call.
* \param Path which should exist after (successful) call
*/
-bool CheckDirectory(string const &Parent, string const &Path);
+bool CreateAPTDirectoryIfNeeded(string const &Parent, string const &Path);
std::vector<string> GetListOfFilesInDir(string const &Dir, string const &Ext,
bool const &SortList, bool const &AllowNoExt=false);
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index d3c432ce1..395c3fb1a 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -641,7 +641,7 @@ void pkgDPkgPM::WriteHistoryTag(string const &tag, string value)
bool pkgDPkgPM::OpenLog()
{
string const logdir = _config->FindDir("Dir::Log");
- if(CheckDirectory(logdir, logdir) == false)
+ if(CreateAPTDirectoryIfNeeded(logdir, logdir) == false)
// FIXME: use a better string after freeze
return _error->Error(_("Directory '%s' missing"), logdir.c_str());
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 3156778d4..f88d51fc5 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -666,7 +666,7 @@ bool SigVerify::RunGPGV(std::string const &File, std::string const &FileGPG,
{
string const gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv");
// FIXME: remove support for deprecated APT::GPGV setting
- string const trustedFile = _config->FindFile("Dir::Etc::Trusted");
+ string const trustedFile = _config->Find("APT::GPGV::TrustedKeyring", _config->FindFile("Dir::Etc::Trusted"));
string const trustedPath = _config->FindDir("Dir::Etc::TrustedParts");
bool const Debug = _config->FindB("Debug::Acquire::gpgv", false);
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 846b27313..f0bad78df 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -70,8 +70,7 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.Set("Dir::Etc::parts","apt.conf.d");
Cnf.Set("Dir::Etc::preferences","preferences");
Cnf.Set("Dir::Etc::preferencesparts","preferences.d");
- string const deprecated = _config->Find("APT::GPGV::TrustedKeyring");
- Cnf.Set("Dir::Etc::trusted", deprecated.empty() ? "trusted.gpg" : deprecated);
+ Cnf.Set("Dir::Etc::trusted", "trusted.gpg");
Cnf.Set("Dir::Etc::trustedparts","trusted.gpg.d");
Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
Cnf.Set("Dir::Media::MountPath","/media/apt");
diff --git a/apt-pkg/init.h b/apt-pkg/init.h
index 6e7340dfe..15a1165b9 100644
--- a/apt-pkg/init.h
+++ b/apt-pkg/init.h
@@ -23,7 +23,7 @@
// See also buildlib/libversion.mak
#define APT_PKG_MAJOR 4
#define APT_PKG_MINOR 10
-#define APT_PKG_RELEASE 0
+#define APT_PKG_RELEASE 1
extern const char *pkgVersion;
extern const char *pkgLibVersion;