summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc4
-rw-r--r--apt-pkg/acquire.cc2
-rw-r--r--apt-pkg/indexcopy.cc4
3 files changed, 7 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index ff4036f4a..21d990fba 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -3641,7 +3641,7 @@ void pkgAcqChangelog::Init(std::string const &DestDir, std::string const &DestFi
}
TemporaryDirectory = tmpname;
- ChangeOwnerAndPermissionOfFile("Item::QueueURI", TemporaryDirectory.c_str(),
+ ChangeOwnerAndPermissionOfFile("pkgAcqChangelog::Init", TemporaryDirectory.c_str(),
SandboxUser.c_str(), ROOT_GROUP, 0700);
DestFile = flCombine(TemporaryDirectory, DestFileName);
@@ -3654,6 +3654,7 @@ void pkgAcqChangelog::Init(std::string const &DestDir, std::string const &DestFi
if (file1.Open(DestFile, FileFd::WriteOnly | FileFd::Create | FileFd::Exclusive) &&
file2.Open(d->FinalFile, FileFd::ReadOnly) && CopyFile(file2, file1))
{
+ ChangeOwnerAndPermissionOfFile("pkgAcqChangelog::Init", DestFile.c_str(), "root", ROOT_GROUP, 0644);
struct timeval times[2];
times[0].tv_sec = times[1].tv_sec = file2.ModificationTime();
times[0].tv_usec = times[1].tv_usec = 0;
@@ -4026,6 +4027,7 @@ static std::string GetAuxFileNameFromURI(std::string const &uri)
{
FileFd out(filename, FileFd::WriteOnly | FileFd::Create | FileFd::Exclusive);
CopyFile(in, out);
+ ChangeOwnerAndPermissionOfFile("GetAuxFileNameFromURI", filename.c_str(), "root", ROOT_GROUP, 0644);
}
_error->RevertToStack();
return filename;
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index ba895ed44..983a0fb41 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -80,6 +80,8 @@ void pkgAcquire::Initialize()
// Acquire::GetLock - lock directory and prepare for action /*{{{*/
static bool SetupAPTPartialDirectory(std::string const &grand, std::string const &parent, std::string const &postfix, mode_t const mode)
{
+ if (_config->FindB("Debug::SetupAPTPartialDirectory::AssumeGood", false))
+ return true;
std::string const partial = parent + postfix;
bool const partialExists = DirectoryExists(partial);
if (partialExists == false)
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 872adcaa8..8704da80a 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -63,9 +63,9 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
struct stat Buf;
bool found = false;
auto const file = F + GetFileName();
- for (auto const &ext: APT::Configuration::getCompressorExtensions())
+ for (auto const &c : compressor)
{
- if (stat((file + ext).c_str(), &Buf) != 0)
+ if (stat((file + c.Extension).c_str(), &Buf) != 0)
continue;
found = true;
break;