Browse Source

Apply clang-format

lmdb
Martchus 2 months ago
parent
commit
e0a913b16c
6 changed files with 11 additions and 7 deletions
  1. +1
    -2
      libpkg/tests/data.cpp
  2. +2
    -1
      librepomgr/buildactions/reloadlibrarydependencies.cpp
  3. +2
    -1
      librepomgr/webclient/database.cpp
  4. +2
    -1
      librepomgr/webclient/database.h
  5. +2
    -1
      librepomgr/webclient/session.cpp
  6. +2
    -1
      librepomgr/webclient/session.h

+ 1
- 2
libpkg/tests/data.cpp View File

@ -181,8 +181,7 @@ void DataTests::testDependencyMatching()
"equal constraint with explicitly specified pkgrel must not match", !pkg3.providesDependency(Dependency::fromString(depStr, 16)));
depStr = "crypto++>=5.6.5-1";
CPPUNIT_ASSERT_MESSAGE(
"greater equal constraint with explicitly specified pkgrel", pkg2.providesDependency(Dependency::fromString(depStr, 17)));
CPPUNIT_ASSERT_MESSAGE("greater equal constraint with explicitly specified pkgrel", pkg2.providesDependency(Dependency::fromString(depStr, 17)));
CPPUNIT_ASSERT_MESSAGE("greater equal constraint, default pkgrel should match", pkg2.providesDependency(Dependency::fromString(depStr, 15)));
CPPUNIT_ASSERT_MESSAGE("greater equal constrainer, any pkgrel should match", pkg3.providesDependency(Dependency::fromString(depStr, 15)));
CPPUNIT_ASSERT_MESSAGE(


+ 2
- 1
librepomgr/buildactions/reloadlibrarydependencies.cpp View File

@ -238,7 +238,8 @@ void LibRepoMgr::ReloadLibraryDependencies::downloadPackagesFromMirror()
m_buildAction->appendOutput(Phrases::SuccessMessage, "Downloading ", packagesWhichNeedCaching, " binary packages from mirror ...\n");
WebClient::cachePackages(m_buildAction->log(),
std::make_shared<WebClient::PackageCachingSession>(m_cachingData, m_setup.building.ioContext, m_setup.webServer.sslContext,
std::bind(&ReloadLibraryDependencies::loadPackageInfoFromContents, this)), m_packageDownloadSizeLimit);
std::bind(&ReloadLibraryDependencies::loadPackageInfoFromContents, this)),
m_packageDownloadSizeLimit);
}
void ReloadLibraryDependencies::loadPackageInfoFromContents()


+ 2
- 1
librepomgr/webclient/database.cpp View File

@ -190,7 +190,8 @@ PackageCachingDataForPackage *PackageCachingSession::getCurrentDataAndSelectNext
return data;
}
void cachePackages(LogContext &log, std::shared_ptr<PackageCachingSession> &&packageCachingSession, std::optional<std::uint64_t> bodyLimit, std::size_t maxParallelDownloads)
void cachePackages(LogContext &log, std::shared_ptr<PackageCachingSession> &&packageCachingSession, std::optional<std::uint64_t> bodyLimit,
std::size_t maxParallelDownloads)
{
for (std::size_t startedDownloads = 0; startedDownloads < maxParallelDownloads; ++startedDownloads) {
auto *const cachingData = packageCachingSession->getCurrentDataAndSelectNext();


+ 2
- 1
librepomgr/webclient/database.h View File

@ -45,7 +45,8 @@ using PackageCachingDataForDatabase = std::unordered_map<std::string_view, Packa
using PackageCachingDataForSession = std::unordered_map<std::string_view, PackageCachingDataForDatabase>;
struct PackageCachingSession;
void cachePackages(LogContext &log, std::shared_ptr<PackageCachingSession> &&packageCachingSession, std::optional<std::uint64_t> bodyLimit = std::nullopt, std::size_t maxParallelDownloads = 8);
void cachePackages(LogContext &log, std::shared_ptr<PackageCachingSession> &&packageCachingSession,
std::optional<std::uint64_t> bodyLimit = std::nullopt, std::size_t maxParallelDownloads = 8);
struct PackageCachingSession : public MultiSession<void> {
friend void cachePackages(LogContext &, std::shared_ptr<PackageCachingSession> &&, std::optional<std::uint64_t>, std::size_t);


+ 2
- 1
librepomgr/webclient/session.cpp View File

@ -41,7 +41,8 @@ void Session::setChunkHandler(ChunkHandler &&handler)
m_chunkProcessing->handler = std::move(handler);
}
void Session::run(const char *host, const char *port, http::verb verb, const char *target, std::optional<std::uint64_t> bodyLimit, unsigned int version)
void Session::run(
const char *host, const char *port, http::verb verb, const char *target, std::optional<std::uint64_t> bodyLimit, unsigned int version)
{
// set SNI Hostname (many hosts need this to handshake successfully)
auto *const sslStream = std::get_if<SslStream>(&m_stream);


+ 2
- 1
librepomgr/webclient/session.h View File

@ -62,7 +62,8 @@ public:
explicit Session(boost::asio::io_context &ioContext, boost::asio::ssl::context &sslContext, Handler &&handler);
void setChunkHandler(ChunkHandler &&handler);
void run(const char *host, const char *port, boost::beast::http::verb verb, const char *target, std::optional<std::uint64_t> bodyLimit = std::nullopt, unsigned int version = 11);
void run(const char *host, const char *port, boost::beast::http::verb verb, const char *target,
std::optional<std::uint64_t> bodyLimit = std::nullopt, unsigned int version = 11);
private:
using RawSocket = boost::asio::ip::tcp::socket;


Loading…
Cancel
Save