summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire.cc2
-rw-r--r--apt-pkg/contrib/progress.cc2
-rw-r--r--apt-pkg/deb/debmetaindex.cc3
-rw-r--r--apt-pkg/init.cc2
-rw-r--r--apt-pkg/tagfile.cc2
5 files changed, 3 insertions, 8 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 086cb378c..6a6167f3b 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -1279,7 +1279,7 @@ static struct timeval GetTimevalFromSteadyClock()
auto const Time = std::chrono::steady_clock::now().time_since_epoch();
auto const Time_sec = std::chrono::duration_cast<std::chrono::seconds>(Time);
auto const Time_usec = std::chrono::duration_cast<std::chrono::microseconds>(Time - Time_sec);
- return { Time_sec.count(), Time_usec.count() };
+ return { static_cast<time_t>(Time_sec.count()), static_cast<suseconds_t>(Time_usec.count()) };
}
bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
{
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc
index 806bd47f8..bd604c5b0 100644
--- a/apt-pkg/contrib/progress.cc
+++ b/apt-pkg/contrib/progress.cc
@@ -119,7 +119,7 @@ bool OpProgress::CheckChange(float Interval)
auto const Now = std::chrono::steady_clock::now().time_since_epoch();
auto const Now_sec = std::chrono::duration_cast<std::chrono::seconds>(Now);
auto const Now_usec = std::chrono::duration_cast<std::chrono::microseconds>(Now - Now_sec);
- struct timeval NowTime = { Now_sec.count(), Now_usec.count() };
+ struct timeval NowTime = { static_cast<time_t>(Now_sec.count()), static_cast<suseconds_t>(Now_usec.count()) };
std::chrono::duration<decltype(Interval)> Delta =
std::chrono::seconds(NowTime.tv_sec - LastTime.tv_sec) +
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 774560041..0290f3df9 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -562,9 +562,6 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
if (CheckValidUntil == true)
{
- if (Date == 0)
- _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str());
-
std::string const StrValidUntil = Section.FindS("Valid-Until");
// if we have a Valid-Until header in the Release file, use it as default
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index a619368ec..d69d7da32 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -177,7 +177,7 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.Set("Dir::Ignore-Files-Silently::", "\\.distUpgrade$");
// Repository security
- Cnf.CndSet("Acquire::AllowInsecureRepositories", false);
+ Cnf.CndSet("Acquire::AllowInsecureRepositories", true);
Cnf.CndSet("Acquire::AllowWeakRepositories", false);
Cnf.CndSet("Acquire::AllowDowngradeToInsecureRepositories", false);
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index 1c747fddc..5f39e5757 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -13,8 +13,6 @@
#include <config.h>
#include <apt-pkg/mmap.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/tagfile-keys.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/string_view.h>