summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 45ed66996..01282efcc 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -670,7 +670,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line)
if (unlikely(candset.empty()))
{
if (Debug == true)
- std::clog << "unable to figure out which package is dpkg refering to with '" << pkgname << "'! (1)" << std::endl;
+ std::clog << "unable to figure out which package is dpkg referring to with '" << pkgname << "'! (1)" << std::endl;
return;
}
else if (candset.size() == 1) // we are lucky
@@ -760,7 +760,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line)
if (pkgname.find(':') != std::string::npos)
{
if (Debug == true)
- std::clog << "unable to figure out which package is dpkg refering to with '" << pkgname << "'! (2)" << std::endl;
+ std::clog << "unable to figure out which package is dpkg referring to with '" << pkgname << "'! (2)" << std::endl;
return;
}
}
@@ -985,7 +985,8 @@ void pkgDPkgPM::WriteHistoryTag(string const &tag, string value)
// DPkgPM::OpenLog /*{{{*/
bool pkgDPkgPM::OpenLog()
{
- string const logdir = _config->FindDir("Dir::Log");
+ string const logfile_name = _config->FindFile("Dir::Log::Terminal");
+ string logdir = flNotFile(logfile_name);
if(CreateAPTDirectoryIfNeeded(logdir, logdir) == false)
// FIXME: use a better string after freeze
return _error->Error(_("Directory '%s' missing"), logdir.c_str());
@@ -998,8 +999,6 @@ bool pkgDPkgPM::OpenLog()
strftime(timestr, sizeof(timestr), "%F %T", tmp);
// open terminal log
- string const logfile_name = flCombine(logdir,
- _config->Find("Dir::Log::Terminal"));
if (!logfile_name.empty())
{
d->term_out = fopen(logfile_name.c_str(),"a");
@@ -1020,8 +1019,10 @@ bool pkgDPkgPM::OpenLog()
}
// write your history
- string const history_name = flCombine(logdir,
- _config->Find("Dir::Log::History"));
+ string const history_name = _config->FindFile("Dir::Log::History");
+ string logdir2 = flNotFile(logfile_name);
+ if(logdir != logdir2 && CreateAPTDirectoryIfNeeded(logdir2, logdir2) == false)
+ return _error->Error(_("Directory '%s' missing"), logdir.c_str());
if (!history_name.empty())
{
d->history_out = fopen(history_name.c_str(),"a");
@@ -1447,7 +1448,7 @@ bool pkgDPkgPM::ExpandPendingCalls(std::vector<Item> &List, pkgDepCache &Cache)
}
bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
{
- // explicitely remove&configure everything for hookscripts and progress building
+ // explicitly remove&configure everything for hookscripts and progress building
// we need them only temporarily through, so keep the length and erase afterwards
decltype(List)::const_iterator::difference_type explicitIdx =
std::distance(List.cbegin(), List.cend());
@@ -1509,7 +1510,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
dpkg_recursive_install = Cache.VS().CmpVersion("1.18.5", dpkgpkg.CurrentVer().VerStr()) <= 0;
}
// no point in doing this dance for a handful of packages only
- unsigned int const dpkg_recursive_install_min = _config->FindB("dpkg::install::recursive::minimum", 5);
+ unsigned int const dpkg_recursive_install_min = _config->FindI("dpkg::install::recursive::minimum", 5);
// FIXME: workaround for dpkg bug, see our ./test-bug-740843-versioned-up-down-breaks test
bool const dpkg_recursive_install_numbered = _config->FindB("dpkg::install::recursive::numbered", true);
@@ -1911,7 +1912,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
ADDARG(fullname);
}
}
- // skip configure action if all sheduled packages disappeared
+ // skip configure action if all scheduled packages disappeared
if (oldSize == Size)
continue;
}
@@ -2103,7 +2104,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
if (d->dpkg_error.empty() == false)
{
- // no point in reseting packages we already completed removal for
+ // no point in resetting packages we already completed removal for
StripAlreadyDoneFrom(approvedStates.Remove());
StripAlreadyDoneFrom(approvedStates.Purge());
APT::StateChanges undo;