Fix typos found via `codespell --skip .git -w`

This commit is contained in:
Martchus 2021-07-03 19:59:57 +02:00
parent 8b70cc5f8e
commit 49aebdd8a5
22 changed files with 57 additions and 57 deletions

View File

@ -1,6 +1,6 @@
# Repository manager and build tool for Arch Linux # Repository manager and build tool for Arch Linux
This **experimental** project contains **inofficial** tools to manage custom Arch Linux This **experimental** project contains **unofficial** tools to manage custom Arch Linux
repositories. It is built on top of the official tools provided by the `pacman` and repositories. It is built on top of the official tools provided by the `pacman` and
`devtools` packages. `devtools` packages.
@ -245,7 +245,7 @@ editing the presets JSON file (e.g. `/etc/buildservice-git/presets.json` in the
packages are considered as newer by pacman. A warning is logged when bumping is done. packages are considered as newer by pacman. A warning is logged when bumping is done.
* Missing dependencies are pulled into the build automatically. Whether dependencies are * Missing dependencies are pulled into the build automatically. Whether dependencies are
considered "missing" or "given" depends on the specified databases (see next points). considered "missing" or "given" depends on the specified databases (see next points).
* Packages will be splitted into batches. The first batch contains all packages which can be * Packages will be split into batches. The first batch contains all packages which can be
built immediately. The second batch contains all packages which only depend on packages in built immediately. The second batch contains all packages which only depend on packages in
the first batch. The third batch contains all packages which only depend on packages in the the first batch. The third batch contains all packages which only depend on packages in the
second batch and so on. That means packages do not need to be specified in the correct order. second batch and so on. That means packages do not need to be specified in the correct order.
@ -254,9 +254,9 @@ editing the presets JSON file (e.g. `/etc/buildservice-git/presets.json` in the
* Cyclic dependencies can not be added to a batch. A list of cyclic "leftovers" is emitted * Cyclic dependencies can not be added to a batch. A list of cyclic "leftovers" is emitted
if those exist and that is considered a failure. If this is the case you need to add a if those exist and that is considered a failure. If this is the case you need to add a
bootstrap package to break the cycle. The build system is not clever enough to pull a bootstrap bootstrap package to break the cycle. The build system is not clever enough to pull a bootstrap
package automatically into the build so it must be specified explicitely. E.g. to build package automatically into the build so it must be specified explicitly. E.g. to build
`mingw-w64-freetype2` and `mingw-w64-harfbuzz` one needs to add `mingw-w64-freetype2-bootstrap` `mingw-w64-freetype2` and `mingw-w64-harfbuzz` one needs to add `mingw-w64-freetype2-bootstrap`
explicitely to the list of packages to be built. explicitly to the list of packages to be built.
* Specify exactly one destination database. The built packages are added to this database. * Specify exactly one destination database. The built packages are added to this database.
* Specify source databases. * Specify source databases.
* All packages contained by the source databases are considered as "given" and not pulled * All packages contained by the source databases are considered as "given" and not pulled
@ -303,7 +303,7 @@ editing the presets JSON file (e.g. `/etc/buildservice-git/presets.json` in the
1. Clean the `src` directory within "directory" for the package(s) or use "Clean source directory" if 1. Clean the `src` directory within "directory" for the package(s) or use "Clean source directory" if
all packages need fixing. all packages need fixing.
2. Restart step 1. Existing sources are reused (except for the removed `src` directories) so it shouldn't 2. Restart step 1. Existing sources are reused (except for the removed `src` directories) so it shouldn't
take long. The build progress (`hasSources` in particular) of the affected package(s) should be resetted. take long. The build progress (`hasSources` in particular) of the affected package(s) should be reset.
3. Restart step 2. 3. Restart step 2.
* or: Amend the PKGBUILD within the `src` directory. * or: Amend the PKGBUILD within the `src` directory.
1. Set `hasSources` back to `false` as mentioned under 2. to retrigger building the source directory. 1. Set `hasSources` back to `false` as mentioned under 2. to retrigger building the source directory.

View File

@ -36,7 +36,7 @@ set(TEST_SRC_FILES tests/cppunit.cpp tests/parser.cpp tests/parser_binary.cpp te
set(META_PROJECT_NAME libpkg) set(META_PROJECT_NAME libpkg)
set(META_PROJECT_TYPE library) set(META_PROJECT_TYPE library)
set(META_PROJECT_VARNAME LIBPKG) set(META_PROJECT_VARNAME LIBPKG)
set(META_APP_NAME "Inofficial Arch Linux package library") set(META_APP_NAME "Unofficial Arch Linux package library")
set(META_APP_DESCRIPTION "C++ library to parse Arch Linux packages and databases") set(META_APP_DESCRIPTION "C++ library to parse Arch Linux packages and databases")
set(META_VERSION_MAJOR 0) set(META_VERSION_MAJOR 0)
set(META_VERSION_MINOR 0) set(META_VERSION_MINOR 0)

View File

@ -82,7 +82,7 @@ bool Config::addDepsRecursivelyInTopoOrder(vector<unique_ptr<TopoSortItem>> &all
return false; return false;
} }
// add package to the "current chain" (used to comprehend the path in case a cycle occured) // add package to the "current chain" (used to comprehend the path in case a cycle occurred)
cycleTracking.emplace_back(packageSearchResult); cycleTracking.emplace_back(packageSearchResult);
// add topo sort item for dependency // add topo sort item for dependency

View File

@ -23,7 +23,7 @@
namespace LibPkg { namespace LibPkg {
/*! /*!
* \brief The InstallStatus enum specifies whether a package has been installed explicitely or as dependency. * \brief The InstallStatus enum specifies whether a package has been installed explicitly or as dependency.
*/ */
enum class InstallStatus { Explicit = 0, AsDependency = 1, Unknown = 20 }; enum class InstallStatus { Explicit = 0, AsDependency = 1, Unknown = 20 };
@ -212,7 +212,7 @@ enum class PackageVersionComparison {
LIBPKG_EXPORT std::ostream &operator<<(std::ostream &o, const PackageVersionComparison &res); LIBPKG_EXPORT std::ostream &operator<<(std::ostream &o, const PackageVersionComparison &res);
/*! /*!
* \brief The ComparsionResult enum defines possible results of the package version part comparsion * \brief The ComparsionResult enum defines possible results of the package version part comparison
* provided by PackageVersion::compareParts(). * provided by PackageVersion::compareParts().
*/ */
enum class PackageVersionPartComparison { enum class PackageVersionPartComparison {
@ -230,7 +230,7 @@ struct LIBPKG_EXPORT PackageVersion : public ReflectiveRapidJSON::JsonSerializab
static std::string trimPackageVersion(const std::string &versionString); static std::string trimPackageVersion(const std::string &versionString);
PackageVersionComparison compare(const PackageVersion &other) const; PackageVersionComparison compare(const PackageVersion &other) const;
static PackageVersionComparison compare(const std::string &versionString1, const std::string &versionString2); static PackageVersionComparison compare(const std::string &versionString1, const std::string &versionString2);
static bool isNewer(PackageVersionComparison comparision); static bool isNewer(PackageVersionComparison comparison);
std::string toString() const; std::string toString() const;
std::string epoch; std::string epoch;
@ -248,9 +248,9 @@ inline PackageVersionComparison PackageVersion::compare(const std::string &versi
return fromString(versionString1).compare(fromString(versionString2)); return fromString(versionString1).compare(fromString(versionString2));
} }
inline bool PackageVersion::isNewer(PackageVersionComparison comparision) inline bool PackageVersion::isNewer(PackageVersionComparison comparison)
{ {
return comparision == PackageVersionComparison::SoftwareUpgrade || comparision == PackageVersionComparison::PackageUpgradeOnly; return comparison == PackageVersionComparison::SoftwareUpgrade || comparison == PackageVersionComparison::PackageUpgradeOnly;
} }
/*! /*!

View File

@ -694,7 +694,7 @@ std::uint64_t Binary::readElfAddress(BinaryReader &reader)
case BinaryClass::Class32Bit: case BinaryClass::Class32Bit:
return isBigEndian ? reader.readUInt32BE() : reader.readUInt32LE(); return isBigEndian ? reader.readUInt32BE() : reader.readUInt32LE();
default: default:
throw runtime_error("Inavlid binary class"); throw runtime_error("Invalid binary class");
} }
} }

View File

@ -112,7 +112,7 @@ void Config::loadPacmanConfig(const char *pacmanConfigPath)
includedFile.open(path, ios_base::in); includedFile.open(path, ios_base::in);
includedIni.parse(includedFile); includedIni.parse(includedFile);
} catch (const ios_base::failure &) { } catch (const ios_base::failure &) {
cerr << Phrases::WarningMessage << "An IO error occured when parsing the included file \"" << path << "\"." cerr << Phrases::WarningMessage << "An IO error occurred when parsing the included file \"" << path << "\"."
<< Phrases::EndFlush; << Phrases::EndFlush;
} }
} }

View File

@ -60,7 +60,7 @@ void walkThroughArchiveInternal(struct archive *ar, const string &archiveName, c
// get permissions // get permissions
const mode_t perm = archive_entry_perm(entry); const mode_t perm = archive_entry_perm(entry);
// add directories explicitely to get the entire tree though skipping irrelevant files // add directories explicitly to get the entire tree though skipping irrelevant files
if (entryType == AE_IFDIR) { if (entryType == AE_IFDIR) {
// remove trailing slashes // remove trailing slashes
const char *dirEnd = filePath; const char *dirEnd = filePath;
@ -160,7 +160,7 @@ void walkThroughArchive(
{ {
// open archive file using libarchive // open archive file using libarchive
if (archivePath.empty()) { if (archivePath.empty()) {
throw std::runtime_error("Unable to open archive: no path specificed"); throw std::runtime_error("Unable to open archive: no path specified");
} }
struct archive *ar = archive_read_new(); struct archive *ar = archive_read_new();
archive_read_support_filter_all(ar); archive_read_support_filter_all(ar);

View File

@ -149,9 +149,9 @@ void DataTests::testDependencyMatching()
dep.mode = DependencyMode::Equal; dep.mode = DependencyMode::Equal;
CPPUNIT_ASSERT_MESSAGE("equal constraint, direct match", pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("equal constraint, direct match", pkg.providesDependency(dep));
dep.mode = DependencyMode::GreatherEqual; dep.mode = DependencyMode::GreatherEqual;
CPPUNIT_ASSERT_MESSAGE("greather equal constraint, no match", pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("greater equal constraint, no match", pkg.providesDependency(dep));
dep.mode = DependencyMode::GreatherThan; dep.mode = DependencyMode::GreatherThan;
CPPUNIT_ASSERT_MESSAGE("greather constraint, no match", !pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("greater constraint, no match", !pkg.providesDependency(dep));
dep.mode = DependencyMode::LessEqual; dep.mode = DependencyMode::LessEqual;
CPPUNIT_ASSERT_MESSAGE("less equal constraint, match", pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("less equal constraint, match", pkg.providesDependency(dep));
dep.mode = DependencyMode::LessThan; dep.mode = DependencyMode::LessThan;
@ -160,33 +160,33 @@ void DataTests::testDependencyMatching()
pkg.version += '0'; pkg.version += '0';
CPPUNIT_ASSERT_MESSAGE("equal constraint, no match", !pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("equal constraint, no match", !pkg.providesDependency(dep));
dep.mode = DependencyMode::GreatherEqual; dep.mode = DependencyMode::GreatherEqual;
CPPUNIT_ASSERT_MESSAGE("greather equal constraint, direct match", pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("greater equal constraint, direct match", pkg.providesDependency(dep));
pkg.version = "123.4"; pkg.version = "123.4";
CPPUNIT_ASSERT_MESSAGE("greather equal constraint, direct match", pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("greater equal constraint, direct match", pkg.providesDependency(dep));
dep.name = "foo"; dep.name = "foo";
CPPUNIT_ASSERT_MESSAGE("greather equal constraint, indirect match", pkg.providesDependency(dep)); CPPUNIT_ASSERT_MESSAGE("greater equal constraint, indirect match", pkg.providesDependency(dep));
Package pkg2; Package pkg2;
pkg2.name = "crypto++"; pkg2.name = "crypto++";
pkg2.version = "5.6.5-1"; pkg2.version = "5.6.5-1";
const char *depStr = "crypto++=5.6.5-1"; const char *depStr = "crypto++=5.6.5-1";
CPPUNIT_ASSERT_MESSAGE("name with plus signs", pkg2.providesDependency(Dependency::fromString(depStr, 8))); CPPUNIT_ASSERT_MESSAGE("name with plus signs", pkg2.providesDependency(Dependency::fromString(depStr, 8)));
CPPUNIT_ASSERT_MESSAGE("equal constraint with explicitely specified pkgrel", pkg2.providesDependency(Dependency::fromString(depStr, 16))); CPPUNIT_ASSERT_MESSAGE("equal constraint with explicitly specified pkgrel", pkg2.providesDependency(Dependency::fromString(depStr, 16)));
CPPUNIT_ASSERT_MESSAGE("equal constraint, default pkgrel should match", pkg2.providesDependency(Dependency::fromString(depStr, 14))); CPPUNIT_ASSERT_MESSAGE("equal constraint, default pkgrel should match", pkg2.providesDependency(Dependency::fromString(depStr, 14)));
Package pkg3; Package pkg3;
pkg3.name = "crypto++"; pkg3.name = "crypto++";
pkg3.version = "5.6.5-2"; pkg3.version = "5.6.5-2";
CPPUNIT_ASSERT_MESSAGE("equal constraint, any pkgrel should match", pkg3.providesDependency(Dependency::fromString(depStr, 14))); CPPUNIT_ASSERT_MESSAGE("equal constraint, any pkgrel should match", pkg3.providesDependency(Dependency::fromString(depStr, 14)));
CPPUNIT_ASSERT_MESSAGE( CPPUNIT_ASSERT_MESSAGE(
"equal constraint with explicitely specified pkgrel must not match", !pkg3.providesDependency(Dependency::fromString(depStr, 16))); "equal constraint with explicitly specified pkgrel must not match", !pkg3.providesDependency(Dependency::fromString(depStr, 16)));
depStr = "crypto++>=5.6.5-1"; depStr = "crypto++>=5.6.5-1";
CPPUNIT_ASSERT_MESSAGE( CPPUNIT_ASSERT_MESSAGE(
"greather equal constraint with explicitely specified pkgrel", pkg2.providesDependency(Dependency::fromString(depStr, 17))); "greater equal constraint with explicitly specified pkgrel", pkg2.providesDependency(Dependency::fromString(depStr, 17)));
CPPUNIT_ASSERT_MESSAGE("greather equal constraint, default pkgrel should match", pkg2.providesDependency(Dependency::fromString(depStr, 15))); CPPUNIT_ASSERT_MESSAGE("greater equal constraint, default pkgrel should match", pkg2.providesDependency(Dependency::fromString(depStr, 15)));
CPPUNIT_ASSERT_MESSAGE("greather equal constrainer, any pkgrel should match", pkg3.providesDependency(Dependency::fromString(depStr, 15))); CPPUNIT_ASSERT_MESSAGE("greater equal constrainer, any pkgrel should match", pkg3.providesDependency(Dependency::fromString(depStr, 15)));
CPPUNIT_ASSERT_MESSAGE( CPPUNIT_ASSERT_MESSAGE(
"greather equal constraint with explicitely specified pkgrel must match", pkg3.providesDependency(Dependency::fromString(depStr, 17))); "greater equal constraint with explicitly specified pkgrel must match", pkg3.providesDependency(Dependency::fromString(depStr, 17)));
pkg3.name = "sphinxbase"; pkg3.name = "sphinxbase";
pkg3.version = "5prealpha-11.1aBc"; pkg3.version = "5prealpha-11.1aBc";
@ -249,7 +249,7 @@ void DataTests::testComputingFileName()
pkg.packageInfo->arch = "x86_64"; pkg.packageInfo->arch = "x86_64";
CPPUNIT_ASSERT_EQUAL_MESSAGE("file name computed from name, version and arch", "test-1.2-3-x86_64.pkg.tar.zst"s, pkg.computeFileName()); CPPUNIT_ASSERT_EQUAL_MESSAGE("file name computed from name, version and arch", "test-1.2-3-x86_64.pkg.tar.zst"s, pkg.computeFileName());
pkg.packageInfo->fileName = "explicitely-specified-filename"; pkg.packageInfo->fileName = "explicitely-specified-filename";
CPPUNIT_ASSERT_EQUAL_MESSAGE("explicitely specified filename returned", "explicitely-specified-filename"s, pkg.computeFileName()); CPPUNIT_ASSERT_EQUAL_MESSAGE("explicitly specified filename returned", "explicitly-specified-filename"s, pkg.computeFileName());
} }
void DataTests::testDetectingUnresolved() void DataTests::testDetectingUnresolved()

View File

@ -303,7 +303,7 @@ void ParserTests::testParsingSignatureLevel()
void ParserTests::testSerializingDatabaseSignatureLevel() void ParserTests::testSerializingDatabaseSignatureLevel()
{ {
CPPUNIT_ASSERT_EQUAL_MESSAGE( CPPUNIT_ASSERT_EQUAL_MESSAGE(
"defaut signature level", SignatureLevelConfig(SignatureLevel::Default), SignatureLevelConfig::fromString(std::string_view())); "default signature level", SignatureLevelConfig(SignatureLevel::Default), SignatureLevelConfig::fromString(std::string_view()));
CPPUNIT_ASSERT_EQUAL_MESSAGE( CPPUNIT_ASSERT_EQUAL_MESSAGE(
"invalid signature level", SignatureLevelConfig(SignatureLevel::Invalid), SignatureLevelConfig::fromString("foo bar")); "invalid signature level", SignatureLevelConfig(SignatureLevel::Invalid), SignatureLevelConfig::fromString("foo bar"));
CPPUNIT_ASSERT_EQUAL_MESSAGE( CPPUNIT_ASSERT_EQUAL_MESSAGE(

View File

@ -77,7 +77,7 @@ void UtilsTests::testAmendingPkgbuild()
amendPkgbuild(pkgbuildPath, PackageVersion{ .upstream = "5.0.2", .package = "3" }, amendPkgbuild(pkgbuildPath, PackageVersion{ .upstream = "5.0.2", .package = "3" },
PackageAmendment{ .bumpDownstreamVersion = PackageAmendment::VersionBump::Epoch }); PackageAmendment{ .bumpDownstreamVersion = PackageAmendment::VersionBump::Epoch });
CPPUNIT_ASSERT_EQUAL_MESSAGE("epoch bumped, pkgrel resetted", readFile(testFilePath("c++utilities/PKGBUILD.newepoch")), readFile(pkgbuildPath)); CPPUNIT_ASSERT_EQUAL_MESSAGE("epoch bumped, pkgrel reset", readFile(testFilePath("c++utilities/PKGBUILD.newepoch")), readFile(pkgbuildPath));
amendPkgbuild(pkgbuildPath, PackageVersion{ .upstream = "5.0.2", .package = "3" }, PackageAmendment{ .setUpstreamVersion = true }); amendPkgbuild(pkgbuildPath, PackageVersion{ .upstream = "5.0.2", .package = "3" }, PackageAmendment{ .setUpstreamVersion = true });
CPPUNIT_ASSERT_EQUAL_MESSAGE("upstream version set", readFile(testFilePath("c++utilities/PKGBUILD.newpkgver")), readFile(pkgbuildPath)); CPPUNIT_ASSERT_EQUAL_MESSAGE("upstream version set", readFile(testFilePath("c++utilities/PKGBUILD.newpkgver")), readFile(pkgbuildPath));

View File

@ -66,7 +66,7 @@ set(META_PROJECT_NAME librepomgr)
set(META_PROJECT_TYPE library) set(META_PROJECT_TYPE library)
set(META_PROJECT_VARNAME LIBREPOMGR) set(META_PROJECT_VARNAME LIBREPOMGR)
set(META_APP_AUTHOR "Martchus") set(META_APP_AUTHOR "Martchus")
set(META_APP_NAME "Inofficial Arch Linux repository management library") set(META_APP_NAME "Unofficial Arch Linux repository management library")
set(META_APP_DESCRIPTION "Library for managing custom Arch Linux repositories") set(META_APP_DESCRIPTION "Library for managing custom Arch Linux repositories")
set(META_VERSION_MAJOR 0) set(META_VERSION_MAJOR 0)
set(META_VERSION_MINOR 0) set(META_VERSION_MINOR 0)

View File

@ -124,7 +124,7 @@ struct LIBREPOMGR_EXPORT OutputBufferingForSession {
std::atomic_bool existingOutputSent = false; std::atomic_bool existingOutputSent = false;
}; };
/// \brief The BuildProcessSession class spawns a process assoicated with a build action. /// \brief The BuildProcessSession class spawns a process associated with a build action.
/// The process output is make available as a logfile of the build action allowing live-steaming. /// The process output is make available as a logfile of the build action allowing live-steaming.
class LIBREPOMGR_EXPORT BuildProcessSession : public std::enable_shared_from_this<BuildProcessSession>, public BaseProcessSession { class LIBREPOMGR_EXPORT BuildProcessSession : public std::enable_shared_from_this<BuildProcessSession>, public BaseProcessSession {
public: public:

View File

@ -333,7 +333,7 @@ void ConductBuild::run()
} }
setupReadLock.unlock(); setupReadLock.unlock();
// fill ommitted build progress configuration with defaults from global config // fill omitted build progress configuration with defaults from global config
if (m_autoStaging && m_buildPreparation.stagingDb.empty()) { if (m_autoStaging && m_buildPreparation.stagingDb.empty()) {
reportError("Auto-staging is enabled but no staging database has been specified in build-preparation.json."); reportError("Auto-staging is enabled but no staging database has been specified in build-preparation.json.");
return; return;

View File

@ -196,7 +196,7 @@ void PrepareBuild::run()
// -> The existing version is useful to know when we need to bump pkgrel or even epoch. // -> The existing version is useful to know when we need to bump pkgrel or even epoch.
size_t currentIndex = 0; size_t currentIndex = 0;
for (const auto &packageName : m_buildAction->packageNames) { for (const auto &packageName : m_buildAction->packageNames) {
// pick some package matching the specified packageName which has a source info; prefering packages // pick some package matching the specified packageName which has a source info; preferring packages
// from the destination db // from the destination db
auto existingPackages = m_setup.config.findPackages(packageName); auto existingPackages = m_setup.config.findPackages(packageName);
auto foundSourcePackage = false; auto foundSourcePackage = false;
@ -229,7 +229,7 @@ void PrepareBuild::run()
break; break;
} }
} }
// add an empty BuildPackage neverthless assuming packageName specifies the base package as-is // add an empty BuildPackage nevertheless assuming packageName specifies the base package as-is
if (!foundSourcePackage) { if (!foundSourcePackage) {
packageBuildData.specifiedIndex = currentIndex++; packageBuildData.specifiedIndex = currentIndex++;
m_buildDataByPackage[packageName] = std::move(packageBuildData); m_buildDataByPackage[packageName] = std::move(packageBuildData);
@ -297,7 +297,7 @@ bool PrepareBuild::isExistingPackageRelevant(
} }
packageBuildData.existingPackages.emplace_back(package.pkg); packageBuildData.existingPackages.emplace_back(package.pkg);
} }
// skip if packge is not from any database available within that build // skip if package is not from any database available within that build
return (m_baseDbs.empty() && dependencyPresentInRequiredDbs) || (m_baseDbs.find(db->name) != m_baseDbs.end()); return (m_baseDbs.empty() && dependencyPresentInRequiredDbs) || (m_baseDbs.find(db->name) != m_baseDbs.end());
} }
@ -489,7 +489,7 @@ void PrepareBuild::fetchMissingBuildData()
bool PrepareBuild::pullFurtherDependencies(const std::vector<LibPkg::Dependency> &dependencies) bool PrepareBuild::pullFurtherDependencies(const std::vector<LibPkg::Dependency> &dependencies)
{ {
// pull further depencencies; similar to initial dependency lookup in run() // pull further dependencies; similar to initial dependency lookup in run()
auto dependencyAdded = false; auto dependencyAdded = false;
const auto *const destinationDb = *m_destinationDbs.begin(); const auto *const destinationDb = *m_destinationDbs.begin();
for (const auto &dependency : dependencies) { for (const auto &dependency : dependencies) {
@ -613,7 +613,7 @@ void BatchItem::determineNeededItems(LibPkg::Config &config, const std::unordere
auto foundPackage = false; auto foundPackage = false;
const auto existingPackages = config.findPackages(dependency); const auto existingPackages = config.findPackages(dependency);
for (const auto &package : existingPackages) { for (const auto &package : existingPackages) {
// skip if packge is not from any database available within that build // skip if package is not from any database available within that build
const auto *const db = std::get<LibPkg::Database *>(package.db); const auto *const db = std::get<LibPkg::Database *>(package.db);
if (requiredDbs.find(db->name) == requiredDbs.end()) { if (requiredDbs.find(db->name) == requiredDbs.end()) {
continue; continue;
@ -693,7 +693,7 @@ void BatchItem::addNeededBatchItemsForPackage(LibPkg::Config &config, const std:
auto foundPackage = false; auto foundPackage = false;
const auto existingPackages = config.findPackages(dep); const auto existingPackages = config.findPackages(dep);
for (const auto &existingPackage : existingPackages) { for (const auto &existingPackage : existingPackages) {
// skip if packge is not from any database available within that build // skip if package is not from any database available within that build
const auto *const db = std::get<LibPkg::Database *>(existingPackage.db); const auto *const db = std::get<LibPkg::Database *>(existingPackage.db);
if (requiredDbs.find(db->name) == requiredDbs.end()) { if (requiredDbs.find(db->name) == requiredDbs.end()) {
continue; continue;
@ -753,7 +753,7 @@ void PrepareBuild::bumpVersions()
if (package->decomposeName().isVcsPackage()) { if (package->decomposeName().isVcsPackage()) {
// skip bumping epoch of VCS packages; the pkgver is supposed to be adjusted in pkgver() // skip bumping epoch of VCS packages; the pkgver is supposed to be adjusted in pkgver()
// note: Not skipping this in the pkgrel handling in the case above because when pkgver() returns a new version, pkgrel is // note: Not skipping this in the pkgrel handling in the case above because when pkgver() returns a new version, pkgrel is
// resetted automatically so there's no harm in bumping it and it might actually be needed if there's no no version. // reset automatically so there's no harm in bumping it and it might actually be needed if there's no no version.
m_warnings.emplace_back("Version of package " % package->name % " is" % package->version m_warnings.emplace_back("Version of package " % package->name % " is" % package->version
% " which is older than existing version " % existingVersionStr % " which is older than existing version " % existingVersionStr
+ "; NOT bumping the epoch because it is a VCS package; be sure pkgver() actually yields a new version"); + "; NOT bumping the epoch because it is a VCS package; be sure pkgver() actually yields a new version");
@ -977,7 +977,7 @@ void PrepareBuild::computeBatches()
} }
} }
if (!cyclicLeftovers.empty()) { if (!cyclicLeftovers.empty()) {
m_warnings.emplace_back("Dependency cycles have been detected. Add a boostrap package to the package list to resolve this."); m_warnings.emplace_back("Dependency cycles have been detected. Add a bootstrap package to the package list to resolve this.");
} }
} }

View File

@ -156,7 +156,7 @@ void ReloadLibraryDependencies::run()
PackageToConsider{ .path = std::move(path), .url = std::move(url), .lastModified = lastModified }); PackageToConsider{ .path = std::move(path), .url = std::move(url), .lastModified = lastModified });
// create a temporary package object to hold the info parsed from the .PKGINFO file // create a temporary package object to hold the info parsed from the .PKGINFO file
relevantPkg.info.name = package->name; relevantPkg.info.name = package->name;
// -> assing certain fields which are used by addDepsAndProvidesFromOtherPackage() to check whether the packages are matching // -> assign certain fields which are used by addDepsAndProvidesFromOtherPackage() to check whether the packages are matching
relevantPkg.info.version = package->version; relevantPkg.info.version = package->version;
relevantPkg.info.packageInfo = std::make_unique<LibPkg::PackageInfo>(); relevantPkg.info.packageInfo = std::make_unique<LibPkg::PackageInfo>();
relevantPkg.info.packageInfo->buildDate = package->packageInfo->buildDate; relevantPkg.info.packageInfo->buildDate = package->packageInfo->buildDate;

View File

@ -651,7 +651,7 @@ void CleanRepository::run()
}(); }();
#endif #endif
throw std::runtime_error( throw std::runtime_error(
"multiple/ambigous *.db files present: " + joinStrings<decltype(dbFileNames), std::string>(dbFileNames, ", ")); "multiple/ambiguous *.db files present: " + joinStrings<decltype(dbFileNames), std::string>(dbFileNames, ", "));
} }
// initialize temporary database object for the repository // initialize temporary database object for the repository
auto &db = otherDbs.emplace_back(std::make_unique<LibPkg::Database>(dbFilePaths.front().stem(), dbFilePaths.front())); auto &db = otherDbs.emplace_back(std::make_unique<LibPkg::Database>(dbFilePaths.front().stem(), dbFilePaths.front()));

View File

@ -268,7 +268,7 @@ void ServiceSetup::loadConfigFiles(bool restoreStateAndDiscardDatabases)
} }
} }
} catch (const ios_base::failure &) { } catch (const ios_base::failure &) {
cerr << Phrases::WarningMessage << "An IO error occured when parsing \"" << configFilePath << "\", using defaults" << Phrases::EndFlush; cerr << Phrases::WarningMessage << "An IO error occurred when parsing \"" << configFilePath << "\", using defaults" << Phrases::EndFlush;
} }
// restore state/cache and discard databases if not done yet // restore state/cache and discard databases if not done yet
@ -281,9 +281,9 @@ void ServiceSetup::loadConfigFiles(bool restoreStateAndDiscardDatabases)
try { try {
config.loadPacmanConfig(pacmanConfigFilePath.data()); config.loadPacmanConfig(pacmanConfigFilePath.data());
} catch (const ios_base::failure &e) { } catch (const ios_base::failure &e) {
cerr << Phrases::ErrorMessage << "An IO error occured when loading pacman config: " << e.what() << Phrases::EndFlush; cerr << Phrases::ErrorMessage << "An IO error occurred when loading pacman config: " << e.what() << Phrases::EndFlush;
} catch (const runtime_error &e) { } catch (const runtime_error &e) {
cerr << Phrases::ErrorMessage << "An error occured when loading pacman config: " << e.what() << Phrases::EndFlush; cerr << Phrases::ErrorMessage << "An error occurred when loading pacman config: " << e.what() << Phrases::EndFlush;
} }
// add databases declared in config // add databases declared in config
@ -485,9 +485,9 @@ std::size_t ServiceSetup::restoreState()
cerr << Phrases::SubMessage << "Restored build actions from cache file 😌" << Phrases::EndFlush; cerr << Phrases::SubMessage << "Restored build actions from cache file 😌" << Phrases::EndFlush;
} }
} catch (const ConversionException &) { } catch (const ConversionException &) {
cerr << Phrases::WarningMessage << "A conversion error occured when restoring cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush; cerr << Phrases::WarningMessage << "A conversion error occurred when restoring cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush;
} catch (const ios_base::failure &) { } catch (const ios_base::failure &) {
cerr << Phrases::WarningMessage << "An IO error occured when restoring cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush; cerr << Phrases::WarningMessage << "An IO error occurred when restoring cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush;
} }
// restore build actions from JSON file // restore build actions from JSON file
@ -573,7 +573,7 @@ std::size_t ServiceSetup::saveState()
cacheFile.close(); cacheFile.close();
cerr << Phrases::SuccessMessage << "Wrote cache file \"" << cacheFilePath << "\", " << dataSizeToString(size) << Phrases::EndFlush; cerr << Phrases::SuccessMessage << "Wrote cache file \"" << cacheFilePath << "\", " << dataSizeToString(size) << Phrases::EndFlush;
} catch (const ios_base::failure &) { } catch (const ios_base::failure &) {
cerr << Phrases::WarningMessage << "An IO error occured when dumping the cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush; cerr << Phrases::WarningMessage << "An IO error occurred when dumping the cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush;
} }
// write build actions to a JSON file to be able to restore build actions even if the cache file can not be used due to version mismatch // write build actions to a JSON file to be able to restore build actions even if the cache file can not be used due to version mismatch
@ -661,7 +661,7 @@ void ServiceSetup::Locks::clear()
for (auto i = m_locksByName.begin(), end = m_locksByName.end(); i != end;) { for (auto i = m_locksByName.begin(), end = m_locksByName.end(); i != end;) {
if (auto lock2 = i->second.tryLockToWrite(log, std::string(i->first)); lock2.lock()) { // check whether nobody holds the lock anymore if (auto lock2 = i->second.tryLockToWrite(log, std::string(i->first)); lock2.lock()) { // check whether nobody holds the lock anymore
lock2.lock().unlock(); // ~shared_mutex(): The behavior is undefined if the mutex is owned by any thread [...]. lock2.lock().unlock(); // ~shared_mutex(): The behavior is undefined if the mutex is owned by any thread [...].
m_locksByName.erase(i++); // we can be sure no other thead aquires i->second in the meantime because we're holding m_mutex m_locksByName.erase(i++); // we can be sure no other thead acquires i->second in the meantime because we're holding m_mutex
} else { } else {
++i; ++i;
} }

View File

@ -96,7 +96,7 @@ void BuildActionsTests::tearDown()
/*! /*!
* \brief Assigns certain build variables to use fake scripts (instead of invoking e.g. the real makepkg). * \brief Assigns certain build variables to use fake scripts (instead of invoking e.g. the real makepkg).
* \remarks The fake scripts are esentially no-ops which merely print the script name and the passed arguments. * \remarks The fake scripts are essentially no-ops which merely print the script name and the passed arguments.
*/ */
void BuildActionsTests::loadBasicTestSetup() void BuildActionsTests::loadBasicTestSetup()
{ {

View File

@ -435,11 +435,11 @@ void postBuildActionsFromTask(const Params &params, ResponseHandler &&handler, c
// show error when parameters are specified which are only supposed to be specified when starting a single build action // show error when parameters are specified which are only supposed to be specified when starting a single build action
if (!params.target.value("source-repo").empty()) { if (!params.target.value("source-repo").empty()) {
handler(makeBadRequest(params.request(), "the source repo can not be explicitely specified when a task is specified")); handler(makeBadRequest(params.request(), "the source repo can not be explicitly specified when a task is specified"));
return; return;
} }
if (!params.target.value("destination-repo").empty()) { if (!params.target.value("destination-repo").empty()) {
handler(makeBadRequest(params.request(), "the destination repo can not be explicitely specified when a task is specified")); handler(makeBadRequest(params.request(), "the destination repo can not be explicitly specified when a task is specified"));
return; return;
} }

View File

@ -29,7 +29,7 @@ int main(int argc, const char *argv[])
loadPacmanConfigArg.setCombinable(true); loadPacmanConfigArg.setCombinable(true);
ConfigValueArgument pacmanConfigPathArg("pacman-config-path", '\0', "specifies the path of the pacman config file", { "path" }); ConfigValueArgument pacmanConfigPathArg("pacman-config-path", '\0', "specifies the path of the pacman config file", { "path" });
loadPacmanConfigArg.setSubArguments({ &pacmanConfigPathArg }); loadPacmanConfigArg.setSubArguments({ &pacmanConfigPathArg });
ConfigValueArgument fileNameArg("file-name", 'f', "specifies the file name to seach for", { "name" }); ConfigValueArgument fileNameArg("file-name", 'f', "specifies the file name to search for", { "name" });
fileNameArg.setImplicit(true); fileNameArg.setImplicit(true);
fileNameArg.setRequired(true); fileNameArg.setRequired(true);
Argument regexArg("regex", 'r', "use regex to match the file name (--file-name is considered a regex)"); Argument regexArg("regex", 'r', "use regex to match the file name (--file-name is considered a regex)");

View File

@ -36,7 +36,7 @@
<img src="img/logo.svg" alt="Logo" /> <img src="img/logo.svg" alt="Logo" />
</a> </a>
Repository Manager for Arch Linux<br /> Repository Manager for Arch Linux<br />
<span><em>Inofficial</em> tool to build packages and manage repositories</span> <span><em>Unofficial</em> tool to build packages and manage repositories</span>
</div> </div>
<ul> <ul>
<li id="global-nav-link"> <li id="global-nav-link">

View File

@ -542,7 +542,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
}, },
}, },
}); });
case 7: { // reporitory problems case 7: { // repository problems
const container = document.createElement('div'); const container = document.createElement('div');
container.className = 'repo-problems'; container.className = 'repo-problems';
for (const [database, problems] of Object.entries(value.data)) { for (const [database, problems] of Object.entries(value.data)) {
@ -551,7 +551,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
columnHeaders: ['Related package', 'Problem description'], columnHeaders: ['Related package', 'Problem description'],
columnAccessors: ['pkg', 'desc'], columnAccessors: ['pkg', 'desc'],
customRenderer: { customRenderer: {
note: problems.length + ' problems in reporitory ' + database, note: problems.length + ' problems in repository ' + database,
desc: function(value) { desc: function(value) {
switch(value.index) { switch(value.index) {
case 1: case 1: