diff --git a/CHANGELOG.md b/CHANGELOG.md index b238ff481..6e7dd7dae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +# 5.1.11 + +- Update translations from weblate +- Fix `--skip-unavailable` documentation +- Make `cachedir`, `system_cachedir` relative to `installroot` +- Workaround for swig-4.2.0 missing fragment dependency +- Add `repoquery --recursive` option +- Add `repoquery --providers-of=PACKAGE_ATTRIBUTE` option +- Update documentation of repoquery +- Update documentation for remove command behavior +- Limit search pattern for remove command to NEVRAs and files +- Packaging: Require an exact release of libdnf5-cli by dnf5-plugins +- Disable zchunk on RHEL +- Add dnf5.conf man page +- Add RPM package Group attribute to dnf5daemon-server +- Document changes related to caching +- Document caching man page +- Document Global Option `--help-cmd` dropped +- log_event: Correct message for HINT_ICASE + # 5.1.10 - Document dnf5 plugins @@ -69,7 +89,7 @@ - modules: Simplify finding whether profile is default in module list - modules: Fix `ModuleProfile::is_default` method - modules: Store if profile is default in ModuleProfile object -- Generate docs for undocummented functions so they at least show up +- Generate docs for undocumented functions so they at least show up - Add python advisory docs - Add advisory python API tests - Enable AdvisoryModule bindings @@ -156,7 +176,7 @@ - Abort PGP checking immediately if any checks fail - Display warning message when any PGP checks skipped - Don't allow main gpgcheck=0 to override repo config -- gups and environments to `history info` ouput +- gups and environments to `history info` output - Store missing id and repoid in db for groups/environments - Fix out-of-bounds access in Goal::Impl::add_install_to_goal - Fix repoquery `--list` diff --git a/VERSION.cmake b/VERSION.cmake index 45370087e..e1bc74f30 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,6 +1,6 @@ set(DEFAULT_PROJECT_VERSION_MAJOR 5) set(DEFAULT_PROJECT_VERSION_MINOR 1) -set(DEFAULT_PROJECT_VERSION_PATCH 10) +set(DEFAULT_PROJECT_VERSION_PATCH 11) if(DEFINED PROJECT_VERSION_MAJOR) if(NOT ${DEFAULT_PROJECT_VERSION_MAJOR} STREQUAL ${PROJECT_VERSION_MAJOR}) diff --git a/bindings/libdnf5/common.i b/bindings/libdnf5/common.i index f37cd8f70..6a03c9f6c 100644 --- a/bindings/libdnf5/common.i +++ b/bindings/libdnf5/common.i @@ -134,6 +134,35 @@ del ClassName##__iter__ #endif %enddef +%define add_str(ClassName) +#if defined(SWIGPYTHON) +%extend ClassName { + std::string __str__() const { + return $self->to_string(); + } +} +#endif +%enddef + +%define add_repr(ClassName) +#if defined(SWIGPYTHON) +%extend ClassName { + std::string __repr__() const { + return $self->to_string_description(); + } +} +#endif +%enddef + +%define add_hash(ClassName) +#if defined(SWIGPYTHON) +%extend ClassName { + int __hash__() const { + return $self->get_hash(); + } +} +#endif +%enddef %{ #include "libdnf5/common/sack/query.hpp" diff --git a/bindings/libdnf5/repo.i b/bindings/libdnf5/repo.i index ab1e74f2d..63bdd770b 100644 --- a/bindings/libdnf5/repo.i +++ b/bindings/libdnf5/repo.i @@ -15,6 +15,11 @@ %import "common.i" %import "conf.i" +#if SWIG_VERSION == 0x040200 +// https://github.com/swig/swig/issues/2744 +%fragment("SwigPyIterator_T"); +#endif + %exception { try { $action diff --git a/bindings/libdnf5/rpm.i b/bindings/libdnf5/rpm.i index 12f5f0fed..fb8d36872 100644 --- a/bindings/libdnf5/rpm.i +++ b/bindings/libdnf5/rpm.i @@ -29,6 +29,7 @@ } } + %{ #include "libdnf5/rpm/arch.hpp" #include "libdnf5/rpm/checksum.hpp" @@ -61,12 +62,19 @@ %include "libdnf5/rpm/package_sack.hpp" %template(PackageSackWeakPtr) libdnf5::WeakPtr; +add_str(libdnf5::rpm::Reldep) +add_repr(libdnf5::rpm::Reldep) +add_hash(libdnf5::rpm::Reldep) %include "libdnf5/rpm/reldep.hpp" %rename(next) libdnf5::rpm::ReldepListIterator::operator++(); %rename(value) libdnf5::rpm::ReldepListIterator::operator*(); %include "libdnf5/rpm/reldep_list_iterator.hpp" %include "libdnf5/rpm/reldep_list.hpp" + +add_str(libdnf5::rpm::Package) +add_repr(libdnf5::rpm::Package) +add_hash(libdnf5::rpm::Package) %include "libdnf5/rpm/package.hpp" %template(VectorPackage) std::vector; diff --git a/bindings/perl5/CMakeLists.txt b/bindings/perl5/CMakeLists.txt index 1419b1848..29621652f 100644 --- a/bindings/perl5/CMakeLists.txt +++ b/bindings/perl5/CMakeLists.txt @@ -59,7 +59,7 @@ elseif(PERL_INSTALLDIRS STREQUAL "vendor") elseif(PERL_INSTALLDIRS STREQUAL "site") set(PERL_INSTALL_PATH "${PERL_SITEARCH}") else() - message(FATAL_ERROR "Uknown PERL_INSTALLDIRS value: ${PERL_INSTALLDIRS}") + message(FATAL_ERROR "Unknown PERL_INSTALLDIRS value: ${PERL_INSTALLDIRS}") endif() message(STATUS "Perl5 files will be installed to ${PERL_INSTALL_PATH}") diff --git a/bindings/python3/CMakeLists.txt b/bindings/python3/CMakeLists.txt index b45f47ad8..addc6b8ef 100644 --- a/bindings/python3/CMakeLists.txt +++ b/bindings/python3/CMakeLists.txt @@ -15,16 +15,16 @@ function(add_python3_module LIBRARY_NAME MODULE_NAME) set(SWIG_COMPILE_OPTIONS ${SWIG_COMPILE_OPTIONS} -Wno-redundant-decls ) - # Currenly the SWIG_PYTHON_SILENT_MEMLEAK controls only whether message: + # Currently the SWIG_PYTHON_SILENT_MEMLEAK controls only whether message: # "swig/python detected a memory leak of type '%s', no destructor found." is printed, used here: # https://github.com/swig/swig/blob/33f6a2d0b2c3d90b928f56ddfa599afe87903f76/Lib/python/pyrun.swg#L776 - # We want to supress this message due to a bug in Python part of swig. + # We want to suppress this message due to a bug in Python part of swig. # The core of the issue is that Python Swig has a global list of types used in all swig modules. This is # needed because the modules are interlinked eg. libdnf5::Base is used in all of them. During finalization # of the Python runtime unused modules are cleaned up before garbage collector runs and cleans global objects. - # This can result in a situation where for example libdnf5.advisory module is destoyed, removing its types - # from the global swig types list includeing libdnf5.base.Base, and only after that a global libdnf5.base.Base - # is garbage collected which is now missing type information -> no destructor can be called -> swig want's to + # This can result in a situation where for example libdnf5.advisory module is destroyed, removing its types + # from the global swig types list including libdnf5.base.Base, and only after that a global libdnf5.base.Base + # is garbage collected which is now missing type information -> no destructor can be called -> swig wants to # print the message # There is an issue reported on SWIG with the same root cause: https://github.com/swig/swig/issues/2037 it # also contains more details. diff --git a/common/utils/regex.hpp b/common/utils/regex.hpp index 1ce2c153c..d8039cbf1 100644 --- a/common/utils/regex.hpp +++ b/common/utils/regex.hpp @@ -21,7 +21,7 @@ along with libdnf. If not, see . #define LIBDNF5_UTILS_REGEX_HPP -// Limit the string legth, because GCC std::regex_match() exhausts a stack on very long strings. +// Limit the string length, because GCC std::regex_match() exhausts a stack on very long strings. #define MAX_STRING_LENGTH_FOR_REGEX_MATCH 2 << 10 diff --git a/dnf5-plugins/builddep_plugin/builddep.cpp b/dnf5-plugins/builddep_plugin/builddep.cpp index 49d5d079c..b75b009b6 100644 --- a/dnf5-plugins/builddep_plugin/builddep.cpp +++ b/dnf5-plugins/builddep_plugin/builddep.cpp @@ -270,7 +270,7 @@ void BuildDepCommand::run() { auto goal = get_context().get_goal(); goal->set_allow_erasing(allow_erasing->get_value()); - // Search only for solution in provides and files. Use buildrequire with name search migh result in inconsistent + // Search only for solution in provides and files. Use buildrequire with name search might result in inconsistent // behavior with installing dependencies of RPMs libdnf5::GoalJobSettings settings; settings.with_nevra = false; diff --git a/dnf5-plugins/builddep_plugin/po/cs.po b/dnf5-plugins/builddep_plugin/po/cs.po index 2082fa9b3..9324f17d2 100644 --- a/dnf5-plugins/builddep_plugin/po/cs.po +++ b/dnf5-plugins/builddep_plugin/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5-plugins/builddep_plugin/po/ka.po b/dnf5-plugins/builddep_plugin/po/ka.po index 576816615..49baf67e5 100644 --- a/dnf5-plugins/builddep_plugin/po/ka.po +++ b/dnf5-plugins/builddep_plugin/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: builddep.cpp:84 +msgid "" +"Invalid value for macro definition \"{}\". \"macro expr\" format expected." +msgstr "" + +#. failed to parse some of inputs (invalid spec, no package matched...) +#: builddep.cpp:266 +msgid "Failed to parse some inputs." +msgstr "" diff --git a/dnf5-plugins/changelog_plugin/po/cs.po b/dnf5-plugins/changelog_plugin/po/cs.po index 0f998fa06..a642d8d6c 100644 --- a/dnf5-plugins/changelog_plugin/po/cs.po +++ b/dnf5-plugins/changelog_plugin/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5-plugins/changelog_plugin/po/ka.po b/dnf5-plugins/changelog_plugin/po/ka.po index 1baf43019..77b2098e3 100644 --- a/dnf5-plugins/changelog_plugin/po/ka.po +++ b/dnf5-plugins/changelog_plugin/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: changelog.cpp:60 +msgid "" +"Invalid date passed: \"{}\". Dates in \"YYYY-MM-DD\" format are expected" +msgstr "" diff --git a/dnf5-plugins/config-manager_plugin/addrepo.cpp b/dnf5-plugins/config-manager_plugin/addrepo.cpp index 9ab306a46..80c129c4c 100644 --- a/dnf5-plugins/config-manager_plugin/addrepo.cpp +++ b/dnf5-plugins/config-manager_plugin/addrepo.cpp @@ -181,7 +181,8 @@ void ConfigManagerAddRepoCommand::set_argument_parser() { const char * value) { auto val = strchr(value + 1, '='); if (!val) { - throw cli::ArgumentParserError(M_("set: Badly formatted argument value \"{}\""), std::string{value}); + throw cli::ArgumentParserError( + M_("{}: Badly formatted argument value \"{}\""), std::string{"set"}, std::string{value}); } std::string key{value, val}; std::string key_value{val + 1}; diff --git a/dnf5-plugins/config-manager_plugin/addrepo.hpp b/dnf5-plugins/config-manager_plugin/addrepo.hpp index 702b62013..254afb989 100644 --- a/dnf5-plugins/config-manager_plugin/addrepo.hpp +++ b/dnf5-plugins/config-manager_plugin/addrepo.hpp @@ -71,7 +71,7 @@ class ConfigManagerAddRepoCommand : public Command { /// Tests if the repositories IDs in the vector do not already exist in the configuration. /// @param repo_ids List of repositories IDs to check. - /// @param ignore_path The file in this path will be ignored/skiped. + /// @param ignore_path The file in this path will be ignored/skipped. /// @throws ConfigManagerError Trown if an already existent repository ID was found. void test_if_ids_not_already_exist( const std::vector & repo_ids, const std::filesystem::path & ignore_path) const; diff --git a/dnf5-plugins/config-manager_plugin/po/cs.po b/dnf5-plugins/config-manager_plugin/po/cs.po index 23c3cacaa..a0956116d 100644 --- a/dnf5-plugins/config-manager_plugin/po/cs.po +++ b/dnf5-plugins/config-manager_plugin/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5-plugins/config-manager_plugin/po/ka.po b/dnf5-plugins/config-manager_plugin/po/ka.po index 27e4d96f1..991622309 100644 --- a/dnf5-plugins/config-manager_plugin/po/ka.po +++ b/dnf5-plugins/config-manager_plugin/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: addrepo.cpp:152 +msgid "from-repofile: \"{}\" file does not exist" +msgstr "" + +#: addrepo.cpp:155 +msgid "from-repofile: {}" +msgstr "" + +#: addrepo.cpp:184 +msgid "set: Badly formatted argument value \"{}\"" +msgstr "" + +#: addrepo.cpp:194 +msgid "Cannot set repository option \"{}={}\": {}" +msgstr "" + +#: addrepo.cpp:202 setopt.cpp:136 +msgid "Sets the \"{}\" option again with a different value: \"{}\" != \"{}\"" +msgstr "" + +#: addrepo.cpp:268 +msgid "Missing path to repository configuration directory" +msgstr "" + +#: addrepo.cpp:318 +msgid "Failed to copy repository configuration file \"{}\": {}" +msgstr "" + +#: addrepo.cpp:329 +msgid "Failed to download repository configuration file \"{}\": {}" +msgstr "" + +#: addrepo.cpp:351 +msgid "" +"Error in added repository configuration file. Cannot set repository option " +"\"{}={}\": {}" +msgstr "" + +#: addrepo.cpp:385 +msgid "Bad baseurl: {}={}" +msgstr "" + +#: addrepo.cpp:393 +msgid "" +"One of --from-repofile=, --set=baseurl=, --set=mirrorlist=, --" +"set=metalink= must be set to a non-empty URL" +msgstr "" + +#: addrepo.cpp:438 +msgid "Failed to save repository configuration file \"{}\": {}" +msgstr "" + +#: addrepo.cpp:460 +msgid "" +"File \"{}\" already exists and configures repositories with IDs \"{}\". Add " +"\"--add-or-replace\" or \"--overwrite\"." +msgstr "" + +#: addrepo.cpp:463 +msgid "" +"File \"{}\" already exists and configures repositories with IDs \"{}\". Add " +"\"--overwrite\" to overwrite." +msgstr "" + +#: addrepo.cpp:483 addrepo.cpp:508 +msgid "A repository with id \"{}\" already configured in file: {}" +msgstr "" + +#: setopt.cpp:82 +msgid "optval: Badly formatted argument value \"{}\"" +msgstr "" + +#: setopt.cpp:90 +msgid "" +"optval: Badly formatted argument value: Last key character cannot be '.': {}" +msgstr "" + +#: setopt.cpp:98 +msgid "optval: Empty repository id is not allowed: {}" +msgstr "" + +#: setopt.cpp:107 +msgid "Cannot set repository option \"{}\": {}" +msgstr "" + +#: setopt.cpp:114 setopt.cpp:177 +msgid "" +"Sets the \"{}\" option of the repository \"{}\" again with a different " +"value: \"{}\" != \"{}\"" +msgstr "" + +#: setopt.cpp:128 +msgid "Cannot set option: \"{}\": {}" +msgstr "" + +#: setopt.cpp:168 +msgid "No matching repository to modify: {}" +msgstr "" + +#: setvar.cpp:49 +msgid "varval: Badly formatted argument value \"{}\"" +msgstr "" + +#: setvar.cpp:60 +msgid "Cannot set \"{}\": Variable \"{}\" is read-only" +msgstr "" + +#: setvar.cpp:68 +msgid "Sets the \"{}\" variable again with a different value: \"{}\" != \"{}\"" +msgstr "" + +#: setvar.cpp:97 unsetvar.cpp:63 +msgid "Missing path to vars directory" +msgstr "" + +#: setvar.cpp:110 +msgid "Cannot write variable to file \"{}\": {}" +msgstr "" + +#: shared.hpp:49 +msgid "" +"The path \"{}\" exists, but it is not a directory or a symlink to a " +"directory." +msgstr "" + +#: shared.hpp:54 +msgid "The path \"{}\" exists, but it is a symlink to a non-existent object." +msgstr "" + +#: shared.hpp:60 +msgid "" +"Directory \"{}\" does not exist. Add \"--create-missing-dir\" to create " +"missing directories." +msgstr "" + +#: shared.hpp:71 +msgid "Variable name can contain only ASCII letters, numbers and '_': {}" +msgstr "" + +#: unsetopt.cpp:65 +msgid "" +"remove-opt: Badly formatted argument value: Last key character cannot be " +"'.': {}" +msgstr "" + +#: unsetopt.cpp:73 +msgid "remove-opt: Empty repository id is not allowed: {}" +msgstr "" + +#: unsetvar.cpp:76 +msgid "Cannot remove variable file \"{}\": {}" +msgstr "" diff --git a/dnf5-plugins/config-manager_plugin/setopt.cpp b/dnf5-plugins/config-manager_plugin/setopt.cpp index 96c7adc37..7a117c38a 100644 --- a/dnf5-plugins/config-manager_plugin/setopt.cpp +++ b/dnf5-plugins/config-manager_plugin/setopt.cpp @@ -79,7 +79,8 @@ void ConfigManagerSetOptCommand::set_argument_parser() { auto value = argv[i]; auto val = strchr(value + 1, '='); if (!val) { - throw cli::ArgumentParserError(M_("optval: Badly formatted argument value \"{}\""), std::string{value}); + throw cli::ArgumentParserError( + M_("{}: Badly formatted argument value \"{}\""), std::string{"optval"}, std::string{value}); } std::string key{value, val}; std::string key_value{val + 1}; @@ -87,15 +88,16 @@ void ConfigManagerSetOptCommand::set_argument_parser() { if (dot_pos != std::string::npos) { if (dot_pos == key.size() - 1) { throw cli::ArgumentParserError( - M_("optval: Badly formatted argument value: Last key character cannot be '.': {}"), + M_("{}: Badly formatted argument value: Last key character cannot be '.': {}"), + std::string{"optval"}, std::string{value}); } - // Save the repository option for later processing (solving glob patter, writing to file). + // Save the repository option for later processing (solving glob pattern, writing to file). auto repo_id = key.substr(0, dot_pos); if (repo_id.empty()) { throw cli::ArgumentParserError( - M_("optval: Empty repository id is not allowed: {}"), std::string{value}); + M_("{}: Empty repository id is not allowed: {}"), std::string{"optval"}, std::string{value}); } auto repo_key = key.substr(dot_pos + 1); diff --git a/dnf5-plugins/config-manager_plugin/setvar.cpp b/dnf5-plugins/config-manager_plugin/setvar.cpp index 8002d3253..2f9911cb1 100644 --- a/dnf5-plugins/config-manager_plugin/setvar.cpp +++ b/dnf5-plugins/config-manager_plugin/setvar.cpp @@ -46,7 +46,7 @@ void ConfigManagerSetVarCommand::set_argument_parser() { auto val = strchr(value + 1, '='); if (!val) { throw cli::ArgumentParserError( - M_("varval: Badly formatted argument value \"{}\""), std::string{value}); + M_("{}: Badly formatted argument value \"{}\""), std::string{"varval"}, std::string{value}); } std::string var_name{value, val}; std::string var_value{val + 1}; diff --git a/dnf5-plugins/config-manager_plugin/unsetopt.cpp b/dnf5-plugins/config-manager_plugin/unsetopt.cpp index 9a8e560de..316008625 100644 --- a/dnf5-plugins/config-manager_plugin/unsetopt.cpp +++ b/dnf5-plugins/config-manager_plugin/unsetopt.cpp @@ -62,15 +62,18 @@ void ConfigManagerUnsetOptCommand::set_argument_parser() { if (dot_pos != std::string::npos) { if (dot_pos == key.size() - 1) { throw cli::ArgumentParserError( - M_("remove-opt: Badly formatted argument value: Last key character cannot be '.': {}"), + M_("{}: Badly formatted argument value: Last key character cannot be '.': {}"), + std::string{"remove-opt"}, std::string{value}); } - // Save the repository option for later processing (solving glob patter, writing to file). + // Save the repository option for later processing (solving glob pattern, writing to file). auto repo_id = key.substr(0, dot_pos); if (repo_id.empty()) { throw cli::ArgumentParserError( - M_("remove-opt: Empty repository id is not allowed: {}"), std::string{value}); + M_("{}: Empty repository id is not allowed: {}"), + std::string{"remove-opt"}, + std::string{value}); } auto repo_key = key.substr(dot_pos + 1); diff --git a/dnf5-plugins/copr_plugin/copr.cpp b/dnf5-plugins/copr_plugin/copr.cpp index 47280f0d1..ce6efd37c 100644 --- a/dnf5-plugins/copr_plugin/copr.cpp +++ b/dnf5-plugins/copr_plugin/copr.cpp @@ -62,7 +62,7 @@ void CoprCommand::register_subcommands() { std::string CoprSubCommandWithID::get_project_spec() { - // The HUB specified in the COPR SPEC arguement has precedence + // The HUB specified in the COPR SPEC argument has precedence // over the --hub argument. std::string hubspec = opt_hub; if (hubspec.empty()) diff --git a/dnf5-plugins/copr_plugin/po/cs.po b/dnf5-plugins/copr_plugin/po/cs.po index 30b2bb7a6..8c0c627c7 100644 --- a/dnf5-plugins/copr_plugin/po/cs.po +++ b/dnf5-plugins/copr_plugin/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5-plugins/copr_plugin/po/ka.po b/dnf5-plugins/copr_plugin/po/ka.po index 39f56b01b..a4873f503 100644 --- a/dnf5-plugins/copr_plugin/po/ka.po +++ b/dnf5-plugins/copr_plugin/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: copr.cpp:48 +msgid "Copr hub (the web-UI/API server) hostname" +msgstr "" + +#: copr.cpp:88 +msgid "" +"Copr project ID to {}. Use either a format OWNER/PROJECT or HUB/OWNER/" +"PROJECT (if HUB is not specified, the default one, or --hub , is used. " +"OWNER is either a username, or a @groupname. PROJECT can be a simple " +"project name, or a \"project directory\" containing colons, e.g. 'project:" +"custom:123'. HUB can be either the Copr frontend hostname (e.g. copr." +"fedorainfracloud.org ) or the shortcut (e.g. fedora). Example: 'fedora/" +"@footeam/coolproject'." +msgstr "" + +#: copr.cpp:106 +msgid "Invalid PROJECT_SPEC format '{}'" +msgstr "" + +#: copr_constants.hpp:27 +msgid "" +"Manage Copr repositories (add-ons provided by users/community/third-party)" +msgstr "" + +#: copr_constants.hpp:29 +msgid "" +"Enabling a Copr repository. Please note that this repository is not part\n" +"of the main distribution, and quality may vary.\n" +"\n" +"The Fedora Project does not exercise any power over the contents of\n" +"this repository beyond the rules outlined in the Copr FAQ at\n" +",\n" +"and packages are not held to any quality or security level.\n" +"\n" +"Please do not file bug reports about these packages in Fedora\n" +"Bugzilla. In case of problems, contact the owner of this repository.\n" +msgstr "" + +#: copr_constants.hpp:41 +msgid "" +"Maintainer of the enabled Copr repository decided to make\n" +"it dependent on other repositories. Such repositories are\n" +"usually necessary for successful installation of RPMs from\n" +"the main Copr repository (they provide runtime dependencies).\n" +"\n" +"Be aware that the note about quality and bug-reporting\n" +"above applies here too, Fedora Project doesn't control the\n" +"content. Please review the list:\n" +"\n" +"{}\n" +"These repositories are being enabled together with the main\n" +"repository.\n" +msgstr "" + +#: copr_debug.cpp:30 +msgid "print useful info about the system, useful for debugging" +msgstr "" + +#: copr_disable.cpp:34 +msgid "" +"disable specified Copr repository (if exists), keep {}/*.repo file - just " +"mark enabled=0" +msgstr "" + +#: copr_enable.cpp:37 +msgid "" +"download the repository info from a Copr server and install it as a {}/*." +"repo file" +msgstr "" + +#: copr_enable.cpp:45 +msgid "" +"Chroot specified in the NAME-RELEASE-ARCH format, e.g. 'fedora-rawhide-" +"ppc64le'. When not specified, the 'dnf copr' command attempts to detect it." +msgstr "" + +#: copr_list.cpp:51 +msgid "list Copr repositories" +msgstr "" + +#: copr_remove.cpp:34 +msgid "" +"remove specified Copr repository from the system (removes the {}/*.repo file)" +msgstr "" + +#: copr_repo.cpp:88 +msgid "Directory '{}' not found in '{}' Copr project." +msgstr "" + +#: copr_repo.cpp:94 +msgid "You can use one of these available directories:" +msgstr "" + +#: copr_repo.cpp:110 +msgid "Chroot not found in the given Copr project" +msgstr "" + +#: copr_repo.cpp:112 +msgid "Unable to detect chroot, specify it explicitly." +msgstr "" + +#: copr_repo.cpp:118 +msgid "We tried to find these repos without a success:" +msgstr "" + +#: copr_repo.cpp:123 +msgid "You can choose one of the available chroots explicitly:" +msgstr "" + +#: copr_repo.cpp:197 +msgid "Can't parse Copr repo spec: " +msgstr "" + +#: copr_repo.cpp:335 +msgid "Can't remove the {} repo file" +msgstr "" + +#: copr_repo.cpp:338 +msgid "Repo file {} successfully removed" +msgstr "" + +#: copr_repo.cpp:384 +msgid "Can't find {} item in {}" +msgstr "" + +#: copr_repo.cpp:440 +msgid "Removing old config file '{}'" +msgstr "" + +#: copr_repo.cpp:443 +msgid "Can't remove" +msgstr "" + +#: copr_repo.cpp:517 +msgid "" +"Copr repofile '{}' has an old format, fix by re-enabling it $ {} copr enable " +"{}" +msgstr "" + +#: copr_repo.cpp:551 +msgid "Repo id '{}' in '{}' is suspicious" +msgstr "" + +#: copr_repo.cpp:558 +msgid "Repo id '{}' doesn't belong to '{}' repofile" +msgstr "" + +#: copr_repo.cpp:608 +msgid "Copr repository '{}' in '{}' disabled." +msgstr "" + +#: copr_repo.cpp:622 copr_repo.cpp:647 +msgid "Repository '{}' not found on this system" +msgstr "" diff --git a/dnf5-plugins/needs_restarting_plugin/po/cs.po b/dnf5-plugins/needs_restarting_plugin/po/cs.po index 83fdc0000..ee7a188ac 100644 --- a/dnf5-plugins/needs_restarting_plugin/po/cs.po +++ b/dnf5-plugins/needs_restarting_plugin/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5-plugins/needs_restarting_plugin/po/ka.po b/dnf5-plugins/needs_restarting_plugin/po/ka.po index 2c3670081..4802ae20e 100644 --- a/dnf5-plugins/needs_restarting_plugin/po/ka.po +++ b/dnf5-plugins/needs_restarting_plugin/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: 2024-01-11 10:48+0000\n" +"Last-Translator: Luna Jernberg \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.3.1\n" + +#: needs_restarting.cpp:231 +msgid "Couldn't connect to D-Bus: {}" +msgstr "Kunde inte ansluta till D-Bus: {}" diff --git a/dnf5-plugins/repoclosure_plugin/po/cs.po b/dnf5-plugins/repoclosure_plugin/po/cs.po index 4ba73a979..f8dba6fc4 100644 --- a/dnf5-plugins/repoclosure_plugin/po/cs.po +++ b/dnf5-plugins/repoclosure_plugin/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5-plugins/repoclosure_plugin/po/ka.po b/dnf5-plugins/repoclosure_plugin/po/ka.po index 637c4fcfa..d39a43990 100644 --- a/dnf5-plugins/repoclosure_plugin/po/ka.po +++ b/dnf5-plugins/repoclosure_plugin/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: repoclosure.cpp:45 +msgid "Print list of unresolved dependencies for repositories" +msgstr "" + +#: repoclosure.cpp:150 +msgid "No match for argument \"{}\"." +msgstr "" + +#: repoclosure.cpp:156 +msgid "Failed to resolve package specifications." +msgstr "" + +#: repoclosure.cpp:211 +msgid "" +"Error: Repoclosure ended with unresolved dependencies ({}) across {} " +"packages." +msgstr "" diff --git a/dnf5.spec b/dnf5.spec index 4eda04ba4..6ca0f27f4 100644 --- a/dnf5.spec +++ b/dnf5.spec @@ -1,6 +1,6 @@ %global project_version_major 5 %global project_version_minor 1 -%global project_version_patch 10 +%global project_version_patch 11 %bcond dnf5_obsoletes_dnf %[0%{?fedora} > 40 || 0%{?rhel} > 10] @@ -77,7 +77,11 @@ Provides: dnf5-command(makecache) %bcond_without comps %bcond_without modulemd +%if 0%{?rhel} +%bcond_with zchunk +%else %bcond_without zchunk +%endif %bcond_with html %if 0%{?rhel} == 8 @@ -283,6 +287,7 @@ It supports RPM packages, modulemd modules, and comps groups & environments. %{_mandir}/man8/dnf5-search.8.* %{_mandir}/man8/dnf5-swap.8.* %{_mandir}/man8/dnf5-upgrade.8.* +%{_mandir}/man7/dnf5-caching.7.* %{_mandir}/man7/dnf5-comps.7.* # TODO(jkolarik): filtering is not ready yet # %%{_mandir}/man7/dnf5-filtering.7.* @@ -291,6 +296,9 @@ It supports RPM packages, modulemd modules, and comps groups & environments. # TODO(jkolarik): modularity is not ready yet # %%{_mandir}/man7/dnf5-modularity.7.* %{_mandir}/man7/dnf5-specs.7.* +%{_mandir}/man5/dnf5.conf.5.* +%{_mandir}/man5/dnf5.conf-todo.5.* +%{_mandir}/man5/dnf5.conf-deprecated.5.* # ========== libdnf5 ========== %package -n libdnf5 @@ -354,7 +362,7 @@ Requires: libdnf5-devel%{?_isa} = %{version}-%{release} Requires: libdnf5-cli-devel%{?_isa} = %{version}-%{release} %description -n dnf5-devel -Develpment files for dnf5. +Development files for dnf5. %files -n dnf5-devel %{_includedir}/dnf5/ @@ -647,6 +655,7 @@ Summary: Plugins for dnf5 License: LGPL-2.1-or-later Requires: dnf5%{?_isa} = %{version}-%{release} Requires: libcurl%{?_isa} >= 7.62.0 +Requires: libdnf5-cli%{?_isa} = %{version}-%{release} Provides: dnf5-command(builddep) Provides: dnf5-command(changelog) Provides: dnf5-command(config-manager) @@ -759,6 +768,9 @@ ln -sr %{buildroot}%{_bindir}/dnf5 %{buildroot}%{_bindir}/microdnf %ldconfig_scriptlets %changelog +* Thu Jan 11 2024 Packit Team - 5.1.11-1 +- New upstream release 5.1.11 + * Tue Jan 02 2024 Packit Team - 5.1.10-1 - New upstream release 5.1.10 diff --git a/dnf5/cmdline_aliases.cpp b/dnf5/cmdline_aliases.cpp index 286e1b5d0..cd974ce95 100644 --- a/dnf5/cmdline_aliases.cpp +++ b/dnf5/cmdline_aliases.cpp @@ -82,7 +82,7 @@ bool attach_named_args( } if (!attached_arg_id_path) { auto msg = fmt::format( - "Mising attribute \"id_path\" for alias \"{}\" in file \"{}\"", alias_id_path, path.native()); + "Missing attribute \"id_path\" for alias \"{}\" in file \"{}\"", alias_id_path, path.native()); logger.error("{}", msg); std::cerr << msg << std::endl; return false; @@ -124,7 +124,7 @@ void load_aliases_from_toml_file(Context & context, const fs::path & config_file std::cerr << msg << std::endl; return; } catch (const std::out_of_range & e) { - auto msg = fmt::format("Mising attribute \"version\" in file \"{}\"", config_file_path.native()); + auto msg = fmt::format("Missing attribute \"version\" in file \"{}\"", config_file_path.native()); logger->error("{}", msg); std::cerr << msg << std::endl; return; @@ -173,7 +173,7 @@ void load_aliases_from_toml_file(Context & context, const fs::path & config_file } catch (const libdnf5::cli::ArgumentParserNotFoundError & e) { auto location = element_options.location(); auto msg = fmt::format( - "Parent commant \"{}\" not found: {}: Requested in file \"{}\" on line {}: {}", + "Parent command \"{}\" not found: {}: Requested in file \"{}\" on line {}: {}", element_parent_id_path, e.what(), config_file_path.native(), @@ -211,7 +211,7 @@ void load_aliases_from_toml_file(Context & context, const fs::path & config_file } } catch (const std::out_of_range & e) { auto msg = fmt::format( - "Mising attribute \"type\" for element \"{}\" in file \"{}\"", + "Missing attribute \"type\" for element \"{}\" in file \"{}\"", element_id_path, config_file_path.native()); logger->error("{}", msg); @@ -288,7 +288,7 @@ void load_aliases_from_toml_file(Context & context, const fs::path & config_file if (!header) { auto msg = fmt::format( - "Mising attribute \"header\" for element \"{}\" in file \"{}\"", + "Missing attribute \"header\" for element \"{}\" in file \"{}\"", element_id_path, config_file_path.native()); logger->error("{}", msg); @@ -391,7 +391,7 @@ void load_aliases_from_toml_file(Context & context, const fs::path & config_file if (!source) { auto msg = fmt::format( - "Mising attribute \"source\" for named argument \"{}\" in file \"{}\"", + "Missing attribute \"source\" for named argument \"{}\" in file \"{}\"", element_id_path, config_file_path.native()); logger->error("{}", msg); @@ -604,7 +604,7 @@ void load_aliases_from_toml_file(Context & context, const fs::path & config_file if (!attached_command) { auto msg = fmt::format( - "Mising attribute \"attached_command\" for command \"{}\" in file \"{}\"", + "Missing attribute \"attached_command\" for command \"{}\" in file \"{}\"", element_id_path, config_file_path.native()); logger->error("{}", msg); diff --git a/dnf5/commands/group/group_install.cpp b/dnf5/commands/group/group_install.cpp index 0c14c787b..a8cfd0383 100644 --- a/dnf5/commands/group/group_install.cpp +++ b/dnf5/commands/group/group_install.cpp @@ -39,6 +39,7 @@ void GroupInstallCommand::set_argument_parser() { no_packages = std::make_unique(*this); group_specs = std::make_unique(*this, ArgumentParser::PositionalArg::AT_LEAST_ONE); + allow_erasing = std::make_unique(*this); auto skip_unavailable = std::make_unique(*this); auto skip_broken = std::make_unique(*this); create_allow_downgrade_options(*this); @@ -56,6 +57,7 @@ void GroupInstallCommand::configure() { void GroupInstallCommand::run() { auto & ctx = get_context(); auto goal = ctx.get_goal(); + goal->set_allow_erasing(allow_erasing->get_value()); libdnf5::GoalJobSettings settings; if (no_packages->get_value()) { diff --git a/dnf5/commands/group/group_install.hpp b/dnf5/commands/group/group_install.hpp index d09d17c3a..a93c6ef80 100644 --- a/dnf5/commands/group/group_install.hpp +++ b/dnf5/commands/group/group_install.hpp @@ -23,6 +23,7 @@ along with libdnf. If not, see . #include "arguments.hpp" #include +#include #include #include @@ -38,6 +39,8 @@ class GroupInstallCommand : public Command { void configure() override; void run() override; + std::unique_ptr allow_erasing; + std::unique_ptr with_optional{nullptr}; std::unique_ptr no_packages{nullptr}; std::unique_ptr group_specs{nullptr}; diff --git a/dnf5/commands/group/group_remove.cpp b/dnf5/commands/group/group_remove.cpp index 2b2bf569f..5938ca0b3 100644 --- a/dnf5/commands/group/group_remove.cpp +++ b/dnf5/commands/group/group_remove.cpp @@ -57,6 +57,9 @@ void GroupRemoveCommand::run() { for (const auto & spec : group_specs->get_value()) { goal->add_group_remove(spec, libdnf5::transaction::TransactionItemReason::USER, settings); } + + // To enable removal of dependency packages it requires to use allow_erasing + goal->set_allow_erasing(true); } } // namespace dnf5 diff --git a/dnf5/commands/group/group_upgrade.cpp b/dnf5/commands/group/group_upgrade.cpp index 93f6c275b..940f3f31e 100644 --- a/dnf5/commands/group/group_upgrade.cpp +++ b/dnf5/commands/group/group_upgrade.cpp @@ -37,6 +37,7 @@ void GroupUpgradeCommand::set_argument_parser() { group_specs = std::make_unique(*this, ArgumentParser::PositionalArg::AT_LEAST_ONE); + allow_erasing = std::make_unique(*this); auto skip_unavailable = std::make_unique(*this); create_allow_downgrade_options(*this); } @@ -52,7 +53,7 @@ void GroupUpgradeCommand::configure() { void GroupUpgradeCommand::run() { auto & ctx = get_context(); auto goal = ctx.get_goal(); - goal->set_allow_erasing(true); + goal->set_allow_erasing(allow_erasing->get_value()); libdnf5::GoalJobSettings settings; for (const auto & spec : group_specs->get_value()) { diff --git a/dnf5/commands/group/group_upgrade.hpp b/dnf5/commands/group/group_upgrade.hpp index 5506e02a5..dd1a1c3f4 100644 --- a/dnf5/commands/group/group_upgrade.hpp +++ b/dnf5/commands/group/group_upgrade.hpp @@ -23,6 +23,7 @@ along with libdnf. If not, see . #include "arguments.hpp" #include +#include #include #include @@ -38,6 +39,8 @@ class GroupUpgradeCommand : public Command { void configure() override; void run() override; + std::unique_ptr allow_erasing; + std::unique_ptr group_specs{nullptr}; }; diff --git a/dnf5/commands/history/history_store.cpp b/dnf5/commands/history/history_store.cpp index 0d3019f92..9cba0f036 100644 --- a/dnf5/commands/history/history_store.cpp +++ b/dnf5/commands/history/history_store.cpp @@ -60,7 +60,7 @@ void HistoryStoreCommand::run() { if (std::filesystem::exists(tmp_path)) { std::cout << libdnf5::utils::sformat( _("File \"{}\" already exists, it will be overwritten.\n"), tmp_path.string()); - // ask user for the file overwride confirmation + // ask user for the file overwrite confirmation if (!libdnf5::cli::utils::userconfirm::userconfirm(get_context().base.get_config())) { throw libdnf5::cli::AbortedByUserError(); } diff --git a/dnf5/commands/list/list.cpp b/dnf5/commands/list/list.cpp index cb8db2cd2..524afd7b9 100644 --- a/dnf5/commands/list/list.cpp +++ b/dnf5/commands/list/list.cpp @@ -109,7 +109,7 @@ void ListCommand::set_argument_parser() { } void ListCommand::configure() { - // TODO(mblaha): do not force expired metadata sync if not explicitely required + // TODO(mblaha): do not force expired metadata sync if not explicitly required pkg_narrow = PkgNarrow::ALL; Context::LoadAvailableRepos load_available = Context::LoadAvailableRepos::ENABLED; bool load_system = true; diff --git a/dnf5/commands/remove/remove.cpp b/dnf5/commands/remove/remove.cpp index 868f1b89c..ca02d3176 100644 --- a/dnf5/commands/remove/remove.cpp +++ b/dnf5/commands/remove/remove.cpp @@ -65,8 +65,16 @@ void RemoveCommand::configure() { void RemoveCommand::run() { auto goal = get_context().get_goal(); + + // Limit remove spec capabity to prevent multiple matches. Remove command should not match anything after performing + // a remove action with the same spec. NEVRA and filenames are the only types that have no overlaps. + libdnf5::GoalJobSettings settings; + settings.with_nevra = true; + settings.with_provides = false; + settings.with_filenames = true; + settings.with_binaries = false; for (const auto & spec : pkg_specs) { - goal->add_remove(spec); + goal->add_remove(spec, settings); } // To enable removal of dependency packages it requires to use allow_erasing goal->set_allow_erasing(true); diff --git a/dnf5/commands/repoquery/repoquery.cpp b/dnf5/commands/repoquery/repoquery.cpp index c55aba764..fa3f11176 100644 --- a/dnf5/commands/repoquery/repoquery.cpp +++ b/dnf5/commands/repoquery/repoquery.cpp @@ -32,12 +32,37 @@ along with libdnf. If not, see . #include #include -#include - namespace dnf5 { using namespace libdnf5::cli; +namespace { + +libdnf5::rpm::PackageQuery repeat_filter( + const std::function & filter, + libdnf5::rpm::PackageQuery & candidates, + const std::vector & arches) { + // Create source query of all considered packages. + // To match dnf4 take arch filter into account. + // (filtering by repo and available/installed is done implicitly by loading only the required metadata) + libdnf5::rpm::PackageQuery all_considered(candidates.get_base()); + if (!arches.empty()) { + all_considered.filter_arch(arches, libdnf5::sack::QueryCmp::GLOB); + } + libdnf5::rpm::PackageQuery done(candidates.get_base(), libdnf5::sack::ExcludeFlags::APPLY_EXCLUDES, true); + while (!candidates.empty()) { + libdnf5::rpm::PackageQuery added = all_considered; + filter(added, candidates); + done.update(candidates); + added.difference(done); + candidates = added; + } + + return done; +} + +} // namespace + void RepoqueryCommand::set_parent_command() { auto * arg_parser_parent_cmd = get_session().get_argument_parser().get_root_command(); auto * arg_parser_this_cmd = get_argument_parser_command(); @@ -302,6 +327,44 @@ void RepoqueryCommand::set_argument_parser() { disable_modular_filtering = std::make_unique( *this, "disable-modular-filtering", '\0', "Include packages of inactive module streams.", false); + // Allowed values for --providers-of options (these package attributes return ReldepLists) + std::vector pkg_attrs_options{ + "conflicts", + "depends", + "enhances", + "obsoletes", + "provides", + "recommends", + "requires", + "requires_pre", + "suggests", + "supplements", + "", // empty when option is not used + }; + providers_of_option = dynamic_cast *>( + parser.add_init_value(std::make_unique>("", pkg_attrs_options))); + auto * providers_of = parser.add_new_named_arg("providersof"); + std::string allowed_values = libdnf5::utils::string::join(pkg_attrs_options, ", "); + // Drop the empty option from the description of supported values + allowed_values.pop_back(); + allowed_values.back() = '.'; + providers_of->set_description( + "After filtering is finished get selected attribute of packages and output packages that provide it. " + "Supports: " + + allowed_values); + providers_of->set_has_value(true); + providers_of->set_long_name("providers-of"); + providers_of->link_value(providers_of_option); + providers_of->set_arg_value_help("PACKAGE_ATTRIBUTE"); + cmd.register_named_arg(providers_of); + + recursive = std::make_unique( + *this, + "recursive", + '\0', + "Used with --whatrequires or --providers-of=requires options to query the packages recursively.", + false); + // FORMATTING OPTIONS: info_option = dynamic_cast( @@ -344,22 +407,9 @@ void RepoqueryCommand::set_argument_parser() { repoquery_formatting->register_argument(changelogs->arg); formatting_conflicts->push_back(changelogs->arg); - std::vector pkg_attrs_options{ - "conflicts", - "depends", - "enhances", - "obsoletes", - "provides", - "recommends", - "requires", - "requires_pre", - "suggests", - "supplements", - "files", - "sourcerpm", - "location", - "", // empty when option is not used - }; + // Add additional supported package attribute getters, all pkg_attrs_options get turned into options + pkg_attrs_options.insert(pkg_attrs_options.begin(), {"files", "sourcerpm", "location"}); + pkg_attr_option = dynamic_cast *>( parser.add_init_value(std::make_unique>("", pkg_attrs_options))); // remove the last empty ("") option, it should not be an arg @@ -394,6 +444,9 @@ void RepoqueryCommand::set_argument_parser() { // --upgrades option returns only available packages, conflict with options // that return only installed packages upgrades->arg->set_conflict_arguments(only_outputs_installed); + + // recursive is not compatible with exactdeps + recursive->arg->add_conflict_argument(*exactdeps->arg); } void RepoqueryCommand::configure() { @@ -419,7 +472,7 @@ void RepoqueryCommand::configure() { context.set_load_available_repos( // available_option is on by default, to check if user specified it we check priority available_option->get_priority() >= libdnf5::Option::Priority::COMMANDLINE || !system_repo_needed || - extras->get_value() || upgrades->get_value() + extras->get_value() || upgrades->get_value() || !providers_of_option->get_value().empty() ? Context::LoadAvailableRepos::ENABLED : Context::LoadAvailableRepos::NONE); @@ -432,7 +485,7 @@ void RepoqueryCommand::configure() { libdnf5::Option::Priority::RUNTIME, libdnf5::METADATA_TYPE_OTHER); } - if ((pkg_attr_option->get_value() == "files") || + if (!file->get_value().empty() || (pkg_attr_option->get_value() == "files") || (libdnf5::cli::output::requires_filelists(query_format_option->get_value()))) { context.base.get_config().get_optional_metadata_types_option().add_item( libdnf5::Option::Priority::RUNTIME, libdnf5::METADATA_TYPE_FILELISTS); @@ -460,6 +513,11 @@ void RepoqueryCommand::configure() { throw libdnf5::cli::ArgumentParserMissingDependentArgumentError( M_("Option \"--exactdeps\" has to be used either with \"--whatrequires\" or \"--whatdepends\"")); } + if (recursive->get_value() && + (whatrequires->get_value().empty() && providers_of_option->get_value() != "requires")) { + throw libdnf5::cli::ArgumentParserMissingDependentArgumentError( + M_("Option \"--recursive\" has to be used either with \"--whatrequires\" or \"--providers-of=requires\"")); + } } void RepoqueryCommand::load_additional_packages() { @@ -714,6 +772,42 @@ void RepoqueryCommand::run() { // APPLY TRANSFORMS - these are not order independent and have to be applied last // They take a set of packages and turn it into a different set of packages + if (recursive->get_value() && !whatrequires->get_value().empty()) { + auto filter_requirers = [&](libdnf5::rpm::PackageQuery & q_in, const libdnf5::rpm::PackageSet & candidates) { + q_in.filter_requires(candidates); + }; + + result_query = repeat_filter(filter_requirers, result_query, arch->get_value()); + } + + if (!providers_of_option->get_value().empty()) { + // Collect reldeps of selected packages + auto rels = libdnf5::cli::output::get_reldeplist_for_attr(result_query, providers_of_option->get_value()); + libdnf5::rpm::PackageQuery providers(ctx.base); + if (!arch->get_value().empty()) { + providers.filter_arch(arch->get_value(), libdnf5::sack::QueryCmp::GLOB); + } + providers.filter_provides(rels); + + // The recursive option is specific to --providers-of=requires + if (recursive->get_value() && providers_of_option->get_value() == "requires") { + auto filter_providers = [&](libdnf5::rpm::PackageQuery & q_in, + const libdnf5::rpm::PackageSet & candidates) { + libdnf5::rpm::ReldepList rels(candidates.get_base()); + for (auto pkg : candidates) { + auto rlds = pkg.get_requires(); + rels.append(rlds); + } + q_in.filter_provides(rels); + }; + + providers = repeat_filter(filter_providers, providers, arch->get_value()); + } + + providers.filter_latest_evr(); + result_query = providers; + } + if (srpm->get_value()) { libdnf5::rpm::PackageQuery srpms(ctx.base, libdnf5::sack::ExcludeFlags::APPLY_EXCLUDES, true); auto only_src_query = result_query; diff --git a/dnf5/commands/repoquery/repoquery.hpp b/dnf5/commands/repoquery/repoquery.hpp index 04269a140..3872d8c62 100644 --- a/dnf5/commands/repoquery/repoquery.hpp +++ b/dnf5/commands/repoquery/repoquery.hpp @@ -75,11 +75,13 @@ class RepoqueryCommand : public Command { std::unique_ptr installonly{nullptr}; std::unique_ptr srpm{nullptr}; std::unique_ptr disable_modular_filtering{nullptr}; + std::unique_ptr changelogs{nullptr}; + std::unique_ptr recursive{nullptr}; libdnf5::OptionBool * querytags_option{nullptr}; libdnf5::OptionString * query_format_option{nullptr}; libdnf5::OptionEnum * pkg_attr_option{nullptr}; - std::unique_ptr changelogs{nullptr}; + libdnf5::OptionEnum * providers_of_option{nullptr}; std::unique_ptr advisory_name{nullptr}; std::unique_ptr advisory_security{nullptr}; diff --git a/dnf5/library.cpp b/dnf5/library.cpp index 978e576e1..fdf652b74 100644 --- a/dnf5/library.cpp +++ b/dnf5/library.cpp @@ -28,7 +28,7 @@ namespace dnf5::utils { Library::Library(const std::string & path) : path(path) { handle = dlopen(path.c_str(), RTLD_LAZY); if (!handle) { - const char * err_msg = dlerror(); // returns localized mesage, problem with later translation + const char * err_msg = dlerror(); // returns localized message, problem with later translation throw std::runtime_error( libdnf5::utils::sformat(_("Cannot load shared library \"{}\": {}"), path, std::string(err_msg))); } @@ -42,7 +42,7 @@ void * Library::get_address(const char * symbol) const { dlerror(); // Clear any existing error void * address = dlsym(handle, symbol); if (!address) { - const char * err_msg = dlerror(); // returns localized mesage, problem with later translation + const char * err_msg = dlerror(); // returns localized message, problem with later translation if (err_msg) { throw std::runtime_error(libdnf5::utils::sformat( _("Cannot obtain address of symbol \"{}\": {}"), std::string(symbol), std::string(err_msg))); diff --git a/dnf5/main.cpp b/dnf5/main.cpp index ab1b87022..d8c57abe3 100644 --- a/dnf5/main.cpp +++ b/dnf5/main.cpp @@ -224,14 +224,15 @@ void RootCommand::set_argument_parser() { auto val = strchr(value + 1, '='); if (!val) { throw libdnf5::cli::ArgumentParserError( - M_("setopt: Badly formatted argument value \"{}\""), std::string(value)); + M_("{}: Badly formatted argument value \"{}\""), std::string{"setopt"}, std::string(value)); } auto key = std::string(value, val); auto dot_pos = key.rfind('.'); if (dot_pos != std::string::npos) { if (dot_pos == key.size() - 1) { throw libdnf5::cli::ArgumentParserError( - M_("setopt: Badly formatted argument value: Last key character cannot be '.': {}"), + M_("{}: Badly formatted argument value: Last key character cannot be '.': {}"), + std::string{"setopt"}, std::string(value)); } // Store repository option to vector. Use it later when repositories configuration will be loaded. @@ -262,7 +263,7 @@ void RootCommand::set_argument_parser() { auto val = strchr(value + 1, '='); if (!val) { throw libdnf5::cli::ArgumentParserError( - M_("setvar: Badly formatted argument value \"{}\""), std::string(value)); + M_("{}: Badly formatted argument value \"{}\""), std::string{"setvar"}, std::string(value)); } auto name = std::string(value, val); try { diff --git a/dnf5/po/cs.po b/dnf5/po/cs.po index cefe8a0ee..4a86ce12c 100644 --- a/dnf5/po/cs.po +++ b/dnf5/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-21 12:02+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Czech \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: commands/advisory/advisory_info.hpp:33 +msgid "Print details about advisories" +msgstr "" + +#: commands/advisory/advisory_list.hpp:33 +msgid "List advisories" +msgstr "" + +#: commands/advisory/advisory_summary.cpp:44 +msgid "All" +msgstr "" + +#: commands/advisory/advisory_summary.cpp:48 +msgid "Installed" +msgstr "" + +#: commands/advisory/advisory_summary.cpp:52 +msgid "Updates" +msgstr "" + +#: commands/advisory/advisory_summary.cpp:65 +msgid "Available" +msgstr "" + +#: commands/advisory/advisory_summary.hpp:33 +msgid "Print summary of advisories" +msgstr "" + +#: commands/advisory/arguments.hpp:34 +msgid "Show advisories containing any version of installed packages." +msgstr "" + +#: commands/advisory/arguments.hpp:45 +msgid "Show advisories containing newer versions of installed packages." +msgstr "" + +#: commands/advisory/arguments.hpp:57 +msgid "" +"Show advisories containing equal and older versions of installed packages." +msgstr "" + +#: commands/advisory/arguments.hpp:69 +msgid "" +"Show advisories containing newer versions of installed packages for which a " +"newer version is available." +msgstr "" + +#: commands/advisory/arguments.hpp:82 +msgid "" +"Show only advisories containing packages with specified names. List option, " +"supports globs." +msgstr "" + +#: commands/advisory/arguments.hpp:83 +msgid "PACKAGE_NAME,..." +msgstr "" + +#: commands/advisory/arguments.hpp:90 +msgid "List of patterns matched against advisory names." +msgstr "" + +#: commands/advisory/arguments.hpp:100 +msgid "Show only advisories referencing a bugzilla." +msgstr "" + +#: commands/advisory/arguments.hpp:107 +msgid "Show only advisories referencing a CVE." +msgstr "" + +#: commands/advisory_shared.hpp:113 +msgid "Limit to packages in advisories with specified name. List option." +msgstr "" + +#: commands/advisory_shared.hpp:114 +msgid "ADVISORY_NAME,..." +msgstr "" + +#: commands/advisory_shared.hpp:121 +msgid "Limit to packages in security advisories." +msgstr "" + +#: commands/advisory_shared.hpp:128 +msgid "Limit to packages in bugfix advisories." +msgstr "" + +#: commands/advisory_shared.hpp:135 +msgid "Limit to packages in enhancement advisories." +msgstr "" + +#: commands/advisory_shared.hpp:142 +msgid "Limit to packages in newpackage advisories." +msgstr "" + +#: commands/advisory_shared.hpp:153 +msgid "" +"Limit to packages in advisories with specified severity. List option. Can be " +"\"critical\", \"important\", \"moderate\", \"low\", \"none\"." +msgstr "" + +#: commands/advisory_shared.hpp:155 +msgid "ADVISORY_SEVERITY,..." +msgstr "" + +#: commands/advisory_shared.hpp:179 +msgid "" +"Limit to packages in advisories that fix a Bugzilla ID, Eg. 123123. List " +"option." +msgstr "" + +#: commands/advisory_shared.hpp:180 +msgid "BUGZILLA_ID,..." +msgstr "" + +#: commands/advisory_shared.hpp:190 +msgid "" +"Limit to packages in advisories that fix a CVE (Common Vulnerabilities and " +"Exposures) ID, Eg. CVE-2201-0123. List option." +msgstr "" + +#: commands/advisory_shared.hpp:192 +msgid "CVE_ID,..." +msgstr "" + +#: commands/check/check.cpp:335 +msgid "Check discovered {} problem(s) in {} package(s)" +msgstr "" + +#: commands/clean/clean.cpp:86 +msgid "List of cache types to clean up. Supported types: {0}" +msgstr "" + +#: commands/clean/clean.cpp:104 +msgid "Unknown cache type \"{0}\". Supported types: {1}" +msgstr "" + +#: commands/clean/clean.cpp:161 +msgid "Failed to cleanup repository cache in path \"{0}\": {1}" +msgstr "" + +#. TODO(jrohel): Add support for requiring an argument by another argument in ArgumentParser? +#: commands/download/download.cpp:101 +msgid "Option \"--alldeps\" should be used with \"--resolve\"" +msgstr "" + +#: commands/environment/arguments.hpp:33 +msgid "Show only available environments." +msgstr "" + +#: commands/environment/arguments.hpp:40 +msgid "Show only installed environments." +msgstr "" + +#: commands/environment/arguments.hpp:47 +msgid "Pattern matching environment IDs." +msgstr "" + +#: commands/group/arguments.hpp:34 +msgid "Show only available groups." +msgstr "" + +#: commands/group/arguments.hpp:41 +msgid "Show also hidden groups." +msgstr "" + +#: commands/group/arguments.hpp:48 +msgid "Show only installed groups." +msgstr "" + +#: commands/group/arguments.hpp:59 +msgid "" +"Show only groups containing packages with specified names. List option, " +"supports globs." +msgstr "" + +#: commands/group/arguments.hpp:67 +msgid "Pattern matching group IDS." +msgstr "" + +#: commands/group/arguments.hpp:76 +msgid "Include optional packages from group." +msgstr "" + +#: commands/group/arguments.hpp:83 +msgid "Operate on groups only, no packages are changed." +msgstr "" + +#: commands/history/arguments.hpp:34 +msgid "Transaction ID" +msgstr "" + +#: commands/history/arguments.hpp:41 +msgid "Reverse the order of transactions." +msgstr "" + +#: commands/history/history_store.cpp:62 +msgid "File \"{}\" already exists, it will be overwritten.\n" +msgstr "" + +#: commands/history/history_store.cpp:76 +msgid "No transactions selected for storing, exactly one required." +msgstr "" + +#: commands/history/history_store.cpp:79 +msgid "Multiple transactions selected for storing, only one allowed." +msgstr "" + +#: commands/history/transaction_id.cpp:32 +msgid "" +"Invalid transaction ID range \"{}\", \"ID\" or \"ID..ID\" expected, where ID " +"is \"NUMBER\", \"last\" or \"last-NUMBER\"." +msgstr "" + +#: commands/list/list.cpp:256 +msgid "No matching packages to list" +msgstr "" + +#: commands/module/arguments.hpp:36 +msgid "Show enabled modules." +msgstr "" + +#: commands/module/arguments.hpp:43 +msgid "Show disabled modules." +msgstr "" + +#: commands/module/arguments.hpp:50 +msgid "Pattern matching module NSVCAs." +msgstr "" + +#: commands/module/module_list.cpp:84 +msgid "No matches found for \"{}\"." +msgstr "" + +#: commands/repo/arguments.hpp:35 +msgid "Show all repositories." +msgstr "" + +#: commands/repo/arguments.hpp:42 +msgid "Show enabled repositories (default)." +msgstr "" + +#: commands/repo/arguments.hpp:49 +msgid "Show disabled repositories." +msgstr "" + +#: commands/repo/arguments.hpp:56 +msgid "Pattern matching repo IDs." +msgstr "" + +#: commands/repoquery/repoquery.cpp:514 +msgid "" +"Option \"--exactdeps\" has to be used either with \"--whatrequires\" or \"--" +"whatdepends\"" +msgstr "" + +#: commands/repoquery/repoquery.cpp:519 +msgid "" +"Option \"--recursive\" has to be used either with \"--whatrequires\" or \"--" +"providers-of=requires\"" +msgstr "" + +#: commands/search/arguments.hpp:37 +msgid "Search also package description and URL." +msgstr "" + +#: commands/search/arguments.hpp:45 +msgid "Patterns" +msgstr "" + +#: context.cpp:80 +msgid "The key was successfully imported." +msgstr "" + +#: context.cpp:126 +msgid "No matching repositories for \"{}\"" +msgstr "" + +#: include/dnf5/shared_options.hpp:33 +msgid "Allow erasing of installed packages to resolve problems" +msgstr "" + +#: include/dnf5/shared_options.hpp:43 +msgid "Allow resolving of depsolve problems by skipping packages" +msgstr "" + +#: include/dnf5/shared_options.hpp:55 +msgid "Allow skipping unavailable packages" +msgstr "" + +#: library.cpp:33 +msgid "Cannot load shared library \"{}\": {}" +msgstr "" + +#: library.cpp:48 +msgid "Cannot obtain address of symbol \"{}\": {}" +msgstr "" + +#: main.cpp:179 +msgid "Failed to expire repository cache in path \"{0}\": {1}" +msgstr "" + +#: main.cpp:204 +msgid "repofrompath: Incorrect repoid and path specification \"{}\"" +msgstr "" + +#: main.cpp:227 +msgid "setopt: Badly formatted argument value \"{}\"" +msgstr "" + +#: main.cpp:234 +msgid "" +"setopt: Badly formatted argument value: Last key character cannot be '.': {}" +msgstr "" + +#: main.cpp:246 +msgid "setopt: \"{0}\": {1}" +msgstr "" + +#: main.cpp:265 +msgid "setvar: Badly formatted argument value \"{}\"" +msgstr "" + +#: main.cpp:272 +msgid "setvar: {}" +msgstr "" + +#: main.cpp:607 shared_options.cpp:90 +msgid "Unsupported architecture \"{0}\". Please choose one from {1}" +msgstr "" + +#: main.cpp:816 +msgid "======== Main configuration: ========" +msgstr "" + +#: main.cpp:857 +msgid "======== \"{}\" repository configuration: ========" +msgstr "" + +#: main.cpp:878 +msgid "======== Variables: ========" +msgstr "" + +#: main.cpp:996 main.cpp:1149 +msgid ". Add \"--help\" for more information about the arguments." +msgstr "" diff --git a/dnf5/po/sv.po b/dnf5/po/sv.po new file mode 100644 index 000000000..3c7dfa5a5 --- /dev/null +++ b/dnf5/po/sv.po @@ -0,0 +1,389 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Göran Uddeborg , 2024. +# Luna Jernberg , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: 2024-01-11 10:48+0000\n" +"Last-Translator: Göran Uddeborg \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.3.1\n" + +#: commands/advisory/advisory_info.hpp:33 +msgid "Print details about advisories" +msgstr "Skriv ut detaljer om rekommendationer" + +#: commands/advisory/advisory_list.hpp:33 +msgid "List advisories" +msgstr "Lista rekommendationer" + +#: commands/advisory/advisory_summary.cpp:44 +msgid "All" +msgstr "Alla" + +#: commands/advisory/advisory_summary.cpp:48 +msgid "Installed" +msgstr "Installerade" + +#: commands/advisory/advisory_summary.cpp:52 +msgid "Updates" +msgstr "Uppdateringar" + +#: commands/advisory/advisory_summary.cpp:65 +msgid "Available" +msgstr "Tillgängliga" + +#: commands/advisory/advisory_summary.hpp:33 +msgid "Print summary of advisories" +msgstr "Skriv ut en sammanfattning av rekommendationer" + +#: commands/advisory/arguments.hpp:34 +msgid "Show advisories containing any version of installed packages." +msgstr "" +"Visa rekommendationer som innehåller någon version av installerade paket." + +#: commands/advisory/arguments.hpp:45 +msgid "Show advisories containing newer versions of installed packages." +msgstr "" +"Visa rekommendationer som innehåller nyare versioner av installerade paket." + +#: commands/advisory/arguments.hpp:57 +msgid "" +"Show advisories containing equal and older versions of installed packages." +msgstr "" +"Visa rekommendationer som innehåller samma eller äldre versioner av " +"installerade paket." + +#: commands/advisory/arguments.hpp:69 +msgid "" +"Show advisories containing newer versions of installed packages for which a " +"newer version is available." +msgstr "" +"Visa rekommendationer som innehåller nyare versioner av installerade paket " +"för vilka en nyare version är tillgänglig." + +#: commands/advisory/arguments.hpp:82 +msgid "" +"Show only advisories containing packages with specified names. List option, " +"supports globs." +msgstr "" +"Visa endast rekommendationer som innehåller paket med angivna namn. " +"Listflagga, stödjer globbar." + +#: commands/advisory/arguments.hpp:83 +msgid "PACKAGE_NAME,..." +msgstr "PAKET_NAMN,..." + +#: commands/advisory/arguments.hpp:90 +msgid "List of patterns matched against advisory names." +msgstr "Lista av mönster matchade mot rekommendationsnamn." + +#: commands/advisory/arguments.hpp:100 +msgid "Show only advisories referencing a bugzilla." +msgstr "Visa endast rekommendationer som refererar en bugzilla." + +#: commands/advisory/arguments.hpp:107 +msgid "Show only advisories referencing a CVE." +msgstr "Visa endast rekommendationer som refererar en CVE." + +#: commands/advisory_shared.hpp:113 +msgid "Limit to packages in advisories with specified name. List option." +msgstr "Begränsa till paket i rekommendationer med angivna namn. Listflagga." + +#: commands/advisory_shared.hpp:114 +msgid "ADVISORY_NAME,..." +msgstr "REKOMMENDATIONSNAMN,…" + +#: commands/advisory_shared.hpp:121 +msgid "Limit to packages in security advisories." +msgstr "Begränsa till paket i säkerhetsrekommendationer." + +#: commands/advisory_shared.hpp:128 +msgid "Limit to packages in bugfix advisories." +msgstr "Begränsa till paket i felrättningsrekommendationer." + +#: commands/advisory_shared.hpp:135 +msgid "Limit to packages in enhancement advisories." +msgstr "Begränsa till paket i förbättringsrekommendationer." + +#: commands/advisory_shared.hpp:142 +msgid "Limit to packages in newpackage advisories." +msgstr "Begränsa till paket i nya pakets-rekommendationer." + +#: commands/advisory_shared.hpp:153 +msgid "" +"Limit to packages in advisories with specified severity. List option. Can be " +"\"critical\", \"important\", \"moderate\", \"low\", \"none\"." +msgstr "" +"Begränsa till paket i rekommendationer med den angivna allvarlighetsgraden. " +"Listflagga. Kan vara ”critical”, ”important”, ”moderate”, ”low”, ”none”." + +#: commands/advisory_shared.hpp:155 +msgid "ADVISORY_SEVERITY,..." +msgstr "REKOMMENDATIONSALLVARLIGHET,…" + +#: commands/advisory_shared.hpp:179 +msgid "" +"Limit to packages in advisories that fix a Bugzilla ID, Eg. 123123. List " +"option." +msgstr "" +"Begränsa till paket i rekommendationer som löser ett Bugzilla-ID, t.ex. " +"123123. Listflagga." + +#: commands/advisory_shared.hpp:180 +msgid "BUGZILLA_ID,..." +msgstr "BUGZILLA_ID,…" + +#: commands/advisory_shared.hpp:190 +msgid "" +"Limit to packages in advisories that fix a CVE (Common Vulnerabilities and " +"Exposures) ID, Eg. CVE-2201-0123. List option." +msgstr "" +"Begränsa till paket med varningar som fixar en CVE (Vanliga sårbarheter och " +"exponeringar) ID, t.ex. CVE-2201-0123. Listalternativ." + +#: commands/advisory_shared.hpp:192 +msgid "CVE_ID,..." +msgstr "CVE_ID,..." + +#: commands/check/check.cpp:335 +msgid "Check discovered {} problem(s) in {} package(s)" +msgstr "Kontrollen upptäckte {} problem i {} paket" + +#: commands/clean/clean.cpp:86 +msgid "List of cache types to clean up. Supported types: {0}" +msgstr "Lista över cachetyper att rensa upp. Typer som stöds: {0}" + +#: commands/clean/clean.cpp:104 +msgid "Unknown cache type \"{0}\". Supported types: {1}" +msgstr "Okänd cachetyp \"{0}\". Typer som stöds: {1}" + +#: commands/clean/clean.cpp:161 +msgid "Failed to cleanup repository cache in path \"{0}\": {1}" +msgstr "Misslyckades att rensa arkivets cache i sökväg \"{0}\": {1}" + +#. TODO(jrohel): Add support for requiring an argument by another argument in ArgumentParser? +#: commands/download/download.cpp:101 +msgid "Option \"--alldeps\" should be used with \"--resolve\"" +msgstr "Alternativet \"--alldeps\" ska användas med \"--resolve\"" + +#: commands/environment/arguments.hpp:33 +msgid "Show only available environments." +msgstr "Visa endast tillgängliga miljöer." + +#: commands/environment/arguments.hpp:40 +msgid "Show only installed environments." +msgstr "Visa endast installerade miljöer." + +#: commands/environment/arguments.hpp:47 +msgid "Pattern matching environment IDs." +msgstr "Mönstermatchande miljö-IDn." + +#: commands/group/arguments.hpp:34 +msgid "Show only available groups." +msgstr "Visa endast tillgängliga grupper." + +#: commands/group/arguments.hpp:41 +msgid "Show also hidden groups." +msgstr "Visa också dolda grupper." + +#: commands/group/arguments.hpp:48 +msgid "Show only installed groups." +msgstr "Visa endast installerade grupper." + +#: commands/group/arguments.hpp:59 +msgid "" +"Show only groups containing packages with specified names. List option, " +"supports globs." +msgstr "" +"Visa endast grupper som innehåller paket med angivna namn. Listalternativ, " +"stöder globs." + +#: commands/group/arguments.hpp:67 +msgid "Pattern matching group IDS." +msgstr "Mönstermatchande grupp IDn." + +#: commands/group/arguments.hpp:76 +msgid "Include optional packages from group." +msgstr "Inkludera valfria paket från grupp." + +#: commands/group/arguments.hpp:83 +msgid "Operate on groups only, no packages are changed." +msgstr "Operera på grupper endast, inga paket ändras." + +#: commands/history/arguments.hpp:34 +msgid "Transaction ID" +msgstr "Transaktions ID" + +#: commands/history/arguments.hpp:41 +msgid "Reverse the order of transactions." +msgstr "Vänd om ordningsföljden på transaktioner." + +#: commands/history/history_store.cpp:62 +msgid "File \"{}\" already exists, it will be overwritten.\n" +msgstr "Fil \"{}\" existerar redan, den kommer att skrivas över.\n" + +#: commands/history/history_store.cpp:76 +msgid "No transactions selected for storing, exactly one required." +msgstr "Inga transaktioner valda för lagring, exakt en krävs." + +#: commands/history/history_store.cpp:79 +msgid "Multiple transactions selected for storing, only one allowed." +msgstr "Multipla transaktioner valda för lagring, endast en tillåten." + +#: commands/history/transaction_id.cpp:32 +msgid "" +"Invalid transaction ID range \"{}\", \"ID\" or \"ID..ID\" expected, where ID " +"is \"NUMBER\", \"last\" or \"last-NUMBER\"." +msgstr "" +"Ogiltigt transaktions-ID-intervall \"{}\", \"ID\" eller \"ID..ID\" " +"förväntas, där ID är \"NUMMER\", \"senaste\" eller \"senaste NUMMER\"." + +#: commands/list/list.cpp:256 +msgid "No matching packages to list" +msgstr "Inga matchande paket att lista" + +#: commands/module/arguments.hpp:36 +msgid "Show enabled modules." +msgstr "Visa aktiverade moduler." + +#: commands/module/arguments.hpp:43 +msgid "Show disabled modules." +msgstr "Visa inaktiverade moduler." + +#: commands/module/arguments.hpp:50 +msgid "Pattern matching module NSVCAs." +msgstr "Mönstermatchande modul NSVCA:er." + +#: commands/module/module_list.cpp:84 +msgid "No matches found for \"{}\"." +msgstr "Inga matchningar hittades för \"{}\"." + +#: commands/repo/arguments.hpp:35 +msgid "Show all repositories." +msgstr "Visa alla förråd." + +#: commands/repo/arguments.hpp:42 +msgid "Show enabled repositories (default)." +msgstr "Visa aktiverade förråd (standard)." + +#: commands/repo/arguments.hpp:49 +msgid "Show disabled repositories." +msgstr "Visa inaktiverade förråd." + +#: commands/repo/arguments.hpp:56 +msgid "Pattern matching repo IDs." +msgstr "Mönstermatchande repo-IDn." + +#: commands/repoquery/repoquery.cpp:514 +msgid "" +"Option \"--exactdeps\" has to be used either with \"--whatrequires\" or \"--" +"whatdepends\"" +msgstr "" +"Alternativet \"--exactdeps\" måste användas antingen med \"--whatrequires\" " +"eller \"--whatdepends\"" + +#: commands/repoquery/repoquery.cpp:519 +msgid "" +"Option \"--recursive\" has to be used either with \"--whatrequires\" or \"--" +"providers-of=requires\"" +msgstr "" +"Alternativet \"--recursive\" måste användas antingen med \"--whatrequires\" " +"eller \"--providers-of=requires\"" + +#: commands/search/arguments.hpp:37 +msgid "Search also package description and URL." +msgstr "Sök också i paketbeskrivning och URL." + +#: commands/search/arguments.hpp:45 +msgid "Patterns" +msgstr "Mönster" + +#: context.cpp:80 +msgid "The key was successfully imported." +msgstr "Nyckeln importerades framgångsrikt." + +#: context.cpp:126 +msgid "No matching repositories for \"{}\"" +msgstr "Inga matchande förråd för \"{}\"" + +#: include/dnf5/shared_options.hpp:33 +msgid "Allow erasing of installed packages to resolve problems" +msgstr "Tillåt radering av installerade paket för att lösa problem" + +#: include/dnf5/shared_options.hpp:43 +msgid "Allow resolving of depsolve problems by skipping packages" +msgstr "Tillåt lösning av depsolve problem genom att hoppa över paket" + +#: include/dnf5/shared_options.hpp:55 +msgid "Allow skipping unavailable packages" +msgstr "Tillåt att du hoppar över otillgängliga paket" + +#: library.cpp:33 +msgid "Cannot load shared library \"{}\": {}" +msgstr "Kan inte ladda delat bibliotek \"{}\": {}" + +#: library.cpp:48 +msgid "Cannot obtain address of symbol \"{}\": {}" +msgstr "Kan inte erhålla adressen till symbol \"{}\": {}" + +#: main.cpp:179 +msgid "Failed to expire repository cache in path \"{0}\": {1}" +msgstr "Det gick inte att upphöra förrådscache i sökväg \"{0}\": {1}" + +#: main.cpp:204 +msgid "repofrompath: Incorrect repoid and path specification \"{}\"" +msgstr "repofrompath: Felaktigt förrådsid och sökvägsspecifikation \"{}\"" + +#: main.cpp:227 +msgid "setopt: Badly formatted argument value \"{}\"" +msgstr "setopt: Felformaterat argumentvärde \"{}\"" + +#: main.cpp:234 +msgid "" +"setopt: Badly formatted argument value: Last key character cannot be '.': {}" +msgstr "" +"setopt: Felaktigt formaterat argumentvärde: Sista nyckeltecknet kan inte " +"vara '.': {}" + +#: main.cpp:246 +msgid "setopt: \"{0}\": {1}" +msgstr "setopt: \"{0}\": {1}" + +#: main.cpp:265 +msgid "setvar: Badly formatted argument value \"{}\"" +msgstr "setvar: Felaktigt formaterat argumentvärde \"{}\"" + +#: main.cpp:272 +msgid "setvar: {}" +msgstr "setvar: {}" + +#: main.cpp:607 shared_options.cpp:90 +msgid "Unsupported architecture \"{0}\". Please choose one from {1}" +msgstr "Arkitektur \"{0}\" som inte stöds. Välj en från {1}" + +#: main.cpp:816 +msgid "======== Main configuration: ========" +msgstr "======== Huvudkonfiguration: ========" + +#: main.cpp:857 +msgid "======== \"{}\" repository configuration: ========" +msgstr "======== \"{}\" Förrådskonfiguration: ========" + +#: main.cpp:878 +msgid "======== Variables: ========" +msgstr "======== Variabler: ========" + +#: main.cpp:996 main.cpp:1149 +msgid ". Add \"--help\" for more information about the arguments." +msgstr ". Lägg till \"--help\" för mer information om dessa argument." diff --git a/dnf5daemon-client/CMakeLists.txt b/dnf5daemon-client/CMakeLists.txt index 0cd14221f..bf32c1aee 100644 --- a/dnf5daemon-client/CMakeLists.txt +++ b/dnf5daemon-client/CMakeLists.txt @@ -10,7 +10,7 @@ set(GETTEXT_DOMAIN dnf5daemon-client) add_definitions(-DGETTEXT_DOMAIN=\"${GETTEXT_DOMAIN}\") include_directories(.) -# TODO(mblaha) workround for dnf5daemon-client using server's headers, fix +# TODO(mblaha) workaround for dnf5daemon-client using server's headers, fix include_directories(..) pkg_check_modules(SDBUS_CPP REQUIRED sdbus-c++) diff --git a/dnf5daemon-client/callbacks.cpp b/dnf5daemon-client/callbacks.cpp index a8a692f4d..32d525548 100644 --- a/dnf5daemon-client/callbacks.cpp +++ b/dnf5daemon-client/callbacks.cpp @@ -35,7 +35,7 @@ namespace dnfdaemon::client { bool DbusCallback::signature_valid(sdbus::Signal & signal) { - // check that signal is emited by the correct session object + // check that signal is emitted by the correct session object std::string object_path; signal >> object_path; return object_path == context.get_session_object_path(); diff --git a/dnf5daemon-client/commands/remove/remove.cpp b/dnf5daemon-client/commands/remove/remove.cpp index b327f771c..41c3826bb 100644 --- a/dnf5daemon-client/commands/remove/remove.cpp +++ b/dnf5daemon-client/commands/remove/remove.cpp @@ -51,7 +51,7 @@ void RemoveCommand::set_argument_parser() { specs_arg->set_description("List of packages to remove"); cmd.register_positional_arg(specs_arg); - // run remove command allways with allow_erasing on + // run remove command always with allow_erasing on context.allow_erasing.set(libdnf5::Option::Priority::RUNTIME, true); } diff --git a/dnf5daemon-client/main.cpp b/dnf5daemon-client/main.cpp index 366011fa9..a839c7fe7 100644 --- a/dnf5daemon-client/main.cpp +++ b/dnf5daemon-client/main.cpp @@ -38,6 +38,7 @@ along with libdnf. If not, see . #include #include #include +#include #include #include @@ -149,8 +150,10 @@ void RootCommand::set_argument_parser() { auto dot_pos = key.rfind('.'); if (dot_pos != std::string::npos) { if (dot_pos == key.size() - 1) { - throw std::runtime_error( - std::string("setopt: Badly formatted argument value: Last key character cannot be '.': ") + value); + throw libdnf5::cli::ArgumentParserError( + M_("{}: Badly formatted argument value: Last key character cannot be '.': {}"), + std::string{"setopt"}, + std::string(value)); } } // Store option to vector for later use diff --git a/dnf5daemon-client/po/cs.po b/dnf5daemon-client/po/cs.po index 196987793..2c0588ef2 100644 --- a/dnf5daemon-client/po/cs.po +++ b/dnf5daemon-client/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5daemon-client/po/ka.po b/dnf5daemon-client/po/ka.po index a5dcce04b..ef78f781b 100644 --- a/dnf5daemon-client/po/ka.po +++ b/dnf5daemon-client/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: commands/advisory/advisory_info.hpp:34 +msgid "Print details about advisories" +msgstr "" + +#: commands/advisory/advisory_list.hpp:34 +msgid "List advisories" +msgstr "" + +#: commands/advisory/arguments.hpp:32 +msgid "Show advisories containing any version of installed packages." +msgstr "" + +#: commands/advisory/arguments.hpp:43 +msgid "Show advisories containing newer versions of installed packages." +msgstr "" + +#: commands/advisory/arguments.hpp:55 +msgid "" +"Show advisories containing equal and older versions of installed packages." +msgstr "" + +#: commands/advisory/arguments.hpp:67 +msgid "" +"Show advisories containing newer versions of installed packages for which a " +"newer version is available." +msgstr "" + +#: commands/advisory/arguments.hpp:80 +msgid "" +"Show only advisories containing packages with specified names. List option, " +"supports globs." +msgstr "" + +#: commands/advisory/arguments.hpp:81 +msgid "PACKAGE_NAME,..." +msgstr "" + +#: commands/advisory/arguments.hpp:88 +msgid "List of patterns matched against advisory names." +msgstr "" + +#: commands/advisory/arguments.hpp:95 +msgid "Show only advisories referencing a bugzilla." +msgstr "" + +#: commands/advisory/arguments.hpp:102 +msgid "Show only advisories referencing a CVE." +msgstr "" + +#: commands/advisory/arguments.hpp:113 +msgid "Limit to packages in advisories with specified name. List option." +msgstr "" + +#: commands/advisory/arguments.hpp:114 +msgid "ADVISORY_NAME,..." +msgstr "" + +#: commands/advisory/arguments.hpp:121 +msgid "Limit to packages in security advisories." +msgstr "" + +#: commands/advisory/arguments.hpp:128 +msgid "Limit to packages in bugfix advisories." +msgstr "" + +#: commands/advisory/arguments.hpp:135 +msgid "Limit to packages in enhancement advisories." +msgstr "" + +#: commands/advisory/arguments.hpp:142 +msgid "Limit to packages in newpackage advisories." +msgstr "" + +#: commands/advisory/arguments.hpp:153 +msgid "" +"Limit to packages in advisories with specified severity. List option. Can be " +"\"critical\", \"important\", \"moderate\", \"low\", \"none\"." +msgstr "" + +#: commands/advisory/arguments.hpp:155 +msgid "ADVISORY_SEVERITY,..." +msgstr "" + +#: commands/advisory/arguments.hpp:179 +msgid "" +"Limit to packages in advisories that fix a Bugzilla ID, Eg. 123123. List " +"option." +msgstr "" + +#: commands/advisory/arguments.hpp:180 +msgid "BUGZILLA_ID,..." +msgstr "" + +#: commands/advisory/arguments.hpp:190 +msgid "" +"Limit to packages in advisories that fix a CVE (Common Vulnerabilities and " +"Exposures) ID, Eg. CVE-2201-0123. List option." +msgstr "" + +#: commands/advisory/arguments.hpp:192 +msgid "CVE_ID,..." +msgstr "" + +#: exception.cpp:28 +msgid "" +"This command has to be run with superuser privileges (under the root user on " +"most systems)." +msgstr "" + +#: main.cpp:236 main.cpp:273 +msgid ". Add \"--help\" for more information about the arguments." +msgstr "" diff --git a/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Advisory.xml b/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Advisory.xml index f07d6faab..2f618e3a9 100644 --- a/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Advisory.xml +++ b/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Advisory.xml @@ -47,7 +47,7 @@ along with libdnf. If not, see . - severity: list of strings Consider only advisories of given severity. Possible values are "critical", "important", "moderate", "low", and "none". - reference_bz: list of strings - Consider only advisories referencing given Bugzilla ticket ID. Exepcted values are numeric IDs, e.g. 123456. + Consider only advisories referencing given Bugzilla ticket ID. Expected values are numeric IDs, e.g. 123456. - reference_cve: list of strings Consider only advisoried referencing given CVE ID. Expected values are strings IDs in CVE format, e.g. CVE-2201-0123. - with_bz: boolean diff --git a/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Base.xml b/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Base.xml index 0d368a0ba..259424f8c 100644 --- a/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Base.xml +++ b/dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Base.xml @@ -27,9 +27,9 @@ along with libdnf. If not, see . @@ -94,7 +94,7 @@ along with libdnf. If not, see . Downloading has ended. --> - + diff --git a/dnf5daemon-server/package.cpp b/dnf5daemon-server/package.cpp index d721c49b8..e643de533 100644 --- a/dnf5daemon-server/package.cpp +++ b/dnf5daemon-server/package.cpp @@ -56,7 +56,8 @@ const std::map package_attributes{ {"nevra", PackageAttribute::nevra}, {"full_nevra", PackageAttribute::full_nevra}, {"reason", PackageAttribute::reason}, - {"vendor", PackageAttribute::vendor}}; + {"vendor", PackageAttribute::vendor}, + {"group", PackageAttribute::group}}; std::vector reldeplist_to_strings(const libdnf5::rpm::ReldepList & reldeps) { std::vector lst; @@ -188,6 +189,9 @@ dnfdaemon::KeyValueMap package_to_map( case PackageAttribute::vendor: dbus_package.emplace(attr, libdnf_package.get_vendor()); break; + case PackageAttribute::group: + dbus_package.emplace(attr, libdnf_package.get_group()); + break; } } return dbus_package; diff --git a/dnf5daemon-server/package.hpp b/dnf5daemon-server/package.hpp index cb73de979..74f34e265 100644 --- a/dnf5daemon-server/package.hpp +++ b/dnf5daemon-server/package.hpp @@ -65,7 +65,8 @@ enum class PackageAttribute { nevra, full_nevra, reason, - vendor + vendor, + group }; dnfdaemon::KeyValueMap package_to_map( diff --git a/dnf5daemon-server/po/cs.po b/dnf5daemon-server/po/cs.po index 1e02bd1f3..55173f294 100644 --- a/dnf5daemon-server/po/cs.po +++ b/dnf5daemon-server/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/dnf5daemon-server/po/ka.po b/dnf5daemon-server/po/ka.po index 3cf4f34ee..e51d4f7b6 100644 --- a/dnf5daemon-server/po/ka.po +++ b/dnf5daemon-server/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: 2024-01-11 10:48+0000\n" +"Last-Translator: Luna Jernberg \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.3.1\n" + +#: threads_manager.cpp:94 +msgid "Failed to create locale \"{}\"." +msgstr "Misslyckades att skapa lokal \"{}\"." + +#: threads_manager.cpp:99 +msgid "Failed to use locale \"{}\"." +msgstr "Misslyckades att använda lokal \"{}\"." diff --git a/dnf5daemon-server/services/advisory/advisory.cpp b/dnf5daemon-server/services/advisory/advisory.cpp index 36120c001..a7faa1c86 100644 --- a/dnf5daemon-server/services/advisory/advisory.cpp +++ b/dnf5daemon-server/services/advisory/advisory.cpp @@ -104,7 +104,7 @@ libdnf5::advisory::AdvisoryQuery Advisory::advisory_query_from_options( auto advisories_not_installed(advisories); advisories.filter_packages(package_query, libdnf5::sack::QueryCmp::LTE); // TODO(mblaha): add advisories.filter_packages(package_query), without cmp, - // to filter advisories with matching name.arch? Insted of unioning LTE + // to filter advisories with matching name.arch? Instead of unioning LTE // and GT results. advisories_not_installed.filter_packages(package_query, libdnf5::sack::QueryCmp::GT); advisories |= advisories_not_installed; diff --git a/dnf5daemon-server/services/goal/goal.cpp b/dnf5daemon-server/services/goal/goal.cpp index a093ea443..1cf5dac16 100644 --- a/dnf5daemon-server/services/goal/goal.cpp +++ b/dnf5daemon-server/services/goal/goal.cpp @@ -45,7 +45,7 @@ along with libdnf. If not, see . void Goal::dbus_register() { auto dbus_object = session.get_dbus_object(); - // TODO(mblaha) Adjust resolve method to accomodate also groups, environments, + // TODO(mblaha) Adjust resolve method to accommodate also groups, environments, // and modules as part of the transaction dbus_object->registerMethod( dnfdaemon::INTERFACE_GOAL, "resolve", "a{sv}", "a(sssa{sv}a{sv})u", [this](sdbus::MethodCall call) -> void { @@ -135,7 +135,7 @@ sdbus::MethodReply Goal::resolve(sdbus::MethodCall & call) { environment_to_map(tsenv.get_environment(), grp_attrs))); } // there are transactions resolved without problems but still resolve_logs - // may contain some warnings / informations + // may contain some warnings / information if (transaction.get_resolve_logs().size() > 0) { overall_result = dnfdaemon::ResolveResult::WARNING; } else { @@ -254,7 +254,7 @@ sdbus::MethodReply Goal::do_transaction(sdbus::MethodCall & call) { static_cast>(rpm_result))); } - // TODO(mblaha): clean up downloaded packages after successfull transaction + // TODO(mblaha): clean up downloaded packages after successful transaction auto reply = call.createReply(); return reply; diff --git a/dnf5daemon-server/services/repo/repo.cpp b/dnf5daemon-server/services/repo/repo.cpp index 8e662251d..db299133c 100644 --- a/dnf5daemon-server/services/repo/repo.cpp +++ b/dnf5daemon-server/services/repo/repo.cpp @@ -209,7 +209,7 @@ dnfdaemon::KeyValueMap repo_to_map( dbus_repo.emplace(attr, libdnf_repo->get_content_tags()); break; case RepoAttribute::distro_tags: { - // sdbus::Variant cannot accomodate a std::pair + // sdbus::Variant cannot accommodate a std::pair std::vector distro_tags{}; for (auto & dt : libdnf_repo->get_distro_tags()) { distro_tags.emplace_back(dt.first); diff --git a/dnf5daemon-server/services/rpm/rpm.cpp b/dnf5daemon-server/services/rpm/rpm.cpp index d045c5203..5e30eb53c 100644 --- a/dnf5daemon-server/services/rpm/rpm.cpp +++ b/dnf5daemon-server/services/rpm/rpm.cpp @@ -412,7 +412,14 @@ sdbus::MethodReply Rpm::remove(sdbus::MethodCall & call) { // fill the goal auto & goal = session.get_goal(); + + // Limit remove spec capabity to prevent multiple matches. Remove command should not match anything after performing + // a remove action with the same spec. NEVRA and filenames are the only types that have no overlaps. libdnf5::GoalJobSettings setting; + setting.with_nevra = true; + setting.with_provides = false; + setting.with_filenames = true; + setting.with_binaries = false; for (const auto & spec : specs) { goal.add_remove(spec, setting); } diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 834c3bf9f..5fdec1202 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -52,6 +52,9 @@ if(WITH_MAN) if(WITH_DNF5) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5.8 DESTINATION share/man/man8) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5.conf.5 DESTINATION share/man/man5) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5.conf-todo.5 DESTINATION share/man/man5) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5.conf-deprecated.5 DESTINATION share/man/man5) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-advisory.8 DESTINATION share/man/man8) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-autoremove.8 DESTINATION share/man/man8) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-check.8 DESTINATION share/man/man8) @@ -77,6 +80,7 @@ if(WITH_MAN) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-search.8 DESTINATION share/man/man8) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-swap.8 DESTINATION share/man/man8) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-upgrade.8 DESTINATION share/man/man8) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-caching.7 DESTINATION share/man/man7) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-comps.7 DESTINATION share/man/man7) # TODO(jkolarik): filtering is not ready yet # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/dnf5-filtering.7 DESTINATION share/man/man7) diff --git a/doc/best_practices/documentation_strings.rst b/doc/best_practices/documentation_strings.rst index 880208c34..25f7b3d0f 100644 --- a/doc/best_practices/documentation_strings.rst +++ b/doc/best_practices/documentation_strings.rst @@ -25,7 +25,7 @@ Example:: /// @param text Input text. /// @param delimiter A delimiter we're using to split the text. /// @param max_items Limit number of splits to produce a vector containing up to `max_items` items. - /// @return Splitted text. + /// @return Split text. /// A continuation line for the return value description. /// @exception std::out_of_range Value of the `max_items` argument is out of expected range. /// @since 5.0 diff --git a/doc/changes.rst b/doc/changes.rst index c3504d1ff..edefc1611 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -136,6 +136,10 @@ List command packages already listed in the ``Installed Packages`` section to reduce duplicities. But if the ``--available`` modifier is used, dnf5 considers all versions available in the enabled repositories, regardless of which version is installed. +Makecache command +----------------- + * Metadata is stored in different directories now, see :ref:`cachedir changes`. + Module command -------------- * Dropped ``--all`` option since this behavior is the default one. @@ -148,6 +152,12 @@ Needs-restarting command * Dropped ``-r, --reboothint`` option; this is now the default behavior. * Dropped ``-u, --useronly`` option. +Remove command +-------------- + * Command does not remove packages according to provides, but only according NEVRA or file provide match + * Dropped commands ``remove-n``, ``remove-na``, ``remove-nevra``. + * Dropped erase aliases for the same ``erase``, ``erase-n`` , ``erase-na`` , ``erase-nevra``. + Repoclosure command ------------------- * Dropped ``--pkg`` option. Positional arguments can be used to specify packages to check closure for. @@ -170,6 +180,9 @@ Repoquery command * --queryformat no longer supports ``size`` tag because it was printing install size for installed packages and download size for not-installed packages. This could be confusing. * Option ``--source`` was renamed to ``--sourcerpm`` and it now matches queryformat's ``sourcerpm`` tag. + * Option ``--resolve`` was changed to ``--providers-of=PACKAGE_ATTRIBUTE``. It no longer interacts with the formatting ``--requires``, + ``--provides``, ``--suggests``,... options instead it takes the PACKAGE_ATTRIBUTE value directly. + E.g., ``dnf rq --resolve --requires glibc`` -> ``dnf rq --providers-of=requires glibc``. Upgrade command --------------- @@ -200,3 +213,16 @@ Default of ``best`` configuration option changed to ``true`` -------------------------------------------------------- The new default value ensures that important updates will not be skipped and issues in distribution will be reported earlier. + +.. _cachedir changes: + +cachedir and system_cachedir options +------------------------------------ +The default root cache directory (``system_cachedir``) is now ``/var/cache/libdnf5``, while for users, the ``cachedir`` +is at ``/home/$USER/.cache/libdnf5``. Users no longer access the root's cache directly; instead, metadata is copied +to the user's location if it's empty or invalid. For additional information, refer to the :ref:`Caching ` man page. + +cacheonly option +---------------- +The ``cacheonly`` option was changed from ``bool`` to ``enum`` with options ``all``, ``metadata`` and ``none``, +enabling users to specify whether to use the cache exclusively for metadata or for both metadata and packages. diff --git a/doc/commands/distro-sync.8.rst b/doc/commands/distro-sync.8.rst index 8343a2c9b..0b508eecc 100644 --- a/doc/commands/distro-sync.8.rst +++ b/doc/commands/distro-sync.8.rst @@ -48,7 +48,7 @@ Options | Resolve any dependency problems by removing packages that are causing problems from the transaction. ``--skip-unavailable`` - | Allow skipping build dependencies not available in repositories. All available build dependencies will be installed. + | Allow skipping packages that are not possible to synchronize. All remaining packages will be synchronized. Examples diff --git a/doc/commands/downgrade.8.rst b/doc/commands/downgrade.8.rst index e37a91883..0b45ebc29 100644 --- a/doc/commands/downgrade.8.rst +++ b/doc/commands/downgrade.8.rst @@ -46,7 +46,7 @@ Options | Resolve any dependency problems by removing packages that are causing problems from the transaction. ``--skip-unavailable`` - | Allow skipping build dependencies not available in repositories. All available build dependencies will be installed. + | Allow skipping packages that are not possible to downgrade. All remaining packages will be downgraded. Examples diff --git a/doc/commands/group.8.rst b/doc/commands/group.8.rst index f7b4dd7e9..fec217814 100644 --- a/doc/commands/group.8.rst +++ b/doc/commands/group.8.rst @@ -102,11 +102,15 @@ Options ``--contains-pkgs`` | Show only groups containing packages with specified names. List option, supports globs. +``--allowerasing`` + | Used with ``install`` and ``upgrade`` to allow erasing of installed packages to resolve any potential dependency problems. + ``--skip-broken`` | Used with ``install`` command to resolve any dependency problems by removing packages that are causing problems from the transaction. ``--skip-unavailable`` - | Used with ``install`` and ``upgrade`` to allow skipping build dependencies not available in repositories. All available build dependencies will be installed. + | Used with ``install`` and ``upgrade`` to allow skipping packages that are not possible to install or upgrade. + | All remaining packages will be installed or upgraded. Examples diff --git a/doc/commands/install.8.rst b/doc/commands/install.8.rst index 69ac6245e..cd61180df 100644 --- a/doc/commands/install.8.rst +++ b/doc/commands/install.8.rst @@ -46,7 +46,7 @@ Options | Resolve any dependency problems by removing packages that are causing problems from the transaction. ``--skip-unavailable`` - | Allow skipping build dependencies not available in repositories. All available build dependencies will be installed. + | Allow skipping packages that are not available in repositories. All available packages will be installed. ``--advisories=ADVISORY_NAME,...`` | Consider only content contained in advisories with specified name. diff --git a/doc/commands/mark.8.rst b/doc/commands/mark.8.rst index fc4607650..17c9dcb20 100644 --- a/doc/commands/mark.8.rst +++ b/doc/commands/mark.8.rst @@ -72,7 +72,7 @@ Options ======= ``--skip-unavailable`` - | Allow skipping build dependencies not available in repositories. All available build dependencies will be installed. + | Allow skipping packages that are not installed on the system. All remaining installed packages will be marked. Examples diff --git a/doc/commands/reinstall.8.rst b/doc/commands/reinstall.8.rst index 56d8d5249..cd37059fe 100644 --- a/doc/commands/reinstall.8.rst +++ b/doc/commands/reinstall.8.rst @@ -45,7 +45,7 @@ Options | Resolve any dependency problems by removing packages that are causing problems from the transaction. ``--skip-unavailable`` - | Allow skipping build dependencies not available in repositories. All available build dependencies will be installed. + | Allow skipping packages that are not possible to reinstall. All remaining packages will be reinstalled. Examples diff --git a/doc/commands/remove.8.rst b/doc/commands/remove.8.rst index b07344625..3a50bf569 100644 --- a/doc/commands/remove.8.rst +++ b/doc/commands/remove.8.rst @@ -25,13 +25,15 @@ Synopsis ======== -``dnf5 remove [options] ...`` +``dnf5 remove [options] [...]`` Description =========== The ``remove`` command in ``DNF5`` is used for removing installed packages from the system. +Arguments defined in ``spec`` list are used as ````. + If you want to keep the dependencies that were installed together with the given package, set the ``clean_requirements_on_remove`` configuration option to ``False``. diff --git a/doc/commands/repoquery.8.rst b/doc/commands/repoquery.8.rst index 5b3a5f00d..737aeceac 100644 --- a/doc/commands/repoquery.8.rst +++ b/doc/commands/repoquery.8.rst @@ -32,8 +32,8 @@ Description =========== The ``repoquery`` command in ``DNF5`` is used for querying packages by matching -various input criteria from the user. Arguments defined in ``spec`` list could be -either file paths or package specs. +various input criteria from the user. Arguments defined in ``spec`` list are used +as ````. Options @@ -108,9 +108,21 @@ Options ``--newpackage`` | Limit to packages in newpackage advisories. +``--providers-of=PACKAGE_ATTRIBUTE`` + | After filtering is finished get selected attribute of packages and output packages that provide it. + | The outputted packages are limited by ``--available``, ``--installed`` and ``--arch`` options. + | Supports: conflicts, depends, enhances, obsoletes, provides, recommends, requires, requires_pre, suggests, supplements. + ``--recent`` | Limit to only recently changed packages. +``--recursive`` + | This option is stackable with --whatrequires or --providers-of=requires only. + | When used with --whatrequires: it extends the output with packages that require anything provided by outputted packages. + | When used with --providers-of=requires: it extends the output with packages that provide anything required by outputted packages. + | It repeats the output extension as long as new packages are being added. + | The added packages are limited by ``--available``, ``--installed`` and ``--arch`` options. + ``--security`` | Limit to packages in security advisories. @@ -248,11 +260,11 @@ Set what information is displayed about each package. The following are mutually | * ``provides`` - Display capabilities provided by the package. Separated by new lines. | * ``reason`` - Display reason why the packages was installed. | * ``recommends`` - Display capabilities recommended by the package. Separated by new lines. - | * ``regular_requires`` - Display capabilities requried by the package without its ``%pre``, ``%post``, ``%preun`` and ``%postun`` requirements. Separated by new lines. + | * ``regular_requires`` - Display capabilities required by the package without its ``%pre``, ``%post``, ``%preun`` and ``%postun`` requirements. Separated by new lines. | * ``release`` - Display release of the package. | * ``repoid`` - Display id of repository the package is in. | * ``reponame`` - Display name of repository the package is in. - | * ``requires`` - Display capabilities requried by the package (combines regular_requires and requires_pre). + | * ``requires`` - Display capabilities required by the package (combines regular_requires and requires_pre). | * ``requires_pre`` - For an installed package display capabilities that it depends on to run its ``%pre``, ``%post``, ``%preun`` and ``%postun`` scripts. For not installed package display just ``%pre`` and ``$post`` requirements. Separated by new lines. | * ``source_debug_name`` - Display name of debuginfo package for source package of the package. | * ``source_name`` - Display source RPM name of the package. diff --git a/doc/commands/upgrade.8.rst b/doc/commands/upgrade.8.rst index 977e54801..57127f917 100644 --- a/doc/commands/upgrade.8.rst +++ b/doc/commands/upgrade.8.rst @@ -46,7 +46,7 @@ Options | Allow erasing of installed packages to resolve any potential dependency problems. ``--skip-unavailable`` - | Allow skipping build dependencies not available in repositories. All available build dependencies will be installed. + | Allow skipping packages that are not possible to upgrade. All remaining packages will be upgraded. ``--advisories=ADVISORY_NAME,...`` | Consider only content contained in advisories with specified name. diff --git a/doc/conf.py.in b/doc/conf.py.in index 615e22e2e..695b41466 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -140,6 +140,7 @@ man_pages = [ ('dnf5_plugins/needs_restarting.8', 'dnf5-needs-restarting', 'Needs-restarting Command', AUTHORS, 8), ('dnf5_plugins/repoclosure.8', 'dnf5-repoclosure', 'Repoclosure Command', AUTHORS, 8), ('libdnf5_plugins/actions.8', 'libdnf5-actions', 'Actions plugin', AUTHORS, 8), + ('misc/caching.7', 'dnf5-caching', 'Caching', AUTHORS, 7), ('misc/comps.7', 'dnf5-comps', 'Comps Groups And Environments', AUTHORS, 7), ('misc/filtering.7', 'dnf5-filtering', 'Packages Filtering', AUTHORS, 7), ('misc/forcearch.7', 'dnf5-forcearch', 'Forcearch Parameter', AUTHORS, 7), @@ -149,6 +150,9 @@ man_pages = [ ('dnf_daemon/dnf5daemon_client.8', 'dnf5daemon-client', 'Command-line interface for Dnf5daemon', AUTHORS, 8), ('dnf_daemon/dnf5daemon_server.8', 'dnf5daemon-server', 'Package management service with a DBus interface', AUTHORS, 8), ('dnf_daemon/dnf5daemon_dbus_api.8', 'dnf5daemon-dbus-api', 'DBus API Reference for Dnf5daemon', AUTHORS, 8), + ('dnf5.conf.5', 'dnf5.conf', 'DNF5 Configuration Reference', AUTHORS, 5), + ('dnf5.conf-todo.5', 'dnf5.conf-todo', 'Options that are documented/implemented in DNF but not in DNF5', AUTHORS, 5), + ('dnf5.conf-deprecated.5', 'dnf5.conf-deprecated', 'Config Options that are deprecated in DNF5', AUTHORS, 5), ] rst_prolog = """ diff --git a/doc/dnf5.8.rst b/doc/dnf5.8.rst index 13f23d426..005a5cdcb 100644 --- a/doc/dnf5.8.rst +++ b/doc/dnf5.8.rst @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License along with libdnf. If not, see . +.. _command_ref-label: + ################################ DNF5 Package Management Utility ################################ @@ -294,11 +296,9 @@ To further reduce the bandwidth load, some of the commands where having up-to-da is not critical (e.g. the ``group list`` command) do not look at whether a repository is expired and whenever any version of it is locally available to the user's account, it will be used. -For non-root usages it can be also useful running entirely from the system cache, don't update the -cache and use it even in case it is expired by setting the ``cacheonly`` configuration option. -``DNF5`` uses a separate cache for each user under which it executes. The cache for the root user -is called the system cache. This option allows a regular user read-only access to the system cache, -which usually is more fresh than the user's and thus he does not have to wait for metadata sync. +:ref:`Refer to the ` :manpage:`dnf5-caching(7)` for more info regarding +metadata and packages caching. + Configuration Files Replacement Policy ====================================== @@ -336,13 +336,13 @@ Files ``Main Configuration`` /etc/dnf/dnf.conf -``Repository Metadata`` +``Repository Configuration`` /etc/yum.repos.d/ ``Repository Persistence`` /var/lib/dnf/ -``System state`` +``System State`` /usr/lib/sysimage/libdnf5/ @@ -386,10 +386,12 @@ Plugins: Miscellaneous: | :manpage:`dnf5-aliases(7)`, :ref:`Aliases for command line arguments ` + | :manpage:`dnf5-caching(7)`, :ref:`Caching ` | :manpage:`dnf5-comps(7)`, :ref:`Comps groups and environments ` | :manpage:`dnf5-forcearch(7)`, :ref:`Forcearch parameter ` | :manpage:`dnf5-installroot(7)`, :ref:`Installroot parameter ` | :manpage:`dnf5-specs(7)`, :ref:`Patterns specification ` + | :manpage:`dnf5-conf(5)`, :ref:`DNF5 Configuration Reference ` .. # TODO(jkolarik): Filtering is not ready yet diff --git a/doc/dnf5.conf-deprecated.5.rst b/doc/dnf5.conf-deprecated.5.rst new file mode 100644 index 000000000..03e520046 --- /dev/null +++ b/doc/dnf5.conf-deprecated.5.rst @@ -0,0 +1,45 @@ +.. + Copyright Contributors to the libdnf project. + + This file is part of libdnf: https://github.com/rpm-software-management/libdnf/ + + Libdnf is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + Libdnf is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libdnf. If not, see . + +.. _dnf5_conf_deprecated-label: + +Config Options that are deprecated in DNF5 +=========================================== + +`DNF5` has some options that are deprecated. +This section documents the options that are deprecated and will be removed in the future. + +If you find any issue, please, open a ticket at https://github.com/rpm-software-management/dnf5/issues. + + + .. WARNING:: + All config options documented here are deprecated. + +[main] Options +============== + +.. _strict_options-label: + +``strict`` + :ref:`boolean ` + + If disabled, all unavailable packages or packages with broken dependencies given to DNF5 + command will be skipped without raising the error causing the whole operation to fail. + Currently works for install command only. + + Default: ``True``. diff --git a/doc/dnf5.conf-todo.5.rst b/doc/dnf5.conf-todo.5.rst new file mode 100644 index 000000000..530fec96e --- /dev/null +++ b/doc/dnf5.conf-todo.5.rst @@ -0,0 +1,366 @@ +.. + Copyright Contributors to the libdnf project. + + This file is part of libdnf: https://github.com/rpm-software-management/libdnf/ + + Libdnf is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + Libdnf is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libdnf. If not, see . + +.. _dnf5_conf_todo-label: + +Options that are documented/implemented in DNF but not in DNF5 +============================================================== + +`DNF5` has some options that are not yet implemented or documented. +This section marks the config options that are missing. +Some of the options might be duplicated in :ref:`DNF5 Configuration Reference`. +In the event there are some duplicates, this section should +be considered invalid and the option implemented and documented. +If you find any issue, please, open a ticket at https://github.com/rpm-software-management/dnf5/issues. + +This section does not track any deprecated option. For such options see :ref:`Deprecated Config Options` + +[main] Options +============== + +.. _arch_options-label: + +``arch`` + +.. _autocheck_running_kernel_options-label: + +``autocheck_running_kernel`` + :ref:`boolean ` + + Automatic check whether there is installed newer kernel module with security update than currently running kernel. + + Default: ``True``. + + .. NOTE:: + YUM compatibility option + +.. _basearch_options-label: + +``basearch`` + +.. _logfilelevel_options-label: + +``logfilelevel`` + +.. _log_compress_options-label: + +``log_compress`` + +.. _transaction_history_dir_options-label: + +``transaction_history_dir`` + +.. _transformdb_options-label: + +``transformdb`` + +.. _recent_options-label: + +``recent`` + +.. _reset_nice_options-label: + +``reset_nice`` + +.. _system_cachedir_options-label: + +``system_cachedir`` + +.. _debuglevel_options-label: + +``debuglevel`` + :ref:`integer ` + + Debug messages output level, in the range ``0`` to ``10``. The higher the number the + more debug output is put to stdout. + + Default: ``2``. + +.. _debugdir_options-label: + +``debugdir`` + +.. _diskspacecheck_options-label: + +``diskspacecheck`` + :ref:`boolean ` + + If enabled, controls whether rpm should check available disk space during the transaction. + + Default: ``True``. + +.. _errorlevel_options-label: + +``errorlevel`` + :ref:`integer ` + + Error messages output level, in the range ``0`` to ``10``. The higher the number the + more error output is put to stderr. + + Default: ``3``. + + .. WARNING:: + This is deprecated in DNF and overwritten by -verbose commandline option. + +.. _exit_on_lock_options-label: + +``exit_on_lock`` + :ref:`boolean ` + + If enabled, DNF5 will exit immediately when something else has the lock. + + Default: ``False``. + +.. _gpgkey_dns_verification_options-label: + +``gpgkey_dns_verification`` + :ref:`boolean ` + + If enabled, DNF5 will attempt to automatically verify GPG verification keys using the DNS + system. + + This option requires the unbound python module (python3-unbound) to + be installed on the client system. This system has two main features. The first + one is to check if any of the already installed keys have been revoked. Automatic + removal of the key is not yet available, so it is up to the user, to remove + revoked keys from the system. The second feature is automatic verification + of new keys when a repository is added to the system. In interactive mode, the + result is written to the output as a suggestion to the user. In + non-interactive mode (i.e. when -y is used), this system will automatically + accept keys that are available in the DNS and are correctly signed using + DNSSEC. It will also accept keys that do not exist in the DNS system and + their NON-existence is cryptographically proven using DNSSEC. This is mainly to + preserve backward compatibility. + + Default: ``False``. + +.. _use_host_config_options-label: + +``use_host_config`` + +.. _config_file_age_options-label: + +``config_file_age`` + +.. _disable_excludes_options-label: + +``disable_excludes`` + +.. _allow_downgrade_options-label: + +``allow_downgrade`` + +.. _bugtracker_url_options-label: + +``bugtracker_url`` + +.. _history_record_options-label: + +``history_record`` + +.. _history_record_packages_options-label: + +``history_record_packages`` + +.. _skip_broken_options-label: + +``skip_broken`` + +.. _skip_unavailable_options-label: + +``skip_unavailable`` + +.. _history_list_view_options-label: + +``history_list_view`` + +.. _destdir_options-label: + +``destdir`` + +.. _comment_options-label: + +``comment`` + +.. _downloadonly_options-label: + +``downloadonly`` + +.. _build_cache_options-label: + +``build_cache`` + +.. _exclude_from_weak_options-label: + +``exclude_from_weak`` + +.. _exclude_from_weak_autodetect_options-label: + +``exclude_from_weak_autodetect`` + +.. _releasever_options-label: + +``releasever`` + +.. _module_obsoletes_options-label: + +``module_obsoletes`` + :ref:`boolean ` + + If enabled, DNF5 tries to apply modular obsoletes when possible. + + Default: ``False``. + +.. _module_stream_switch_options-label: + +``module_stream_switch`` + :ref:`boolean ` + + If enabled, allows switching enabled streams of a module. + + Default: ``False``. + +.. _rpmverbosity_options-label: + +``rpmverbosity`` + :ref:`string ` + + RPM debug scriptlet output level. One of: ``critical``, ``emergency``, + ``error``, ``warn``, ``info`` or ``debug``. + + Default: ``info``. + +.. _upgrade_group_objects_upgrade_options-label: + +``upgrade_group_objects_upgrade`` + :ref:`boolean ` + + If enabled, performs the automatic running of ``group upgrade`` when running the ``upgrade`` command. + + Default: ``True``. + +[main] Options - Colors +======================= + +.. _color_options-label: + +``color`` + :ref:`string ` + + Controls if DNF5 uses colored output on the command line. + Possible values: ``auto``, ``never``, ``always``. + + Default: ``auto``. + +.. _color_list_installed_older_options-label: + +``color_list_installed_older`` + :ref:`color ` + + Color of installed packages that are older than any version among available packages. + The option is used during list operations. + + Default: ``yellow``. + +.. _color_list_installed_newer_options-label: + +``color_list_installed_newer`` + :ref:`color ` + + Color of installed packages that are newer than any version among available packages. + The option is used during list operations. + + Default: ``bold,yellow``. + +.. _color_list_installed_reinstall_options-label: + +``color_list_installed_reinstall`` + :ref:`color ` + + Color of installed packages that are among available packages and can be reinstalled. + The option is used during list operations. + + Default: ``dim,cyan``. + +.. _color_list_installed_extra_options-label: + +``color_list_installed_extra`` + :ref:`color ` + + Color of installed packages that do not have any version among available packages. + The option is used during list operations. + + Default: ``bold,red``. + +Repo Options +============ + +.. _baseurl_repo_options-label: + +``baseurl`` + +.. _cost_repo_options-label: + +``cost`` + +.. _gpgcheck_options-label: + +``gpgcheck`` + +.. _gpgkey_repo_options-label: + +``gpgkey`` + +.. _metalink_repo_options-label: + +``metalink`` + +.. _metadata_timer_sync_options-label: + +``metadata_timer_sync`` + +.. _mirrorlist_repo_options-label: + +``mirrorlist`` + +.. _module_hotfixes_repo_options-label: + +``module_hotfixes`` + +.. _name_repo_options-label: + +``name`` + +.. _priority_repo_options-label: + +``priority`` + +.. _type_repo_options-label: + +``type`` + + +Repo Variables +============== + +Options for both [main] and Repo +================================ + +.. _sslverifystatus_options-label: + +``sslverifystatus`` diff --git a/doc/dnf5.conf.5.rst b/doc/dnf5.conf.5.rst new file mode 100644 index 000000000..6974e2770 --- /dev/null +++ b/doc/dnf5.conf.5.rst @@ -0,0 +1,1175 @@ +.. + Copyright Contributors to the libdnf project. + + This file is part of libdnf: https://github.com/rpm-software-management/libdnf/ + + Libdnf is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + Libdnf is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libdnf. If not, see . + +.. _dnf5_conf-label: + +############################## + DNF5 Configuration Reference +############################## + +Description +=========== + +`DNF5` by default uses the global configuration file at /etc/dnf/dnf.conf. + +The configuration file has INI format consisting of section declaration and name=value options below each on separate +line. There are two types of sections in the configuration files: main and repository. Main section defines all +global configuration options and should be only one. + +The repository sections define the configuration for each (remote or local) repository. The section name of the +repository in brackets serve as repo ID reference and should be unique across configuration files. The allowed +characters of repo ID string are lower and upper case alphabetic letters, digits, -, _, . and :. The minimal +repository configuration file should aside from repo ID consists of baseurl, metalink or mirrorlist option definition. + +.. _conf_main_options-label: + +[main] Options +============== + +.. _allow_vendor_change_options-label: + +``allow_vendor_change`` + :ref:`boolean ` + + If disabled DNF5 will stick to vendor when upgrading or downgrading rpms. + + Default: ``True``. + + .. WARNING:: This option is currently not supported for `downgrade` and `distro-sync` commands + +.. _assumeno_options-label: + +``assumeno`` + :ref:`boolean ` + + If enabled DNF5 will assume ``No`` where it would normally prompt for confirmation from user input + + Default: ``False``. + +.. _assumeyes_options-label: + +``assumeyes`` + :ref:`boolean ` + + If enabled DNF5 will assume ``Yes`` where it would normally prompt for + confirmation from user input (see also :ref:`defaultyes + `). + + Default: ``False``. + +.. _best_options-label: + +``best`` + :ref:`boolean ` + + If ``True``, instructs the solver to either use a package with the highest + available version or fail. If ``False``, do not fail if the latest version + cannot be installed and go with the lower version. + + Default: ``True``. + + .. NOTE:: + This option in particular :ref:`can be set in your configuration file by + your distribution `. + +.. _cachedir_options-label: + +``cachedir`` + :ref:`string ` + + Path to a directory used by various DNF5 subsystems for storing cache data. + Has a reasonable root-writable default depending on the distribution. DNF5 + needs to be able to create files and directories at this location. + + Default: ``/var/cache/libdnf5``. + +.. _cacheonly_options-label: + +``cacheonly`` + :ref:`string ` + + Can be ``all``, ``metadata``, ``none``. + + If set to ``all`` DNF5 will run entirely from system cache, will not update + the cache and will use the system cache even if it is expired. + + If set to ``metadata`` DNF5 will cache metadata only. + + Default: ``none``. + + .. NOTE:: + API Notes: Must be set before repository objects are created. Plugins must set + this in the pre_config hook. Later changes are ignored. + +.. _check_config_file_age_options-label: + +``check_config_file_age`` + :ref:`boolean ` + + If enabled DNF5 should automatically expire metadata of repos, which are older than + their corresponding configuration file (usually the dnf.conf file and the foo.repo file). + + Default: ``True``. + + .. NOTE:: + Expire of metadata is also affected by metadata age. See also + + :ref:`metadata_expire `. + +.. _clean_requirements_on_remove_options-label: + +``clean_requirements_on_remove`` + :ref:`boolean ` + + If enabled, DNF5 will remove dependencies that are no longer used during ``dnf remove``. + A package only qualifies for removal via ``clean_requirements_on_remove`` if it was + installed through DNF5 but not on explicit user request, i.e. it was pulled in as a dependency. + + :ref:`installonlypkgs ` are never automatically removed. + + Default: ``True``. + +.. _debug_solver_options-label: + +``debug_solver`` + :ref:`boolean ` + + If enabled, libsolv debug files will be created when solving the + transaction. The debug files are created in the `./debugdata` directory. + + Default: ``False``. + +.. _defaultyes_options-label: + +``defaultyes`` + :ref:`boolean ` + + If enabled, the default answer to user confirmation prompts will be ``Yes``. + Not to be confused with :ref:`assumeyes ` which will not prompt at all. + + Default: ``False``. + +.. _group_package_types_options-label: + +``group_package_types`` + :ref:`list ` + + List of the following: ``optional``, ``default``, ``mandatory``. + + Tells DNF5 which type of packages in groups will be installed when 'groupinstall' is called. + + Default: ``default,mandatory``. + +.. _ignorearch_options-label: + +``ignorearch`` + :ref:`boolean ` + + If enabled, RPM will allow attempts to install packages incompatible with the CPU's architecture. + + Default: ``False``. + +.. _installonlypkgs_options-label: + +``installonlypkgs`` + :ref:`list ` + + List of provide names of packages that should only ever be installed, never + upgraded. Kernels in particular fall into this category. + These packages are never removed by ``dnf autoremove`` even if they were + installed as dependencies (see + :ref:`clean_requirements_on_remove ` + for auto removal details). + This option append the list values to the default installonlypkgs list used + by DNF5. The number of kept package versions is regulated + by :ref:`installonly_limit `. + +.. _installonly_limit_options-label: + +``installonly_limit`` + :ref:`integer ` + + Number of :ref:`installonly packages ` allowed to be installed + concurrently. + + ``1`` is explicitly not allowed since it complicates kernel upgrades due to protection of + the running kernel from removal. + + Minimum is ``2``. + + ``0`` means unlimited number of installonly packages. + + Default: ``3``. + +.. _installroot_options-label: + +``installroot`` + :ref:`string ` + + The root of the filesystem for all packaging operations. + It requires an absolute path. + See also :ref:`--installroot commandline option `. + + Default: ``/``. + +.. _install_weak_deps_options-label: + +``install_weak_deps`` + :ref:`boolean ` + + If enabled, when a new package is about to be installed, all packages linked by weak dependency + relation (Recommends or Supplements flags) with this package will be pulled into the transaction. + + Default: ``True``. + +.. _keepcache_options-label: + +``keepcache`` + :ref:`boolean ` + + If enabled, keeps downloaded packages in the cache. If disabled cache will persist + until the next successful transaction even if no packages have been installed. + + Default: ``False``. + +.. _logdir_options-label: + +``logdir`` + :ref:`string ` + + Directory where the log files will be stored. + + Default: ``/var/log``. + +.. _log_rotate_options-label: + +``log_rotate`` + :ref:`integer ` + + Log files are rotated ``log_rotate`` times before being removed. + If ``log_rotate`` is ``0``, the rotation is not performed. + + Default: ``4``. + +.. _log_size_options-label: + +``log_size`` + :ref:`storage size ` + + Log files are rotated when they grow bigger than ``log_size`` bytes. If + ``log_size`` is ``0``, the rotation is not performed. + + The size applies for individual log files, not the sum of all log files. + See also :ref:`log_rotate `. + + Default: ``1M``. + +.. _module_platform_id_options-label: + +``module_platform_id`` + :ref:`string ` + + Set this to ``$name:$stream`` to override ``PLATFORM_ID`` detected from ``/etc/os-release``. + It is necessary to perform a system upgrade and switch to a new platform. + + Default: empty. + +.. _multilib_policy_options-label: + +``multilib_policy`` + :ref:`string ` + + Controls how multilib packages are treated during install operations. + + Can either be ``best`` for the depsolver to prefer packages which best match the system's + architecture, or ``all`` to install packages for all available architectures. + + Default: ``best``. + +.. _obsoletes_options-label: + +``obsoletes`` + :ref:`boolean ` + + If enabled, DNF5 uses obsoletes processing logic, which means it checks whether + any dependencies of given package are no longer required and removes them. + + Useful when doing distribution level upgrades. + + It has effect during install/upgrade processes. + + Command-line option: :ref:`--obsoletes ` + + Default: ``True``. + +.. _optional_metadata_types_options-label: + +``optional_metadata_types`` + :ref:`list ` + + List of the following: ``comps``, ``filelists``, ``other``, ``presto``, ``updateinfo`` + + Defines which types of metadata are to be loaded in addition to primary and modules, which are loaded always as they are essential. Note that the list can be extended by individual DNF commands during runtime. + + Default: ``comps,updateinfo`` + +.. _persistdir_options-label: + +``persistdir`` + :ref:`string ` + + Directory where DNF5 stores its persistent data between runs. + + Default: ``/var/lib/dnf``. + +.. _pluginconfpath_options-label: + +``pluginconfpath`` + :ref:`list ` + + List of directories that are searched for plugin configurations to load. + + All configuration files found in these directories, that are named same as a + plugin, are parsed. + + Default: ``/etc/dnf/plugins``. + +.. _pluginpath_options-label: + +``pluginpath`` + :ref:`list ` + + List of directories that are searched for plugins to load. Plugins found in + *any of the directories* in this configuration option are used. + + Default: a Python version-specific path. + +.. _plugins_options-label: + +``plugins`` + :ref:`boolean ` + + If enabled, DNF5 plugins are enabled. + + Default: ``True``. + +.. _protected_packages_options-label: + +``protected_packages`` + :ref:`list ` + + List of packages that DNF5 should never completely remove. + + They are protected via Obsoletes as well as user/plugin removals. + + Default: ``dnf5,glob:/etc/dnf/protected.d/*.conf``. + + .. NOTE:: + Any packages which should be protected can do so by including a file in ``/etc/dnf/protected.d`` + with their package name in it. + + DNF5 will protect also the package corresponding to the running version of the kernel. See also + :ref:`protect_running_kernel ` option. + +.. _protect_running_kernel_options-label: + +``protect_running_kernel`` + :ref:`boolean ` + + Controls whether the package corresponding to the running version of kernel is protected from removal. + + Default: ``True``. + + .. NOTE:: + YUM compatibility option + +.. _reposdir_options-label: + +``reposdir`` + :ref:`list ` + + Repository configuration files locations. + + The behavior of ``reposdir`` could differ when it is used + along with \-\ :ref:`-installroot ` option. + + Default: TODO add default + +.. _system_state_options-label: + +``system_state`` + +.. _tsflags_options-label: + +``tsflags`` + :ref:`list ` + + List of strings adding extra flags for the RPM transaction. + + ================ =============================== + tsflag value RPM Transaction Flag + ================ =============================== + ``noscripts`` ``RPMTRANS_FLAG_NOSCRIPTS`` + ``test`` ``RPMTRANS_FLAG_TEST`` + ``notriggers`` ``RPMTRANS_FLAG_NOTRIGGERS`` + ``nodocs`` ``RPMTRANS_FLAG_NODOCS`` + ``justdb`` ``RPMTRANS_FLAG_JUSTDB`` + ``nocontexts`` ``RPMTRANS_FLAG_NOCONTEXTS`` + ``nocaps`` ``RPMTRANS_FLAG_NOCAPS`` + ``nocrypto`` ``RPMTRANS_FLAG_NOFILEDIGEST`` + ================ =============================== + + The ``nocrypto`` option will also set the ``_RPMVSF_NOSIGNATURES`` and + ``_RPMVSF_NODIGESTS`` VS flags. + + The ``test`` option provides a transaction check without performing the transaction. + It includes downloading of packages, gpg keys check (including permanent import of + additional keys if necessary), and rpm check to prevent file conflicts. + + The ``nocaps`` is supported with rpm-4.14 or later. When ``nocaps`` is used but rpm + doesn't support it, DNF5 only reports it as an invalid tsflag. + + Default: empty. + +.. _use_host_config_options-label: + +``use_host_config`` + +.. _varsdir_options-label: + +``varsdir`` + :ref:`list ` + + List of directories where variables definition files are looked for. + + See :ref:`variable files ` in Configuration reference. + + + Default: ``/etc/dnf/vars``. + +.. _zchunk_options-label: + +``zchunk`` + :ref:`boolean ` + + If enabled, repository metadata are compressed using the zchunk format (if available). + + Default: ``True``. + +[main] Options - Colors +======================= + +.. _color_list_available_upgrade_options-label: + +``color_list_available_upgrade`` + :ref:`color ` + + Color of available packages that are newer than installed packages. + The option is used during list operations. + + Default: ``bold,blue``. + +.. _color_list_available_downgrade_options-label: + +``color_list_available_downgrade`` + :ref:`color ` + + Color of available packages that are older than installed packages. + The option is used during list operations. + + Default: ``dim,magenta``. + +.. _color_list_available_reinstall_options-label: + +``color_list_available_reinstall`` + :ref:`color ` + + Color of available packages that are identical to installed versions and are available for reinstalls. + The option is used during list operations. + + Default: ``bold,green``. + +.. _color_list_available_install_options-label: + +``color_list_available_install`` + :ref:`color ` + + Color of packages that are available for installation and none of their versions in installed. + The option is used during list operations. + + Default: ``bold,cyan``. + +.. _color_update_installed_options-label: + +``color_update_installed`` + :ref:`color ` + + Color of removed packages. + This option is used during displaying transactions. + + Default: ``dim,red``. + +.. _color_update_local_options-label: + +``color_update_label`` + :ref:`color ` + + Color of local packages that are installed from the @commandline repository. + This option is used during displaying transactions. + + Default: ``dim,green``. + +.. _color_update_remote_options-label: + +``color_update_remote`` + :ref:`color ` + + Color of packages that are installed/upgraded/downgraded from remote repositories. + This option is used during displaying transactions. + + Default: ``bold,green``. + +.. _color_search_match_options-label: + +``color_search_match`` + :ref:`color ` + + Color of patterns matched in search output. + + Default: ``bold,magenta``. + + +Repo Options +============ + +.. _enabled_options-label: + +``enabled`` + :ref:`boolean ` + + Include this repository as a package source. + + Default: ``True``. + +Repo Variables +============== + +Right side of every repo option can be enriched by the following variables: + +``$arch`` + + Refers to the system’s CPU architecture e.g, aarch64, i586, i686 and x86_64. + +``$basearch`` + + Refers to the base architecture of the system. For example, i686 and i586 machines + both have a base architecture of i386, and AMD64 and Intel64 machines have a base architecture of x86_64. + +``$releasever`` + + Refers to the release version of operating system which DNF5 derives from information available in RPMDB. + + +In addition to these hard coded variables, user-defined ones can also be used. +They can be defined either via :ref:`variable files `, or by using special environmental variables. +The names of these variables must be prefixed with DNF_VAR\_ and they can only consist of alphanumeric characters +and underscores:: + + $ DNF_VAR_MY_VARIABLE=value + +To use such variable in your repository configuration remove the prefix. E.g.:: + + [myrepo] + baseurl=https://example.site/pub/fedora/$MY_VARIABLE/releases/$releasever + +Note that it is not possible to override the ``arch`` and ``basearch`` variables using either variable files or +environmental variables. + +Although users are encouraged to use named variables, the numbered environmental variables +``DNF0`` - ``DNF9`` are still supported:: + + $ DNF1=value + + [myrepo] + baseurl=https://example.site/pub/fedora/$DNF1/releases/$releasever + +Options for both [main] and Repo +================================ + +Some options can be applied in either the main section, per repository, or in a +combination. The value provided in the main section is used for all repositories +as the default value, which repositories can then override in their +configuration. + + +.. _bandwidth_options-label: + +``bandwidth`` + :ref:`storage size ` + + Total bandwidth available for downloading. + Meaningful when used with the :ref:`throttle option `. + + Default: ``0``. + +.. _countme_options-label: + +``countme`` + :ref:`boolean ` + + Determines whether a special flag should be added to a single, randomly + chosen metalink/mirrorlist query each week. + This allows the repository owner to estimate the number of systems + consuming it, by counting such queries over a week's time, which is much + more accurate than just counting unique IP addresses (which is subject to + both overcounting and undercounting due to short DHCP leases and NAT, + respectively). + + The flag is a simple "countme=N" parameter appended to the metalink and + mirrorlist URL, where N is an integer representing the "longevity" bucket + this system belongs to. + The following 4 buckets are defined, based on how many full weeks have + passed since the beginning of the week when this system was installed: 1 = + first week, 2 = first month (2-4 weeks), 3 = six months (5-24 weeks) and 4 + = more than six months (> 24 weeks). + This information is meant to help distinguish short-lived installs from + long-term ones, and to gather other statistics about system lifecycle. + + Default: ``False``. + +.. _deltarpm_options-label: + +``deltarpm`` + :ref:`boolean ` + + If enabled, DNF5 will save bandwidth by downloading much smaller delta RPM + files, rebuilding them to RPM locally. However, this is quite CPU and I/O + intensive. + + Default: ``True``. + +.. _deltarpm_percentage_options-label: + +``deltarpm_percentage`` + :ref:`integer ` + + When the relative size of delta vs pkg is larger than this, delta is not used. + (Deltas must be at least 25% smaller than the pkg). + Use ``0`` to turn off delta rpm processing. Local repositories (with + file:// baseurl) have delta rpms turned off by default. + + Default: ``75`` + +.. _enablegroups_options-label: + +``enablegroups`` + :ref:`boolean ` + + If enabled, DNF5 will allow the use of package groups. + + Default: ``True``. + +.. _excludepkgs_options-label: + +``excludepkgs`` + :ref:`list ` + + Exclude packages of this repository, specified by a name or a glob and + separated by a comma, from all operations. + + Can be disabled using ``--disableexcludes`` command line switch. + + Default: ``[]``. + +.. _fastestmirror_options-label: + +``fastestmirror`` + :ref:`boolean ` + + If enabled, a metric is used to find the fastest available mirror. + This overrides the order provided by the mirrorlist/metalink file itself. + This file is often dynamically generated by the server to provide the best download speeds and enabling + fastestmirror overrides this. + + Default: ``False``. + +.. _includepkgs_options-label: + +``includepkgs`` + :ref:`list ` + + Include packages of this repository, specified by a name or a glob and separated by a comma, in all operations. + + Inverse of :ref:`excludepkgs `, DNF5 will exclude any package in the repository + that doesn't match this list. + + This works in conjunction with :ref:`excludepkgs ` and doesn't override it, + so if you 'excludepkgs=*.i386' and 'includepkgs=python*' then only packages starting with python + that do not have an i386 arch will be seen by DNF5 in this repo. + + Can be disabled using ``--disableexcludes`` command line switch. + + Default: ``[]``. + +.. _ip_resolve_options-label: + +``ip_resolve`` + :ref:`ip address ` + + Determines how DNF5 resolves host names. Set this to ``4``, ``IPv4``, ``6``, ``IPv6`` + to resolve to IPv4 or IPv6 addresses only. + + Default: ``whatever``. + +.. _localpkg_gpgcheck_options-label: + +``localpkg_gpgcheck`` + :ref:`boolean ` + + If enabled, DNF5 will perform a GPG signature check on local packages (packages in a file, not in a repository). + + This option is subject to the active RPM security policy + (see :ref:`gpgcheck ` for more details). + + Default: ``False``. + +.. _max_parallel_downloads_options-label: + +``max_parallel_downloads`` + :ref:`integer ` + + Maximum number of simultaneous package downloads. Max is ``20``. + + Default: ``3``. + +.. _metadata_expire_options-label: + +``metadata_expire`` + :ref:`time in seconds ` + + The period after which the remote repository is checked for metadata update and in the positive + case the local metadata cache is updated. + It can be ``-1`` or ``never`` to make the repo never considered expired. + + Expire of metadata can be also triggered by change of timestamp of configuration files + (``dnf.conf``, ``.repo``). + + See also :ref:`check_config_file_age `. + + Default: ``60 * 60 * 48``, 48 hours. + +.. _minrate_options-label: + +``minrate`` + :ref:`storage size ` + + Sets the low speed threshold in bytes per second. + If the server is sending data at the same or slower speed than this value for at least + :ref:`timeout option ` seconds, DNF5 aborts the connection. + + Default: ``1000``. + +.. _password_options-label: + +``password`` + :ref:`string ` + + The password used to connect to a repository with basic HTTP authentication. + + Default: empty. + +.. _proxy_options-label: + +``proxy`` + :ref:`string ` + + URL of a proxy server to connect through. + + Set to an empty string in the repository configuration to disable proxy + setting inherited from the main section. The expected format of this option is + ``://[:port]``. + (For backward compatibility, '_none_' can be used instead of the empty string.) + + Default: empty. + + .. NOTE:: + The curl environment variables (such as ``http_proxy``) are effective if this option is unset + (or '_none_' is set in the repository configuration). See the ``curl`` man page for details. + +.. _proxy_username_options-label: + +``proxy_username`` + :ref:`string ` + + The username to use for connecting to the proxy server. + + Default: empty. + +.. _proxy_password_options-label: + +``proxy_password`` + :ref:`string ` + + The password to use for connecting to the proxy server. + + Default: empty. + +.. _proxy_auth_method_options-label: + +``proxy_auth_method`` + :ref:`string ` + + The authentication method used by the proxy server. Valid values are + + ============== ========================================================== + method meaning + ============== ========================================================== + ``basic`` HTTP Basic authentication + ``digest`` HTTP Digest authentication + ``negotiate`` HTTP Negotiate (SPNEGO) authentication + ``ntlm`` HTTP NTLM authentication + ``digest_ie`` HTTP Digest authentication with an IE flavor + ``ntlm_wb`` NTLM delegating to winbind helper + ``none`` None auth method + ``any`` All suitable methods + ============== ========================================================== + + Default: ``any``. + +.. _proxy_sslcacert_options-label: + +``proxy_sslcacert`` + :ref:`string ` + + Path to the file containing the certificate authorities to verify proxy SSL certificates. + + Default: empty, uses system default. + +.. _proxy_sslclientcert_options-label: + +``proxy_sslclientcert`` + :ref:`string ` + + Path to the SSL client certificate used to connect to proxy server. + + Default: empty. + +.. _proxy_sslclientkey_options-label: + +``proxy_sslclientkey`` + :ref:`string ` + + Path to the SSL client key used to connect to proxy server. + + Default: empty. + +.. _proxy_sslverify_options-label: + +``proxy_sslverify`` + :ref:`boolean ` + + If enabled, proxy SSL certificates are verified. If the client can not be authenticated, connecting fails and the + repository is not used any further. If ``False``, SSL connections can be used, but certificates are not verified. + + Default: ``True``. + +.. _repo_gpgcheck_options-label: + +``repo_gpgcheck`` + :ref:`boolean ` + + If enabled, DNF5 will perform GPG signature check on this repository's metadata. + + + .. NOTE:: + GPG keys for this check are stored separately from GPG keys used in package signature + verification. Furthermore, they are also stored separately for each repository. + + This means that DNF5 may ask to import the same key multiple times. For example, when a key was + already imported for package signature verification and this option is turned on, it may be needed + to import it again for the repository. + + Default: ``False``. + +.. _retries_options-label: + +``retries`` + :ref:`integer ` + + Set the number of total retries for downloading packages. + The number is cumulative, so e.g. for ``retries=10``, DNF5 will fail after any package + download fails for eleventh time. + + Setting this to ``0`` makes DNF5 try forever. + + Default: ``10``. + +.. _skip_if_unavailable_options-label: + +``skip_if_unavailable`` + :ref:`boolean ` + + If enabled, DNF5 will continue running and disable the repository that couldn't be synchronized + for any reason. This option doesn't affect skipping of unavailable packages after dependency + resolution. To check inaccessibility of repository use it in combination with + :ref:`refresh command line option `. + + Default: ``False``. + + .. NOTE:: + this option in particular :ref:`can be set in your configuration file + by your distribution `. + +.. _sslcacert_options-label: + +``sslcacert`` + :ref:`string ` + + Path to the file containing the certificate authorities to verify SSL certificates. + + Default: empty, uses system default. + +.. _sslclientcert_options-label: + +``sslclientcert`` + :ref:`string ` + + Path to the SSL client certificate used to connect to remote sites. + + Default: empty. + +.. _sslclientkey_options-label: + +``sslclientkey`` + :ref:`string ` + + Path to the SSL client key used to connect to remote sites. + + Default: empty. + +.. _sslverify_options-label: + +``sslverify`` + :ref:`boolean ` + + If enabled, remote SSL certificates are verified. If the client can not be authenticated, + connecting fails and the repository is not used any further. + If disabled, SSL connections can be used, but certificates are not verified. + + Default: ``True``. + +.. _throttle_options-label: + +``throttle`` + :ref:`storage size ` + + Limits the downloading speed. It might be an absolute value or a percentage, relative to the value of the + :ref:`bandwidth option ` option. ``0`` means no throttling. + + Default: ``0``. + +.. _timeout_options-label: + +``timeout`` + :ref:`time in seconds ` + + Number of seconds to wait for a connection before timing out. Used in combination with + :ref:`minrate option ` option. + + Default: ``30``. + +.. _username_options-label: + +``username`` + :ref:`string ` + + The username to use for connecting to repo with basic HTTP authentication. + + Default: empty. + +.. _user_agent_options-label: + +``user_agent`` + :ref:`string ` + + The User-Agent string to include in HTTP requests sent by DNF5. + + Default: :: + + libdnf (NAME VERSION_ID; VARIANT_ID; OS.BASEARCH) + + .. NOTE:: + ``NAME``, ``VERSION_ID`` and ``VARIANT_ID`` are OS identifiers read from the + :manpage:`os-release(5)` file, and ``OS`` and ``BASEARCH`` are the canonical OS + name and base architecture, respectively. + Example: :: + + libdnf (Fedora 39; server; Linux.x86_64) + + +Types of Options +================ + +.. _boolean-label: + +``boolean`` + Data type with only two possible values. + + One of following options can be used: ``1``, ``0``, ``True``, ``False``, ``yes``, ``no``. + +.. _color-label: + +``color`` + String describing color and modifiers separated with a comma, for example ``red,bold``. + + * Colors: ``black``, ``blue``, ``cyan``, ``green``, ``magenta``, ``red``, ``white``, ``yellow``. + * Modifiers: ``bold``, ``blink``, ``dim``, ``normal``, ``reverse``, ``underline``. + +.. _integer-label: + +``integer`` + Whole number that can be written without a fractional component. + +.. _ip_address_type-label: + +``ip address type`` + String describing ip address types. + + One of the following options can be used: ``4``, ``IPv4``, ``6``, ``IPv6``. + +.. _list-label: + +``list`` + String representing one or more strings separated by space or comma characters. + +.. _storage_size-label: + +``storage size`` + String representing storage sizes formed by an integer and a unit. + + Valid units are ``k``, ``M``, ``G``. + +.. _string-label: + +``string`` + It is a sequence of symbols or digits without any whitespace character. + +.. _time_in_seconds-label: + +``time in seconds`` + String representing time units in seconds. Can be set to ``-1`` or ``never``. + + +Files +===== + +.. _main_configuration_file-label: + +``Main Configuration File`` + /etc/dnf/dnf.conf + +.. _cache_files-label: + +``Cache Files`` + /var/cache/libdnf5 + +.. _repo_files-label: + +``Repository Files`` + /etc/yum.repos.d/ + +.. _varfiles-label: + +``Variables`` + Any property named file in ``/etc/dnf/vars`` is turned into a variable named after the filename + (or overrides any of the above variables but those set from commandline). + Filenames may contain only alphanumeric characters and underscores and be in lowercase. + Variables are also read from ``/etc/yum/vars`` for YUM compatibility reasons. + +Drop-in configuration directories +================================= + +`DNF5` loads configuration options that are defined in the :ref:`main +configuration file `, :ref:`user configuration +files` and :ref:`distribution configuration +files`. + +Users can define custom config options in this way. + +1. Configuration files are alphabetically sorted in a list of names from the + :ref:`distribution configuration directory` + and the :ref:`user configuration directory`. If + a file with the same name is present in both directories, only the file from + the user configuration directory is added to the list. The + distribution file is then masked by the user file. +2. Options are retrieved in order from the list The configuration from the next + file overrides the previous one. The last option wins. + +.. _user_configuration_dir-label: + +``User Configuration Directory`` + /etc/dnf/libdnf5.conf.d/ + +.. _user_configuration_files-label: + +``User Configuration Files`` + /etc/dnf/libdnf5.conf.d/20-user-settings.conf + +.. _distro_configuration_dir-label: + +``Distribution Configuration Directory`` + /usr/share/dnf5/libdnf.conf.d/ + +.. _distro_configuration_files-label: + +``Distribution Configuration Files`` + /usr/share/dnf5/libdnf.conf.d/50-something.conf + +Example configuration: +---------------------- + +User configuration files: + +- /etc/dnf/dnf.conf +- /etc/dnf/libdnf5.conf.d/20-user-settings.conf +- /etc/dnf/libdnf5.conf.d/60-something.conf +- /etc/dnf/libdnf5.conf.d/80-user-settings.conf + +Distribution configuration files: + +- /usr/share/dnf5/libdnf.conf.d/50-something.conf +- /usr/share/dnf5/libdnf.conf.d/60-something.conf +- /usr/share/dnf5/libdnf.conf.d/90-something.conf + +Resulting file loading order by default +(/usr/share/dnf5/libdnf.conf.d/60-something.conf is skipped, masked by +the user file /etc/dnf/libdnf5.conf.d/60-something.conf): + +1. /etc/dnf/libdnf5.conf.d/20-user-settings.conf +2. /usr/share/dnf5/libdnf.conf.d/50-something.conf +3. /etc/dnf/libdnf5.conf.d/60-something.conf +4. /etc/dnf/libdnf5.conf.d/80-user-settings.conf +5. /usr/share/dnf5/libdnf.conf.d/90-something.conf +6. /etc/dnf/dnf.conf + +See Also +======== + +* :manpage:`dnf5(8)`, :ref:`DNF5 Command Reference ` +* :manpage:`dnf5.conf-todo(5)`, :ref:`Options that are documented/implemented in DNF but not in DNF5 ` +* :manpage:`dnf5.conf-deprecated(5)`, :ref:`Config Options that are deprecated in DNF5 ` diff --git a/doc/index.rst b/doc/index.rst index 748250a76..e21a467e4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -14,6 +14,7 @@ Welcome to DNF5's documentation! commands/index dnf5_plugins/index dnf5.8 + dnf5.conf.5 dnf_daemon/index misc/index best_practices/index diff --git a/doc/libdnf5_plugins/actions.8.rst b/doc/libdnf5_plugins/actions.8.rst index 312bdec32..b2be069a8 100644 --- a/doc/libdnf5_plugins/actions.8.rst +++ b/doc/libdnf5_plugins/actions.8.rst @@ -25,7 +25,7 @@ Actions Plugin Description =========== -This plugin allows defining actions to be executed throught libdnf5 callbacks hooks. +This plugin allows defining actions to be executed through libdnf5 callbacks hooks. Each action is hooked to one specific callback. Actions for ``pre_transaction`` and ``post_transaction`` callbacks may define a (glob-like) filtering rule on the package NEVRA or package files, as well as whether the package is incoming or outgoing. @@ -55,7 +55,7 @@ Each non-comment line defines an action and consists of five items separated by * ``post_transaction`` ``package_filter`` - A (glob-like) filtering rule aplied on the package NEVRA (also in the shortened forms) or package files. + A (glob-like) filtering rule applied on the package NEVRA (also in the shortened forms) or package files. Empty filter means executing the command once with no information about the package. The "*" filter means executing the command for each package in the transaction that matches the ``direction`` filter. diff --git a/doc/misc/caching.7.rst b/doc/misc/caching.7.rst new file mode 100644 index 000000000..b96fae2ef --- /dev/null +++ b/doc/misc/caching.7.rst @@ -0,0 +1,172 @@ +.. + Copyright Contributors to the libdnf project. + + This file is part of libdnf: https://github.com/rpm-software-management/libdnf/ + + Libdnf is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + Libdnf is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libdnf. If not, see . + +.. TODO(jkolarik): Add link to modularity in "What are the metadata types" when the page exists +.. TODO(jkolarik): Add link to dnf5.conf options when the page exists + + +.. _caching_misc_ref-label: + +######## + Caching +######## + + +Description +=========== + +This page aims to provide an overview of the various instruments, such as configuration options, +command-line parameters, and commands, available in DNF5 for manipulating cached data and +their associated scenarios. + + +Cached Data Location +==================== + +Following directory structure illustrates a typical DNF5 cache directory: + +.. code-block:: bash + :linenos: + + /var/cache/libdnf5/ + ├── fedora-* + │   ├── metalink.xml + │   ├── repodata + │   │   ├── *-comps-Everything.x86_64.xml + │   │   ├── *-primary.xml.zck + │   │   └── repomd.xml + │   └── solv + │   ├── fedora-group.solvx + │   └── fedora.solv + ├── temporary_files.toml + └── updates-* + ├── metalink.xml + ├── packages + │   └── bash-5.2.21-1.fc38.x86_64.rpm + ├── repodata + │   ├── *-primary.xml.zck + │   ├── *-updateinfo.xml.zck + │   ├── *-comps-Everything.x86_64.xml.gz + │   └── repomd.xml + └── solv + ├── updates-group.solvx + ├── updates-updateinfo.solvx + └── updates.solv + +The default root cache directory is ``/var/cache/libdnf5``, but when DNF5 runs as another user, +it uses the cache from ``/home/$USER/.cache/libdnf5`` with the same structure. The root cache +directory can be redefined using the ``system_cachedir`` configuration option, and the user +cachedir with the ``cachedir`` option. + +Within the cache directory, there are subdirectories corresponding to each configured repository, +such as ``fedora-*`` and ``updates-*``. These contain metadata files in the ``repodata`` directory +and solver-generated cached files in the ``solv`` directory. The solver files, used to enhance +performance in resolving package dependencies or running queries, can be enabled or disabled on +a repository level through the ``build_cache`` configuration option. The ``packages`` directory +may store downloaded packages from a repository, and a ``metalink`` or ``mirrorlist`` file provides +information on the remote locations of the repository data. + +Additionally, the root cache directory contains a ``temporary_files.toml`` file related to +temporarily stored packages in the system. + + +Metadata Types +============== + +There are several types of metadata downloaded from remote locations and processed in DNF5. + +Some metadata is mandatory and always considered. The main repository metadata file, ``repomd.xml``, +contains information about specific metadata type files related to a repository, such as checksums, +file sizes, and their locations in the metadata hierarchy. Another mandatory file is the ``primary`` +metadata file, providing detailed information about available packages, including package names, +versions, dependencies, etc. If DNF5 is compiled with modularity support, ``modules`` metadata is +also downloaded and processed. + +Other metadata types are optional and can be loaded into DNF5 in the following ways: + +* Explicit user request by adding the requested type to the ``optional_metadata_types`` configuration option +* Automatically during runtime, depending on the CLI command used +* For ``filelists`` metadata, when the user passes any filepath argument + +Here is the list of supported optional metadata types: + +* ``comps``: Metadata containing package groups and environment descriptions +* ``filelists``: Information about all files provided by packages +* ``updateinfo``: Security-related updates and advisories information +* ``presto``: Information related to delta RPMs +* ``other``: Additional metadata, such as changelogs + +If the required metadata is not present in the system, it can result in different scenarios, +such as returning an empty query, error output for no match for an argument, or an error when +resolving a transaction. + + +Caching Packages +================ + +By default, DNF5 does not cache downloaded package data, as the ``keepcache`` option is configured +to ``False``. With this setting, every time DNF5 downloads a package from the remote location, +it tracks it within the ``temporary_files.toml`` in the repository cache directory. After the next +successful transaction run, all the files are removed based on this list. This process occurs only +when the transaction contains any inbound action; otherwise, packages are retained, considering +potential use cases. + +When the keepcache option is set to ``True``, downloaded files are not tracked, and they could be +removed later, either manually or by executing the ``clean`` command, for example, +``dnf5 clean packages``. + + +Sharing Root Cache Among Users +============================== + +Typically, DNF5 is run with superuser privileges to make system changes. However, there are +scenarios where executing queries without elevated privileges is sufficient. In such cases, +we may need to download the entire repository metadata for the user account from the remote, +even if there is existing data in the root's cache. + +In DNF5, when checking for empty, expired, or invalid repository metadata while running under +a non-root account, we first examine the root's location. If metadata is present there, it is +copied to the user cache location. Note that this cloning of metadata is optimized when +copy-on-write functionality is present on the filesystem, such as with btrfs. + + +Cacheonly Option vs Parameter +============================= + +To instruct DNF5 to operate exclusively with cached data, avoiding downloads from remote locations, +two instruments are available. First, using the ``cacheonly`` configuration option, we can specify +either ``metadata`` to utilize only repository metadata from the cache or ``all`` to include +the entire cache, disallowing any package downloads. Alternatively, when the ``--cacheonly`` +parameter is employed, it automatically sets the configuration option to ``all``, resulting +in a fully cache-driven operation. + +Using the ``metadata`` value for the ``cacheonly`` configuration can be advantageous when optional +repositories are temporarily unavailable or when we know they are unnecessary for our current +use case. It is also useful when cached metadata is not the latest or has expired but is still +functional. + + +Delete, Create, Update +====================== + +The following commands are used for manual cache deletion and creation: + + | :manpage:`dnf5-clean(8)`, :ref:`Clean command ` + | :manpage:`dnf5-makecache(8)`, :ref:`Makecache command ` + +To force metadata update before executing a command, use the ``--refresh`` parameter. diff --git a/doc/misc/index.rst b/doc/misc/index.rst index 71a6f119f..acb93b560 100644 --- a/doc/misc/index.rst +++ b/doc/misc/index.rst @@ -6,6 +6,7 @@ Miscellaneous .. toctree:: :maxdepth: 1 + caching.7 comps.7 forcearch.7 installroot.7 diff --git a/doc/misc/installroot.7.rst b/doc/misc/installroot.7.rst index 1c087d30e..9eb9f4dfd 100644 --- a/doc/misc/installroot.7.rst +++ b/doc/misc/installroot.7.rst @@ -30,10 +30,10 @@ relative to where all packages will be installed. Think of it like doing ``chroot dnf``, except using ``--installroot`` allows ``DNF5`` to work before the chroot is created. -`cachedir`, `log` files, `releasever`, and `gpgkey` are taken from or stored in -the installroot. GPG keys are imported into the installroot from a path -relative to the host which can be specified in the repository section of -configuration files. +`cachedir`, `system_cachedir`, `log` files, `releasever`, and `gpgkey` are +taken from or stored in the installroot. GPG keys are imported into the +installroot from a path relative to the host which can be specified in the +repository section of configuration files. `configuration` file, `reposdir`, and `vars` are taken from inside the installroot, unless the command-line argument ``--use-host-config`` is @@ -43,6 +43,8 @@ will be used. Note: When a path is specified within a command line argument (``--config=CONFIG_FILE_PATH`` in case of `configuration` file, ``--setopt=reposdir=/path/to/repodir`` for `reposdir`, +``--setopt=cachedir=/path/to/cachedir`` for `cachedir`, +``--setopt=system_cachedir=/path/to/system_cachedir`` for `system_cachedir`, ``--setopt=logdir=/path/to/logdir`` for `logdir`, or ``--setopt=varsdir=/paths/to/varsdir`` for `vars`), then this path is always relative to the host with no exceptions. `pluginpath` and `pluginconfpath` are diff --git a/doc/templates/command/template.hpp b/doc/templates/command/template.hpp index 62e205f25..233b29bbd 100644 --- a/doc/templates/command/template.hpp +++ b/doc/templates/command/template.hpp @@ -24,7 +24,7 @@ class TemplateCommand : public Command { // command such as description, options or sub-commands. void set_argument_parser() override; - // This method needs to be overriden to run the command. + // This method needs to be overridden to run the command. void run() override; private: diff --git a/include/libdnf5-cli/argument_parser.hpp b/include/libdnf5-cli/argument_parser.hpp index 194df19d6..18f1ea0ce 100644 --- a/include/libdnf5-cli/argument_parser.hpp +++ b/include/libdnf5-cli/argument_parser.hpp @@ -246,7 +246,7 @@ class ArgumentParser { /// Sets a pointer to user data in the argument. void set_user_data(ArgumentParserUserData * user_data) noexcept { this->user_data = user_data; } - /// Gets a pointer to the user data attached to the argment. + /// Gets a pointer to the user data attached to the argument. ArgumentParserUserData * get_user_data() const noexcept { return user_data; } private: @@ -768,7 +768,7 @@ class ArgumentParser { /// it will be searched in the parent command. E.g. "installroot" is global option -> instead /// of "repoquery.installroot" returns "installroot". /// @param id_path named argument ID path, e.g. "installroot", "repoquery.installed" - /// @param search_in_parent true - enable search in parrent command, false - disable + /// @param search_in_parent true - enable search in parent command, false - disable /// @exception AssertionError if root command is not set /// @exception ArgumentParser::Command::CommandNotFound if command is not found. /// @exception ArgumentParser::Command::PositionalArgNotFound if argument is not found. @@ -780,7 +780,7 @@ class ArgumentParser { /// it will be searched in the parent command. E.g. "installroot" is global option -> instead /// of "repoquery.installroot" returns "installroot". /// @param id_path positional argument ID path, e.g. "repoquery.keys" - /// @param search_in_parent true - enable search in parrent command, false - disable + /// @param search_in_parent true - enable search in parent command, false - disable /// @exception AssertionError if root command is not set /// @exception ArgumentParser::Command::CommandNotFound if command is not found. /// @exception ArgumentParser::Command::NamedArgNotFound if argument is not found. diff --git a/include/libdnf5-cli/output/repo_info.hpp b/include/libdnf5-cli/output/repo_info.hpp index 4fdbde8c8..9654c5872 100644 --- a/include/libdnf5-cli/output/repo_info.hpp +++ b/include/libdnf5-cli/output/repo_info.hpp @@ -139,7 +139,7 @@ void RepoInfo::add_repo(Repo & repo) { // add_line("SSL client key", "", nullptr, group_proxy); // add_line("Verify SSL certificate", "", nullptr, group_proxy); - // auto group_misc = add_line("Miscelaneous", ""); + // auto group_misc = add_line("Miscellaneous", ""); // add_line("Load comps groups", "", nullptr, group_misc); // add_line("Report \"countme\" statistics", "", nullptr, group_misc); // add_line("Enable DeltaRPM", "", nullptr, group_misc); diff --git a/include/libdnf5-cli/output/repoquery.hpp b/include/libdnf5-cli/output/repoquery.hpp index 0d1072a91..e0ab5e590 100644 --- a/include/libdnf5-cli/output/repoquery.hpp +++ b/include/libdnf5-cli/output/repoquery.hpp @@ -36,6 +36,9 @@ void print_pkg_attr_uniq_sorted( void print_available_pkg_attrs(std::FILE * target); +libdnf5::rpm::ReldepList get_reldeplist_for_attr( + const libdnf5::rpm::PackageSet & pkgs, const std::string & getter_name); + } // namespace libdnf5::cli::output #endif // LIBDNF5_CLI_OUTPUT_REPOQUERY_HPP diff --git a/include/libdnf5-cli/output/search.hpp b/include/libdnf5-cli/output/search.hpp index ffe672d7e..94bee324b 100644 --- a/include/libdnf5-cli/output/search.hpp +++ b/include/libdnf5-cli/output/search.hpp @@ -45,7 +45,7 @@ struct SearchOptions { bool show_duplicates; ///< If multiple versions of the same package are allowed in the output. }; -/// Auxilliary structure for holding the set of result packages together with their comparator. +/// Auxiliary structure for holding the set of result packages together with their comparator. struct SearchPackages { std::set)> packages{ &libdnf5::rpm::cmp_nevra}; diff --git a/include/libdnf5-cli/output/transaction_table.hpp b/include/libdnf5-cli/output/transaction_table.hpp index 523269304..fb19715a2 100644 --- a/include/libdnf5-cli/output/transaction_table.hpp +++ b/include/libdnf5-cli/output/transaction_table.hpp @@ -71,7 +71,7 @@ class ActionHeaderPrinter { // would be better if the Transaction template type of // print_transaction_table() was required to have a TransactionItem type // defined inside, so that the ActionHeaderPrinter class could be templated - // instad of this method, and we could do (in print_transaction_table(), + // instead of this method, and we could do (in print_transaction_table(), // where this class is instantiated): // ActionHeaderPrinter action_header_printer(...); template @@ -198,7 +198,7 @@ class ActionHeaderPrinterGroup { // would be better if the Transaction template type of // print_transaction_table() was required to have a TransactionItem type // defined inside, so that the ActionHeaderPrinter class could be templated - // instad of this method, and we could do (in print_transaction_table(), + // instead of this method, and we could do (in print_transaction_table(), // where this class is instantiated): // ActionHeaderPrinter action_header_printer(...); template @@ -471,7 +471,7 @@ bool print_transaction_table(Transaction & transaction) { ActionHeaderPrinter action_header_printer(tb); for (auto & tspkg : tspkgs) { - // TODO(lukash) handle OBSOLETED correctly throught the transaction table output + // TODO(lukash) handle OBSOLETED correctly through the transaction table output if (tspkg.get_action() == libdnf5::transaction::TransactionItemAction::REPLACED) { ts_summary.add(tspkg.get_action()); continue; diff --git a/include/libdnf5/advisory/advisory_query.hpp b/include/libdnf5/advisory/advisory_query.hpp index fe0a688bc..06a4d5c27 100644 --- a/include/libdnf5/advisory/advisory_query.hpp +++ b/include/libdnf5/advisory/advisory_query.hpp @@ -34,7 +34,7 @@ along with libdnf. If not, see . namespace libdnf5::advisory { -/// AdvisoryQuery is the only way how to acess advisories. +/// AdvisoryQuery is the only way how to access advisories. /// It is constructed using Base and filled with advisories from enabled repositories in its RepoSack. class AdvisoryQuery : public AdvisorySet { public: @@ -58,7 +58,7 @@ class AdvisoryQuery : public AdvisorySet { /// Filter Advisories by name. /// - /// @param pattern Pattern used when matching agains advisory names. + /// @param pattern Pattern used when matching against advisory names. /// @param cmp_type What comparator to use with pattern, allows: EQ, GLOB, IGLOB. void filter_name(const std::string & pattern, sack::QueryCmp cmp_type = libdnf5::sack::QueryCmp::EQ); void filter_name(const std::vector & patterns, sack::QueryCmp cmp_type = libdnf5::sack::QueryCmp::EQ); diff --git a/include/libdnf5/base/base.hpp b/include/libdnf5/base/base.hpp index 5222c70f5..c840aff6c 100644 --- a/include/libdnf5/base/base.hpp +++ b/include/libdnf5/base/base.hpp @@ -106,7 +106,7 @@ class Base { /// Calling the method for the second time result in throwing an exception void setup(); - /// Returns true when setup() (mandatory method in many workflows) was alredy called + /// Returns true when setup() (mandatory method in many workflows) was already called bool is_initialized(); // TODO(jmracek) Remove from public API due to unstability of the code diff --git a/include/libdnf5/base/goal.hpp b/include/libdnf5/base/goal.hpp index cf88fc43c..dc484730f 100644 --- a/include/libdnf5/base/goal.hpp +++ b/include/libdnf5/base/goal.hpp @@ -113,7 +113,7 @@ class Goal { /// Add install request to the goal. The operation will not result in a reinstall when requested package /// with the same NEVRA is already installed. By default uses `clean_requirements_on_remove` set to `false`. /// - /// @param package_set A package_set containig candidates for the install action. + /// @param package_set A package_set containing candidates for the install action. /// @param settings A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used. void add_rpm_install( const libdnf5::rpm::PackageSet & package_set, @@ -131,7 +131,7 @@ class Goal { /// Add install or reinstall request to the goal. By default uses `clean_requirements_on_remove` set to `false`. /// - /// @param package_set A package_set containig candidates for the install or reinstall action. + /// @param package_set A package_set containing candidates for the install or reinstall action. /// @param settings A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used. // @replaces libdnf/hy-goal.h:function:hy_goal_install_selector(HyGoal goal, HySelector sltr, GError **error) // @replaces libdnf/hy-goal.h:function:hy_goal_install_selector_optional(HyGoal goal, HySelector sltr, GError **error) @@ -202,7 +202,7 @@ class Goal { const libdnf5::GoalJobSettings & settings = libdnf5::GoalJobSettings(), bool minimal = false); - // TODO(jmracek) Add suport `to_repo_ids` + // TODO(jmracek) Add support `to_repo_ids` /// Add upgrade job of all installed packages to the goal if not limited in `settings`. By default uses /// `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`. /// @@ -268,7 +268,7 @@ class Goal { void add_rpm_distro_sync( const std::string & spec, const libdnf5::GoalJobSettings & settings = libdnf5::GoalJobSettings()); - // TODO(jmracek) Add suport `to_repo_ids` + // TODO(jmracek) Add support `to_repo_ids` /// Add distrosync job of all installed packages to the goal if not limited in `settings`. By default uses /// `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`. /// @@ -302,7 +302,7 @@ class Goal { /// @param spec A string describing the requested package /// @param reason New reason for the package /// @param group_id Id of group the package belongs to (only relevant in case the reason is GROUP) - /// @param settings A sructure to overrice default goal settings. Only ResolveSpecSettings values are used + /// @param settings A structure to override default goal settings. Only ResolveSpecSettings values are used void add_rpm_reason_change( const std::string & spec, const libdnf5::transaction::TransactionItemReason reason, @@ -368,7 +368,7 @@ class Goal { bool get_allow_erasing() const; // TODO(jmracek) Move transaction reports to Transaction class - /// Resolve all jobs and return a transaction object. Everytime it resolves specs (strings) to packages + /// Resolve all jobs and return a transaction object. Every time it resolves specs (strings) to packages /// /// @return transaction object // @replaces libdnf/hy-goal.h:function:hy_goal_run_flags(HyGoal goal, DnfGoalActions flags) diff --git a/include/libdnf5/base/goal_elements.hpp b/include/libdnf5/base/goal_elements.hpp index 019641e0d..abd52262d 100644 --- a/include/libdnf5/base/goal_elements.hpp +++ b/include/libdnf5/base/goal_elements.hpp @@ -25,10 +25,8 @@ along with libdnf. If not, see . #include "libdnf5/comps/group/package.hpp" #include "libdnf5/conf/config_main.hpp" #include "libdnf5/rpm/nevra.hpp" -#include "libdnf5/transaction/transaction_item_reason.hpp" #include -#include namespace libdnf5 { diff --git a/include/libdnf5/base/transaction_environment.hpp b/include/libdnf5/base/transaction_environment.hpp index 3f943bea2..d5f0db3b6 100644 --- a/include/libdnf5/base/transaction_environment.hpp +++ b/include/libdnf5/base/transaction_environment.hpp @@ -41,7 +41,7 @@ class TransactionEnvironment { /// @return the underlying environment. libdnf5::comps::Environment get_environment() const { return environment; } - /// @return the action being preformed on the transaction environment. + /// @return the action being performed on the transaction environment. // // @replaces libdnf:transaction/TransactionItem.hpp:method:TransactionItemBase.getAction() Action get_action() const noexcept { return action; } diff --git a/include/libdnf5/base/transaction_group.hpp b/include/libdnf5/base/transaction_group.hpp index c30dce363..4c332ef39 100644 --- a/include/libdnf5/base/transaction_group.hpp +++ b/include/libdnf5/base/transaction_group.hpp @@ -45,7 +45,7 @@ class TransactionGroup { /// @return the underlying group. libdnf5::comps::Group get_group() const { return group; } - /// @return the action being preformed on the transaction group. + /// @return the action being performed on the transaction group. // // @replaces libdnf:transaction/TransactionItem.hpp:method:TransactionItemBase.getAction() Action get_action() const noexcept { return action; } diff --git a/include/libdnf5/base/transaction_module.hpp b/include/libdnf5/base/transaction_module.hpp index 74922ba3d..e66ea062b 100644 --- a/include/libdnf5/base/transaction_module.hpp +++ b/include/libdnf5/base/transaction_module.hpp @@ -45,7 +45,7 @@ class TransactionModule { /// @return the module stream. std::string get_module_stream() const { return module_stream; } - /// @return the action being preformed on the transaction module. + /// @return the action being performed on the transaction module. // // @replaces libdnf:transaction/TransactionItem.hpp:method:TransactionItemBase.getAction() Action get_action() const noexcept { return action; } diff --git a/include/libdnf5/base/transaction_package.hpp b/include/libdnf5/base/transaction_package.hpp index b35d998a3..9d317b305 100644 --- a/include/libdnf5/base/transaction_package.hpp +++ b/include/libdnf5/base/transaction_package.hpp @@ -45,7 +45,7 @@ class TransactionPackage { /// @return the underlying package. libdnf5::rpm::Package get_package() const { return package; } - /// @return the action being preformed on the transaction package. + /// @return the action being performed on the transaction package. // // @replaces libdnf:transaction/TransactionItem.hpp:method:TransactionItemBase.getAction() Action get_action() const noexcept { return action; } diff --git a/include/libdnf5/conf/config_parser.hpp b/include/libdnf5/conf/config_parser.hpp index eb7057af9..e8e8c0e53 100644 --- a/include/libdnf5/conf/config_parser.hpp +++ b/include/libdnf5/conf/config_parser.hpp @@ -78,7 +78,7 @@ class ConfigParserOptionNotFoundError : public ConfigParserError { * @brief Class for parsing dnf/yum .ini configuration files. * * ConfigParser is used for parsing files. -* User can get both substituded and original parsed values. +* User can get both substituted and original parsed values. * The parsed items are stored into the PreserveOrderMap. * ConfigParser preserve order of items. Comments and empty lines are kept. */ diff --git a/include/libdnf5/conf/option_binds.hpp b/include/libdnf5/conf/option_binds.hpp index d8e5c56e5..0c5f7bbd2 100644 --- a/include/libdnf5/conf/option_binds.hpp +++ b/include/libdnf5/conf/option_binds.hpp @@ -46,12 +46,12 @@ class OptionBindsOptionAlreadyExistsError : public OptionBindsError { const char * get_name() const noexcept override { return "OptionBindsOptionAlreadyExistsError"; } }; -/// Maps the options names (text names readed from config file, command line, ...) to options objects. +/// Maps the options names (text names read from config file, command line, ...) to options objects. /// Supports user defined functions for processing new value and converting value to string. class OptionBinds { public: /// Extends the option with user-defined functions for processing a new value and converting value to a string. - /// It is used as additional level of processing when the option is accesed by its text name. + /// It is used as additional level of processing when the option is accessed by its text name. class Item final { public: using NewStringFunc = std::function; diff --git a/include/libdnf5/conf/option_path.hpp b/include/libdnf5/conf/option_path.hpp index 035e44824..381a4bf83 100644 --- a/include/libdnf5/conf/option_path.hpp +++ b/include/libdnf5/conf/option_path.hpp @@ -38,15 +38,15 @@ class OptionPathNotFoundError : public OptionValueNotAllowedError { // @replaces libdnf:conf/OptionPath.hpp:class:OptionPath class OptionPath : public OptionString { public: - /// Constructor sets default value and conditons. + /// Constructor sets default value and conditions. // @replaces libdnf:conf/OptionPath.hpp:ctor:OptionPath.OptionPath(const std::string & defaultValue, bool exists = false, bool absPath = false) explicit OptionPath(const std::string & default_value, bool exists = false, bool abs_path = false); - /// Constructor sets default value and conditons. + /// Constructor sets default value and conditions. // @replaces libdnf:conf/OptionPath.hpp:ctor:OptionPath.OptionPath(const char * defaultValue, bool exists = false, bool absPath = false) explicit OptionPath(const char * default_value, bool exists = false, bool abs_path = false); - /// Constructor sets default value and conditons. + /// Constructor sets default value and conditions. // @replaces libdnf:conf/OptionPath.hpp:ctor:OptionPath.OptionPath(const std::string & defaultValue, const std::string & regex, bool icase, bool exists = false, bool absPath = false) OptionPath( const std::string & default_value, @@ -55,7 +55,7 @@ class OptionPath : public OptionString { bool exists = false, bool abs_path = false); - /// Constructor sets default value and conditons. + /// Constructor sets default value and conditions. // @replaces libdnf:conf/OptionPath.hpp:ctor:OptionPath.OptionPath(const char * defaultValue, const std::string & regex, bool icase, bool exists = false, bool absPath = false) OptionPath( const char * default_value, const std::string & regex, bool icase, bool exists = false, bool abs_path = false); diff --git a/include/libdnf5/module/module_query.hpp b/include/libdnf5/module/module_query.hpp index e90602a68..cf28b4907 100644 --- a/include/libdnf5/module/module_query.hpp +++ b/include/libdnf5/module/module_query.hpp @@ -165,7 +165,7 @@ class ModuleQuery : public libdnf5::sack::Query { /// Filter ModuleItems by module_spec. /// /// @param module_spec A module_spec the filter is matched against. - /// @return `true` and matched Nsvcap if the module_spec was parsed sucessfully, + /// @return `true` and matched Nsvcap if the module_spec was parsed successfully, /// `false` and empty Nsvcap otherwise. /// @since 5.0.6 std::pair resolve_module_spec(const std::string & module_spec); diff --git a/include/libdnf5/repo/config_repo.hpp b/include/libdnf5/repo/config_repo.hpp index 1582c4bce..eabcf2c92 100644 --- a/include/libdnf5/repo/config_repo.hpp +++ b/include/libdnf5/repo/config_repo.hpp @@ -153,7 +153,7 @@ class ConfigRepo : public Config { /// cached metadata are stored. std::string get_cachedir() const; - /// @return The path to the repository's perisistent directory, where its + /// @return The path to the repository's persistent directory, where its /// persistent data are stored. std::string get_persistdir() const; diff --git a/include/libdnf5/repo/download_callbacks.hpp b/include/libdnf5/repo/download_callbacks.hpp index 700ba9008..f33e42f0a 100644 --- a/include/libdnf5/repo/download_callbacks.hpp +++ b/include/libdnf5/repo/download_callbacks.hpp @@ -47,7 +47,7 @@ class DownloadCallbacks { CACHELOADINGSTATUS, /// Detection (pinging) in progress. If all data was loaded from cache, - /// this stage is skiped. `ptr` is a pointer to `long`, the number of + /// this stage is skipped. `ptr` is a pointer to `long`, the number of /// mirrors which will be tested. DETECTION, diff --git a/include/libdnf5/repo/repo.hpp b/include/libdnf5/repo/repo.hpp index 0375ffc11..259c8c305 100644 --- a/include/libdnf5/repo/repo.hpp +++ b/include/libdnf5/repo/repo.hpp @@ -220,7 +220,7 @@ class Repo { std::string get_metadata_path(const std::string & metadata_type); /// Mark whatever is in the current cache expired. - /// This repo instance will alway try to fetch a fresh metadata after this + /// This repo instance will always try to fetch a fresh metadata after this /// method is called. // @replaces libdnf:repo/Repo.hpp:method:Repo.expire() void expire(); diff --git a/include/libdnf5/repo/repo_callbacks.hpp b/include/libdnf5/repo/repo_callbacks.hpp index 34d7762cc..b7d14b782 100644 --- a/include/libdnf5/repo/repo_callbacks.hpp +++ b/include/libdnf5/repo/repo_callbacks.hpp @@ -48,7 +48,7 @@ class RepoCallbacks { /// @param key_info The key that is about to be imported /// @return `true` to import the key, `false` to not import virtual bool repokey_import(const libdnf5::rpm::KeyInfo & key_info) { return true; } - /// Called on successfull repo key import. + /// Called on successful repo key import. /// @param key_info The key that was successfully imported virtual void repokey_imported(const libdnf5::rpm::KeyInfo & key_info) {} diff --git a/include/libdnf5/repo/repo_sack.hpp b/include/libdnf5/repo/repo_sack.hpp index d6383357e..417412684 100644 --- a/include/libdnf5/repo/repo_sack.hpp +++ b/include/libdnf5/repo/repo_sack.hpp @@ -161,7 +161,7 @@ class RepoSack : public sack::Sack { explicit RepoSack(libdnf5::Base & base); /// Loads repositories configuration overrides from drop-in directories. No new repositories are created. - /// Only the configuration of the coresponding existing repositories is modified. + /// Only the configuration of the corresponding existing repositories is modified. void load_repos_configuration_overrides(); WeakPtrGuard sack_guard; diff --git a/include/libdnf5/rpm/nevra.hpp b/include/libdnf5/rpm/nevra.hpp index ab9a17ac1..218274d7c 100644 --- a/include/libdnf5/rpm/nevra.hpp +++ b/include/libdnf5/rpm/nevra.hpp @@ -70,7 +70,7 @@ struct Nevra { // NOTE: required by cppunit asserts friend std::ostringstream & operator<<(std::ostringstream & out, const Nevra & nevra); - /// Returns false when parsing failed and stored data are in inconsistance state. + /// Returns false when parsing failed and stored data are in inconsistency state. void clear() noexcept; diff --git a/include/libdnf5/rpm/package.hpp b/include/libdnf5/rpm/package.hpp index 7b434fba9..6fe0a1355 100644 --- a/include/libdnf5/rpm/package.hpp +++ b/include/libdnf5/rpm/package.hpp @@ -340,7 +340,7 @@ class Package { // @replaces libdnf:libdnf/hy-package.h:function:dnf_package_get_supplements(DnfPackage * pkg) ReldepList get_supplements() const; - /// @return List of RPM package dependencies (requries + enhances + suggests + supplements + recommends). + /// @return List of RPM package dependencies (requires + enhances + suggests + supplements + recommends). /// @since 5.0.10 ReldepList get_depends() const; @@ -515,6 +515,15 @@ class Package { /// @since 5.0.5 libdnf5::BaseWeakPtr get_base() const; + /// Return NEVRA -> 0 epoch is not shown in string + std::string to_string() const { return get_nevra(); }; + + /// Provide descriptive information about instance including NEVRA and ID + std::string to_string_description() const; + + /// Return unique ID representing Package + int get_hash() const { return get_id().id; }; + protected: // @replaces libdnf:libdnf/dnf-package.h:function:dnf_package_new(DnfSack *sack, Id id) Package(const BaseWeakPtr & base, PackageId id); diff --git a/include/libdnf5/rpm/package_query.hpp b/include/libdnf5/rpm/package_query.hpp index bc1a086be..a0ac087db 100644 --- a/include/libdnf5/rpm/package_query.hpp +++ b/include/libdnf5/rpm/package_query.hpp @@ -661,7 +661,7 @@ class PackageQuery : public PackageSet { void filter_unneeded(); /// Resolve spec according to provided settings. It tests whether spec is NEVRA type, provide, file or binary. - /// It retuns only the first mach type. If spec has a mathes as NEVRA and provide type it only keeps matches with + /// It returns only the first match type. If spec has a match as NEVRA and provide type it only keeps matches with /// the first tested type (NEVRA). // TODO(jmracek) return std::pair> // @replaces libdnf/sack/query.hpp:method:std::pair> filterSubject(const char * subject, HyForm * forms, bool icase, bool with_nevra, bool with_provides, bool with_filenames); diff --git a/include/libdnf5/rpm/reldep.hpp b/include/libdnf5/rpm/reldep.hpp index c039e5d86..7db86ec59 100644 --- a/include/libdnf5/rpm/reldep.hpp +++ b/include/libdnf5/rpm/reldep.hpp @@ -83,6 +83,9 @@ class Reldep { // @replaces libdnf/dnf-reldep.h:function:dnf_reldep_to_string(DnfReldep *reldep) std::string to_string() const; + /// Provide descriptive information about instance including string value and ID + std::string to_string_description() const; + // @replaces libdnf/repo/solvable/Dependency.hpp:method:getId() // @replaces libdnf/dnf-reldep.h:function:dnf_reldep_to_string(DnfReldep *reldep) ReldepId get_id() const noexcept { return id; }; @@ -92,7 +95,10 @@ class Reldep { /// @brief Test if pattern is rich dependency /// Return true if pattern start with "(" - static bool is_rich_dependency(const std::string & pattern) { return pattern[0] == '('; } + static bool is_rich_dependency(const std::string & pattern) { return pattern[0] == '('; }; + + /// Return unique ID representing Reldep + int get_hash() const { return get_id().id; }; protected: /// @brief Creates a reldep from Id diff --git a/include/libdnf5/rpm/reldep_list.hpp b/include/libdnf5/rpm/reldep_list.hpp index e3af9ea59..61af5ee62 100644 --- a/include/libdnf5/rpm/reldep_list.hpp +++ b/include/libdnf5/rpm/reldep_list.hpp @@ -65,7 +65,7 @@ class ReldepList { // @replaces libdnf/repo/solvable/DependencyContainer.hpp:method:add(Id id)) void add(ReldepId id); - /// @brief Adds a reldep from Char*. Only globs in name are proccessed. The proccess is slow + /// @brief Adds a reldep from Char*. Only globs in name are processed. The process is slow /// therefore if reldepStr is not a glob please use addReldep() instead. /// /// @param reldep_str p_reldepStr: Char* diff --git a/include/libdnf5/transaction/transaction_item_action.hpp b/include/libdnf5/transaction/transaction_item_action.hpp index 875cbc1d6..ab15a08a9 100644 --- a/include/libdnf5/transaction/transaction_item_action.hpp +++ b/include/libdnf5/transaction/transaction_item_action.hpp @@ -137,7 +137,7 @@ Reason Change Reasons: * new = a brand new reason why a package was installed or removed -* inherited = a package was installed in the past, re-use it's reason in existing transaction +* inherited = a package was installed in the past, reuse it's reason in existing transaction */ #endif // LIBDNF5_TRANSACTION_TYPES_HPP diff --git a/include/libdnf5/utils/bgettext/README.md b/include/libdnf5/utils/bgettext/README.md index 85f3dc8f1..064ea566c 100644 --- a/include/libdnf5/utils/bgettext/README.md +++ b/include/libdnf5/utils/bgettext/README.md @@ -4,7 +4,7 @@ This is an extension of the GNU gettext. At first I tried to use the glib extension of gettext. But glib is incomplete. * There are macros `_()`, `C_()`. But there are missing macros for plural forms. And there is not support of plural forms with context. -* There are macros `N_()`, `NC_()` witch only marks string for translation. There is the same problem with plural. Moreover these macros are not useable as I needed. +* There are macros `N_()`, `NC_()` witch only marks string for translation. There is the same problem with plural. Moreover these macros are not usable as I needed. * I do not want to depend on glib just for translation. ## So, I wrote my extension that offers everything I need. @@ -54,7 +54,7 @@ If a translation was found in one of the specified catalogs, it is converted to `label2 = C_("Insects", "Bug");` #### `CP_(context, msgId, msgIdPlural, n)` -This is the most powerfull macro. It supports translation of message with context and plural forms. The macro encodes context and msgId and a dngettext is used internaly. See `P_()` and `C_()` macros for more informations about plural forms and context. +This is the most powerful macro. It supports translation of message with context and plural forms. The macro encodes context and msgId and a dngettext is used internally. See `P_()` and `C_()` macros for more information about plural forms and context. If you are using the `CP_()` macro, you need to make sure that you pass `--keyword=CP_:1c,2,3` to xgettext when extracting messages. Note that this only works with GNU gettext >= 0.15. ##### Parameters `context` - a message context, must be a string literal diff --git a/include/libdnf5/utils/bgettext/bgettext-common.h b/include/libdnf5/utils/bgettext/bgettext-common.h index 1560b4fcf..d6f686b31 100644 --- a/include/libdnf5/utils/bgettext/bgettext-common.h +++ b/include/libdnf5/utils/bgettext/bgettext-common.h @@ -29,8 +29,8 @@ along with libdnf. If not, see . extern "C" { #endif -/// Attemps to translate the 'msgId' into the user's language by searching for the translation in a message catalog. -/// The use of C_() macro is prefered. But this macro don't support non-string-literals as 'context' and 'msgId' arguments. +/// Attempts to translate the 'msgId' into the user's language by searching for the translation in a message catalog. +/// The use of C_() macro is preferred. But this macro don't support non-string-literals as 'context' and 'msgId' arguments. /// This function is intended for this case. /// /// @param domain message domain used for translation, non-empty string or NULL @@ -40,8 +40,8 @@ extern "C" { /// @return translated message (or msgId if translation was not found) const char * b_dpgettext(const char * domain, const char * context, const char * msgId); -/// Attemps to translate the 'msgId' into the user's language by searching for the translation in a message catalog. -/// The use of CP_() macro is prefered. But this macro don't support non-string-literals as 'context' and 'msgId' arguments. +/// Attempts to translate the 'msgId' into the user's language by searching for the translation in a message catalog. +/// The use of CP_() macro is preferred. But this macro don't support non-string-literals as 'context' and 'msgId' arguments. /// This function is intended for this case. /// /// @param domain message domain used for translation, non-empty string or NULL diff --git a/include/libdnf5/utils/bgettext/bgettext-mark-common.h b/include/libdnf5/utils/bgettext/bgettext-mark-common.h index 7788a01c7..dc0496822 100644 --- a/include/libdnf5/utils/bgettext/bgettext-mark-common.h +++ b/include/libdnf5/utils/bgettext/bgettext-mark-common.h @@ -38,7 +38,7 @@ const char * b_gettextmsg_get_domain(struct BgettextMessage message); /// @return message id const char * b_gettextmsg_get_id(struct BgettextMessage message); -/// Attemps to translate the 'message' into the user's language by searching for the translation in a message catalog. +/// Attempts to translate the 'message' into the user's language by searching for the translation in a message catalog. /// @param domain message domain used for translation, argument is used only if the domain is not present in encoded message /// @param message message encoded for translation /// @param n defines plural form to be use (returns the base form if encoded message does not define plural form) diff --git a/include/libdnf5/utils/bgettext/bgettext-mark-domain.h b/include/libdnf5/utils/bgettext/bgettext-mark-domain.h index 59413f39d..2aff41a51 100644 --- a/include/libdnf5/utils/bgettext/bgettext-mark-domain.h +++ b/include/libdnf5/utils/bgettext/bgettext-mark-domain.h @@ -26,6 +26,10 @@ along with libdnf. If not, see . #include "bgettext-mark-common.h" +// clang-format off +// Use EMPTY_MESSAGE instead of M_(""). Otherwise, xgettext breaks catalogs. +#define EMPTY_MESSAGE \ + { .bgettextMsg = "\004" GETTEXT_DOMAIN "\00" "" } #define M_(msgId) \ { .bgettextMsg = "\004" GETTEXT_DOMAIN "\00" msgId } #define MP_(msgId, msgIdPlural) \ @@ -34,5 +38,6 @@ along with libdnf. If not, see . { .bgettextMsg = "\006" GETTEXT_DOMAIN "\00" context "\004" msgId } #define MCP_(context, msgId, msgIdPlural) \ { .bgettextMsg = "\007" GETTEXT_DOMAIN "\00" context "\004" msgId "\00" msgIdPlural } +//clang-format on #endif /* _BGETTEXT_MARK_DOMAIN_H_ */ diff --git a/include/libdnf5/utils/bgettext/bgettext-mark.h b/include/libdnf5/utils/bgettext/bgettext-mark.h index 1ccb0fe93..149cc75a1 100644 --- a/include/libdnf5/utils/bgettext/bgettext-mark.h +++ b/include/libdnf5/utils/bgettext/bgettext-mark.h @@ -22,6 +22,10 @@ along with libdnf. If not, see . #include "bgettext-mark-common.h" +// clang-format off +// Use EMPTY_MESSAGE instead of M_(""). Otherwise, xgettext breaks catalogs. +#define EMPTY_MESSAGE \ + { .bgettextMsg = "\000" "" } #define M_(msgId) \ { .bgettextMsg = "\000" msgId } #define MP_(msgId, msgIdPlural) \ @@ -30,5 +34,6 @@ along with libdnf. If not, see . { .bgettextMsg = "\002" context "\004" msgId } #define MCP_(context, msgId, msgIdPlural) \ { .bgettextMsg = "\003" context "\004" msgId "\00" msgIdPlural } +// clang-format on #endif /* _BGETTEXT_MARK_H_ */ diff --git a/include/libdnf5/utils/to_underlying.hpp b/include/libdnf5/utils/to_underlying.hpp index 4dcba788c..2ca45c940 100644 --- a/include/libdnf5/utils/to_underlying.hpp +++ b/include/libdnf5/utils/to_underlying.hpp @@ -27,7 +27,7 @@ along with libdnf. If not, see . namespace libdnf5::utils { /// Converts an enumeration to its underlying type. -/// `std::to_underlying` is planed for C++23. +/// `std::to_underlying` is planned for C++23. template constexpr std::underlying_type_t to_underlying(Enum e) noexcept { return static_cast>(e); diff --git a/libdnf5-cli/exception.cpp b/libdnf5-cli/exception.cpp index c18e92ef9..1c4e0d96f 100644 --- a/libdnf5-cli/exception.cpp +++ b/libdnf5-cli/exception.cpp @@ -46,6 +46,6 @@ const char * GoalResolveError::what() const noexcept { return message.c_str(); } -SilentCommandExitError::SilentCommandExitError(int exit_code) : Error(M_("")), exit_code(exit_code) {} +SilentCommandExitError::SilentCommandExitError(int exit_code) : Error(EMPTY_MESSAGE), exit_code(exit_code) {} } // namespace libdnf5::cli diff --git a/libdnf5-cli/output/repoqueryformat.cpp b/libdnf5-cli/output/repoqueryformat.cpp index fe3ef498c..6b2e4923c 100644 --- a/libdnf5-cli/output/repoqueryformat.cpp +++ b/libdnf5-cli/output/repoqueryformat.cpp @@ -190,7 +190,7 @@ std::pair, std::string> parse_queryformat(const std::string tag_name_start = format_size; } else if (qf_char == '}' && state == IN_TAG_NAME) { // end of tag state = OUTSIDE; - // To get the name we add/subtract 2 becasue each tag name (after brace expansion) starts with "{{". + // To get the name we add/subtract 2 because each tag name (after brace expansion) starts with "{{". auto getter_name = format.substr(tag_name_start + 2, format_size - tag_name_start - 2); auto getter = NAME_TO_GETTER.find(libdnf5::utils::string::tolower(getter_name)); if (getter != NAME_TO_GETTER.end()) { @@ -321,4 +321,29 @@ void print_pkg_attr_uniq_sorted( } } +libdnf5::rpm::ReldepList get_reldeplist_for_attr( + const libdnf5::rpm::PackageSet & pkgs, const std::string & getter_name) { + auto getter = NAME_TO_GETTER.find(getter_name); + if (getter == NAME_TO_GETTER.end()) { + libdnf_throw_assertion("Package attribute getter: \"{}\" not available", getter_name); + } + rpm::ReldepList output(pkgs.get_base()); + + for (auto package : pkgs) { + std::visit( + [&output, &package, &getter_name](const auto & getter_func) { + using T = std::decay_t; + if constexpr (std::is_same_v) { + auto rlds = (package.*getter_func)(); + output.append(rlds); + } else { + libdnf_throw_assertion("Cannot get pkg attribute: \"{}\" as ReldepList", getter_name); + } + }, + getter->second); + } + + return output; +} + } // namespace libdnf5::cli::output diff --git a/libdnf5-cli/output/search.cpp b/libdnf5-cli/output/search.cpp index 51a99f65d..f727228f0 100644 --- a/libdnf5-cli/output/search.cpp +++ b/libdnf5-cli/output/search.cpp @@ -43,7 +43,7 @@ static std::string key_to_string(const matched_key_pair & key_pair) { } } -/// Auxilliary method for aggregating a list of matched keys into a string. +/// Auxiliary method for aggregating a list of matched keys into a string. static std::string concat_keys(const std::string & acc, const matched_key_pair & pair) { return acc.empty() ? key_to_string(pair) : acc + ", " + key_to_string(pair); } @@ -53,7 +53,7 @@ static std::string construct_keys_string(const std::vector & k return std::accumulate(key_pairs.begin(), key_pairs.end(), std::string{}, concat_keys); } -/// Auxilliary method for aggregating a pattern matching expression into a string. +/// Auxiliary method for aggregating a pattern matching expression into a string. static std::string concat_patterns(const std::string & acc, const std::string & pattern) { return acc.empty() ? pattern : acc + "|" + pattern; } diff --git a/libdnf5-cli/po/ka.po b/libdnf5-cli/po/ka.po index b433b7328..524d78892 100644 --- a/libdnf5-cli/po/ka.po +++ b/libdnf5-cli/po/ka.po @@ -1,3 +1,20 @@ +# Temuri Doghonadze , 2023. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: 2023-11-16 19:01+0000\n" +"Last-Translator: Temuri Doghonadze \n" +"Language-Team: Georgian \n" +"Language: ka\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.2\n" + #: argument_parser.cpp:62 msgid "\"{}\" not allowed together with named argument \"{}\"" msgstr "\"{}\" დაუშვებელია მითითებულ არგუმენტთან \"{}\" ერთად" @@ -101,24 +118,6 @@ msgstr "ოპერაცია გაუქმებულია მომხ msgid "Failed to resolve the transaction" msgstr "ტრანზაქციის ამოხსნის შეცდომა" -# Temuri Doghonadze , 2023. -#: exception.cpp:49 -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" -"PO-Revision-Date: 2023-11-16 19:01+0000\n" -"Last-Translator: Temuri Doghonadze \n" -"Language-Team: Georgian \n" -"Language: ka\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.2\n" - #: session.cpp:79 msgid "Missing command" msgstr "ნაკლული ბრძანება" diff --git a/libdnf5-cli/po/libdnf5-cli.pot b/libdnf5-cli/po/libdnf5-cli.pot index 632e0d580..3ad464db1 100644 --- a/libdnf5-cli/po/libdnf5-cli.pot +++ b/libdnf5-cli/po/libdnf5-cli.pot @@ -1,3 +1,22 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-02 10:48+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + #: argument_parser.cpp:62 msgid "\"{}\" not allowed together with named argument \"{}\"" msgstr "" @@ -99,26 +118,6 @@ msgstr "" msgid "Failed to resolve the transaction" msgstr "" -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#: exception.cpp:49 -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-02 10:48+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - #: session.cpp:79 msgid "Missing command" msgstr "" diff --git a/libdnf5-cli/po/sv.po b/libdnf5-cli/po/sv.po new file mode 100644 index 000000000..22195df0b --- /dev/null +++ b/libdnf5-cli/po/sv.po @@ -0,0 +1,119 @@ +# Rafael Fontenelle , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-11 10:54+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Translate Toolkit 3.11.1\n" + +#: argument_parser.cpp:62 +msgid "\"{}\" not allowed together with named argument \"{}\"" +msgstr "" + +#: argument_parser.cpp:64 +msgid "\"{}\" not allowed in command \"{}\"" +msgstr "" + +#: argument_parser.cpp:66 +msgid "\"{}\" not allowed together with positional argument \"{}\"" +msgstr "" + +#: argument_parser.cpp:76 +msgid "Argument id \"{}\" already registered in group \"{}\"" +msgstr "" + +#: argument_parser.cpp:84 +msgid "Invalid character '.' in argument id \"{}\"" +msgstr "" + +#: argument_parser.cpp:199 argument_parser.cpp:204 +msgid "Too few values for positional argument \"{}\"" +msgstr "" + +#: argument_parser.cpp:244 +msgid "Missing value for named argument \"--{}\"" +msgstr "" + +#: argument_parser.cpp:252 +msgid "Unexpected value for named argumend \"--{}\"" +msgstr "" + +#: argument_parser.cpp:295 +msgid "Missing value for named argument \"-{}\"" +msgstr "" + +#: argument_parser.cpp:431 +msgid "Command id \"{}\" already registered for command \"{}\"" +msgstr "" + +#: argument_parser.cpp:442 +msgid "Named argument id \"{}\" already registered for command \"{}\"" +msgstr "" + +#: argument_parser.cpp:452 +msgid "Positional argument id \"{}\" already registered for command \"{}\"" +msgstr "" + +#: argument_parser.cpp:462 +msgid "Group id \"{}\" already registered for command \"{}\"" +msgstr "" + +#: argument_parser.cpp:472 +msgid "Command id \"{}\" does not contain subcommand with id \"{}\"" +msgstr "" + +#: argument_parser.cpp:480 +msgid "Command id \"{}\" does not contain named argument with id \"{}\"" +msgstr "" + +#: argument_parser.cpp:488 +msgid "Command id \"{}\" does not contain positional argument with id \"{}\"" +msgstr "" + +#: argument_parser.cpp:495 +msgid "Command id \"{}\" does not contain group with id \"{}\"" +msgstr "" + +#: argument_parser.cpp:590 argument_parser.cpp:718 +msgid "Unknown argument \"{}\" for command \"{}\"" +msgstr "" + +#: argument_parser.cpp:602 argument_parser.cpp:730 +msgid "Missing positional argument \"{}\" for command \"{}\"" +msgstr "" + +#. print usage +#: argument_parser.cpp:798 +msgid "Usage:" +msgstr "" + +#: argument_parser.cpp:806 +msgid "Description:" +msgstr "" + +#: argument_parser.cpp:1078 +msgid "Named argument with path id \"{}\" not found" +msgstr "" + +#: argument_parser.cpp:1133 +msgid "Positional argument with path id \"{}\" not found" +msgstr "" + +#: exception.cpp:30 +msgid "Operation aborted by the user." +msgstr "" + +#: exception.cpp:33 +msgid "Failed to resolve the transaction" +msgstr "" + +#: session.cpp:79 +msgid "Missing command" +msgstr "" diff --git a/libdnf5-cli/progressbar/download_progress_bar.cpp b/libdnf5-cli/progressbar/download_progress_bar.cpp index 4cc002491..03416ee59 100644 --- a/libdnf5-cli/progressbar/download_progress_bar.cpp +++ b/libdnf5-cli/progressbar/download_progress_bar.cpp @@ -206,7 +206,7 @@ void DownloadProgressBar::to_stream(std::ostream & stream) { } // print only part of the message that fits the terminal width - // substracted '4' relates to the '>>> ' prefix + // subtracted '4' relates to the '>>> ' prefix stream << message.substr(0, terminal_width - 4); if (color_used) { diff --git a/libdnf5-cli/progressbar/widgets/speed.cpp b/libdnf5-cli/progressbar/widgets/speed.cpp index 4947d9b0e..d83f9fd31 100644 --- a/libdnf5-cli/progressbar/widgets/speed.cpp +++ b/libdnf5-cli/progressbar/widgets/speed.cpp @@ -38,7 +38,7 @@ std::string SpeedWidget::to_string() const { return ""; } if (get_bar()->is_finished() || get_bar()->get_total_ticks() < 0) { - // finshed -> display average speed + // finished -> display average speed return get_delimiter_before() + format_size(get_bar()->get_average_speed()) + "/s"; } else { // in progress -> display current speed diff --git a/libdnf5-cli/progressbar/widgets/time.cpp b/libdnf5-cli/progressbar/widgets/time.cpp index 81bca210a..f825f605a 100644 --- a/libdnf5-cli/progressbar/widgets/time.cpp +++ b/libdnf5-cli/progressbar/widgets/time.cpp @@ -44,7 +44,7 @@ std::string TimeWidget::to_string() const { std::ostringstream ss; ss << get_delimiter_before(); if (get_bar()->is_finished() || get_bar()->get_total_ticks() < 0) { - // finshed or unknown total ticks -> display elapsed time + // finished or unknown total ticks -> display elapsed time ss << format_time(get_bar()->get_elapsed_seconds(), false); } else { // in progress -> display remaining time diff --git a/libdnf5-plugins/actions/po/cs.po b/libdnf5-plugins/actions/po/cs.po index c7f55778b..3587d0331 100644 --- a/libdnf5-plugins/actions/po/cs.po +++ b/libdnf5-plugins/actions/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/libdnf5-plugins/actions/po/ka.po b/libdnf5-plugins/actions/po/ka.po index eb1b000c9..12790033d 100644 --- a/libdnf5-plugins/actions/po/ka.po +++ b/libdnf5-plugins/actions/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-28 02:51+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: actions.cpp:397 actions.cpp:405 actions.cpp:413 actions.cpp:421 +msgid "" +"Error in file \"{}\" on line {}: \"HOOK:PKG_FILTER:DIRECTION:OPTIONS:CMD\" " +"format expected" +msgstr "" + +#: actions.cpp:443 +msgid "" +"Error in file \"{}\" on line {}: Unknown \"enabled\" option value \"{}\"" +msgstr "" + +#: actions.cpp:450 +msgid "Error in file \"{}\" on line {}: Unknown option \"{}\"" +msgstr "" + +#: actions.cpp:468 +msgid "Error in file \"{}\" on line {}: Unknown hook \"{}\"" +msgstr "" + +#: actions.cpp:478 +msgid "" +"Error in file \"{}\" on line {}: Package filter can only be used in " +"PRE_TRANS and POST_TRANS hooks" +msgstr "" + +#: actions.cpp:488 +msgid "" +"Error in file \"{}\" on line {}: Cannot use direction without package filter" +msgstr "" + +#: actions.cpp:505 +msgid "Error in file \"{}\" on line {}: Unknown package direction \"{}\"" +msgstr "" + +#: actions.cpp:514 +msgid "Error in file \"{}\" on line {}: Missing command" +msgstr "" diff --git a/libdnf5-plugins/python_plugins_loader/python_plugins_loader.cpp b/libdnf5-plugins/python_plugins_loader/python_plugins_loader.cpp index eb5cab0d7..3965ba5a0 100644 --- a/libdnf5-plugins/python_plugins_loader/python_plugins_loader.cpp +++ b/libdnf5-plugins/python_plugins_loader/python_plugins_loader.cpp @@ -185,7 +185,7 @@ void PythonPluginLoader::load_plugin_file(const fs::path & file_path) { // python_code += "locked_base.add_plugin(plug)"; // PyRun_SimpleString(python_code.c_str()); - // Similar but Pure Embeding + // Similar but Pure Embedding auto * module_name = file_path.stem().c_str(); PyObject * plugin_module = PyImport_ImportModule(module_name); if (!plugin_module) { diff --git a/libdnf5-plugins/rhsm/po/sv.po b/libdnf5-plugins/rhsm/po/sv.po new file mode 100644 index 000000000..11f5701f8 --- /dev/null +++ b/libdnf5-plugins/rhsm/po/sv.po @@ -0,0 +1,24 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Luna Jernberg , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-07 11:21+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: rhsm.cpp:97 +msgid "Missing path to repository configuration directory" +msgstr "" + +#: rhsm.cpp:134 +msgid "Cannot save repository configuration to file \"{}\": {}" +msgstr "" diff --git a/libdnf5/base/base.cpp b/libdnf5/base/base.cpp index 1b2e9ff79..90b182f33 100644 --- a/libdnf5/base/base.cpp +++ b/libdnf5/base/base.cpp @@ -165,12 +165,22 @@ void Base::setup() { vars_installroot = config.get_installroot_option().get_value(); } } - // Unless the logdir is specified on the command line, logdir should be - // relative to the installroot + // Unless the cachedir or logdir are specified on the command line, they + // should be relative to the installroot if (config.get_logdir_option().get_priority() < Option::Priority::COMMANDLINE) { const std::filesystem::path logdir_path{config.get_logdir_option().get_value()}; - const auto full_path = (installroot_path / logdir_path.relative_path()).string(); - config.get_logdir_option().set(Option::Priority::INSTALLROOT, full_path); + const auto full_path = installroot_path / logdir_path.relative_path(); + config.get_logdir_option().set(Option::Priority::INSTALLROOT, full_path.string()); + } + if (config.get_cachedir_option().get_priority() < Option::Priority::COMMANDLINE) { + const std::filesystem::path cachedir_path{config.get_cachedir_option().get_value()}; + const auto full_path = installroot_path / cachedir_path.relative_path(); + config.get_cachedir_option().set(Option::Priority::INSTALLROOT, full_path.string()); + } + if (config.get_system_cachedir_option().get_priority() < Option::Priority::COMMANDLINE) { + const std::filesystem::path system_cachedir_path{config.get_system_cachedir_option().get_value()}; + const auto full_path = installroot_path / system_cachedir_path.relative_path(); + config.get_system_cachedir_option().set(Option::Priority::INSTALLROOT, full_path.string()); } load_plugins(); @@ -220,7 +230,7 @@ void Base::setup() { config.get_varsdir_option().lock("Locked by Base::setup()"); pool_setdisttype(**pool, DISTTYPE_RPM); - // TODO(jmracek) - architecture variable is changable therefore architecture in vars must be synchronized with RpmPool + // TODO(jmracek) - architecture variable is changeable therefore architecture in vars must be synchronized with RpmPool // (and force to recompute provides) or locked const char * arch = vars->get_value("arch").c_str(); pool_setarch(**pool, arch); diff --git a/libdnf5/base/goal.cpp b/libdnf5/base/goal.cpp index 80ad38276..c88dd5b99 100644 --- a/libdnf5/base/goal.cpp +++ b/libdnf5/base/goal.cpp @@ -879,7 +879,7 @@ std::pair Goal::Impl::add_install_to_goal( } // The correct evaluation of rich dependencies can be only performed by solver. - // There are some limitations - solver is unable to handle whan operation is limited to packages from the + // There are some limitations - solver is unable to handle when operation is limited to packages from the // particular repository and multilib_policy `all`. if (libdnf5::rpm::Reldep::is_rich_dependency(spec) && settings.to_repo_ids.empty()) { add_provide_install_to_goal(spec, settings); @@ -1198,7 +1198,7 @@ GoalProblem Goal::Impl::add_reinstall_to_goal( } } - // TODO(jmracek) Implement fitering from_repo_ids + // TODO(jmracek) Implement filtering from_repo_ids if (!settings.to_repo_ids.empty()) { relevant_available.filter_repo_id(settings.to_repo_ids, sack::QueryCmp::GLOB); @@ -1273,7 +1273,7 @@ void Goal::Impl::add_rpms_to_goal(base::Transaction & transaction) { } rpm::PackageQuery query(installed); query.filter_nevra(nevras); - // report aready installed packages with the same NEVRA + // report already installed packages with the same NEVRA for (auto package_id : *query.p_impl) { transaction.p_impl->add_resolve_log( action, @@ -2316,7 +2316,7 @@ base::Transaction Goal::resolve() { // 2. group removal needs a list of all groups being removed to correctly remove packages ret |= p_impl->resolve_group_specs(p_impl->group_specs, transaction); - // Handle environments befor groups because they will add/remove groups + // Handle environments before groups because they will add/remove groups p_impl->add_resolved_environment_specs_to_goal(transaction); // Then handle groups diff --git a/libdnf5/base/log_event.cpp b/libdnf5/base/log_event.cpp index 0d64d9da9..62273c4b3 100644 --- a/libdnf5/base/log_event.cpp +++ b/libdnf5/base/log_event.cpp @@ -46,7 +46,7 @@ LogEvent::LogEvent( problem == libdnf5::GoalProblem::SOLVER_PROBLEM_STRICT_RESOLVEMENT), "LogEvent::LogEvent() called with incorrect problem, the constructor does not allow" "libdnf5::GoalProblem::SOLVER_ERROR or libdnf5::GoalProblem::SOLVER_PROBLEM_STRICT_RESOLVEMENT. With those " - "problems it is necesarry to provide SolverProblems in constructor"); + "problems it is necessary to provide SolverProblems in constructor"); } LogEvent::LogEvent(libdnf5::GoalProblem problem, const SolverProblems & solver_problems) diff --git a/libdnf5/base/transaction.cpp b/libdnf5/base/transaction.cpp index 5ff77408c..94a693c97 100644 --- a/libdnf5/base/transaction.cpp +++ b/libdnf5/base/transaction.cpp @@ -354,7 +354,7 @@ void Transaction::Impl::set_transaction( if (!solver_problems.empty()) { add_resolve_log(GoalProblem::SOLVER_ERROR, solver_problems); } else { - // TODO(jmracek) To improve performance add a test whether it make sence to resolve transaction in strict mode + // TODO(jmracek) To improve performance add a test whether it make sense to resolve transaction in strict mode // Test whether there were skipped jobs or used not the best candidates due to broken dependencies rpm::solv::GoalPrivate solved_goal_copy(solved_goal); solved_goal_copy.set_run_in_strict_mode(true); @@ -456,7 +456,7 @@ void Transaction::Impl::set_transaction( const auto reason_override = rpm_reason_overrides.find(pkg.get_package().get_nevra()); if (reason_override != rpm_reason_overrides.end()) { // For UPGRADE, DOWNGRADE and REINSTALL change the reason only if it stronger. - // This is requierd because we don't want to for example mark some user installed + // This is required because we don't want to for example mark some user installed // package as a dependency (except when the user specifically asks for it - action REASON_CHANGE). if (pkg.get_action() == transaction::TransactionItemAction::INSTALL || pkg.get_action() == transaction::TransactionItemAction::REMOVE || @@ -827,7 +827,7 @@ Transaction::TransactionRunResult Transaction::Impl::_run( state.packages.emplace_back(pkg_name); } else { // also group packages that were installed before this transaction - // system state consideres as installed by group + // system state considered as installed by group rpm::PackageQuery query(installed_query); query.filter_name({pkg_name}); if (!query.empty()) { @@ -1087,7 +1087,7 @@ std::string Transaction::serialize() { group_replay.repo_id = *(group.get_group().get_repos().begin()); //TODO(amatej): add package types... if they are actually needed though... which I am not sure now. - // -> becuase if I plan to store the group jsons separately it will contain all information, so the pkg types shoudn't be here + // -> because if I plan to store the group jsons separately it will contain all information, so the pkg types shouldn't be here transaction_replay.groups.push_back(group_replay); } diff --git a/libdnf5/common/exception.cpp b/libdnf5/common/exception.cpp index 2f1628a75..fc23e71ff 100644 --- a/libdnf5/common/exception.cpp +++ b/libdnf5/common/exception.cpp @@ -135,7 +135,7 @@ Error & Error::operator=(const Error & e) noexcept { const char * Error::what() const noexcept { if (!formatter) { - // formatter not set means copy constructor or assigment operator failed + // formatter not set means copy constructor or assignment operator failed return TM_(format, 1); } diff --git a/libdnf5/comps/environment/environment.cpp b/libdnf5/comps/environment/environment.cpp index b18b15c7b..94fd24c66 100644 --- a/libdnf5/comps/environment/environment.cpp +++ b/libdnf5/comps/environment/environment.cpp @@ -213,7 +213,7 @@ void Environment::serialize(const std::string & path) { if (keyname.rfind(summary_prefix, 0) == 0) { lang = keyname.substr(summary_prefix.length()); // Add the lang into the set - // If it's succesful (wasn't already present), create an XML node for this translation + // If it's successful (wasn't already present), create an XML node for this translation if (name_langs.insert(lang).second) { node = utils::xml::add_subnode_with_text(node_environment, "name", std::string(di.kv.str)); xmlNewProp(node, BAD_CAST "xml:lang", BAD_CAST lang.c_str()); @@ -223,7 +223,7 @@ void Environment::serialize(const std::string & path) { else if (keyname.rfind(description_prefix, 0) == 0) { lang = keyname.substr(description_prefix.length()); // Add the lang into the set - // If it's succesful (wasn't already present), create an XML node for this translation + // If it's successful (wasn't already present), create an XML node for this translation if (description_langs.insert(lang).second) { node = utils::xml::add_subnode_with_text(node_environment, "description", std::string(di.kv.str)); xmlNewProp(node, BAD_CAST "xml:lang", BAD_CAST lang.c_str()); diff --git a/libdnf5/comps/group/group.cpp b/libdnf5/comps/group/group.cpp index bf70626b8..6826e3f9a 100644 --- a/libdnf5/comps/group/group.cpp +++ b/libdnf5/comps/group/group.cpp @@ -242,7 +242,7 @@ void Group::serialize(const std::string & path) { if (keyname.rfind(summary_prefix, 0) == 0) { lang = keyname.substr(summary_prefix.length()); // Add the lang into the set - // If it's succesful (wasn't already present), create an XML node for this translation + // If it's successful (wasn't already present), create an XML node for this translation if (name_langs.insert(lang).second) { node = utils::xml::add_subnode_with_text(node_group, "name", std::string(di.kv.str)); xmlNewProp(node, BAD_CAST "xml:lang", BAD_CAST lang.c_str()); @@ -252,7 +252,7 @@ void Group::serialize(const std::string & path) { else if (keyname.rfind(description_prefix, 0) == 0) { lang = keyname.substr(description_prefix.length()); // Add the lang into the set - // If it's succesful (wasn't already present), create an XML node for this translation + // If it's successful (wasn't already present), create an XML node for this translation if (description_langs.insert(lang).second) { node = utils::xml::add_subnode_with_text(node_group, "description", std::string(di.kv.str)); xmlNewProp(node, BAD_CAST "xml:lang", BAD_CAST lang.c_str()); diff --git a/libdnf5/conf/vars.cpp b/libdnf5/conf/vars.cpp index a017e2000..4e58e9763 100644 --- a/libdnf5/conf/vars.cpp +++ b/libdnf5/conf/vars.cpp @@ -94,7 +94,7 @@ static std::string detect_arch() { /* un.machine is armvXE, where X is version number and E is * endianness (b or l); we need to add modifiers such as * h (hardfloat), n (neon). Neon is a requirement of armv8 so - * as far as rpm is concerned armv8l is the equivilent of armv7hnl + * as far as rpm is concerned armv8l is the equivalent of armv7hnl * (or 7hnb) so we don't explicitly add 'n' for 8+ as it's expected. */ char endian = un.machine[strlen(un.machine) - 1]; char * modifier = un.machine + 5; diff --git a/libdnf5/module/module_sack.cpp b/libdnf5/module/module_sack.cpp index e2af5429d..2176a2944 100644 --- a/libdnf5/module/module_sack.cpp +++ b/libdnf5/module/module_sack.cpp @@ -281,7 +281,7 @@ void ModuleSack::Impl::module_filtering() { auto [include_NEVRAs, exclude_NEVRAs, names, src_names, reldep_name_list] = collect_data_for_modular_filtering(); - // Packages from system, commandline, and hotfix repositories are not targets for modular filterring + // Packages from system, commandline, and hotfix repositories are not targets for modular filtering libdnf5::rpm::PackageQuery target_packages(base); // TODO(replace) "@System", "@commandline" by defined variables like in dnf4 @@ -319,7 +319,7 @@ void ModuleSack::Impl::module_filtering() { exclude_provides_query.filter_provides(reldep_name_list); exclude_provides_query.difference(include_query); - // Search for source packages with same names as included source artifacts. Handling of sorce packages differently + // Search for source packages with same names as included source artifacts. Handling of source packages differently // prevent filtering out of binary packages that has the same name as source package but binary package is not // in module (it prevents creation of broken dependenciers in the distribution) exclude_src_names_query.filter_name(src_names); @@ -535,7 +535,7 @@ std::pair>, ModuleSack::ModuleErrorType> Mo return make_pair(problems, ModuleSack::ModuleErrorType::ERROR_IN_LATEST); } - // Conflicting modules has to be removed otherwice it could result than one of them will be active + // Conflicting modules has to be removed otherwise it could result than one of them will be active for (auto conflicting_module_id : goal.list_conflicting()) { excludes->add(conflicting_module_id); } diff --git a/libdnf5/module/module_sack_impl.hpp b/libdnf5/module/module_sack_impl.hpp index d16406276..eb423f284 100644 --- a/libdnf5/module/module_sack_impl.hpp +++ b/libdnf5/module/module_sack_impl.hpp @@ -121,7 +121,7 @@ class ModuleSack::Impl { /// @param name module name to be enabled. /// @param stream module stream to be enabled. /// @param count if `true`, count the change towards the limit of module status modifications. - /// @return `true` if requested change realy triggers a change in the ModuleDB, `false` otherwise. + /// @return `true` if requested change really triggers a change in the ModuleDB, `false` otherwise. /// @throw EnableMultipleStreamsError in case of conflicting enable requests. /// @throw NoModuleError if the module doesn't exist. /// @since 5.0.14 @@ -129,7 +129,7 @@ class ModuleSack::Impl { /// Enable module stream. /// @param module_spec module to be enabled. /// @param count if `true`, count the change towards the limit of module status modifications. - /// @return `true` if requested change realy triggers a change in the ModuleDB, `false` otherwise. + /// @return `true` if requested change really triggers a change in the ModuleDB, `false` otherwise. /// @throw EnableMultipleStreamsError in case of conflicting enable requests. /// @throw NoModuleError if the module doesn't exist. /// @since 5.0.14 diff --git a/libdnf5/po/cs.po b/libdnf5/po/cs.po index 932efceca..847d4c3d5 100644 --- a/libdnf5/po/cs.po +++ b/libdnf5/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -89,49 +89,49 @@ msgstr "" msgid "Argument '{}' matches only excluded packages." msgstr "" -#: base/log_event.cpp:116 +#: base/log_event.cpp:119 msgid " * Maybe you meant: {}" msgstr "" -#: base/log_event.cpp:119 +#: base/log_event.cpp:122 msgid "There are following alternatives for '{0}': {1}" msgstr "" -#: base/log_event.cpp:126 +#: base/log_event.cpp:129 msgid "" "The lowest available version of the \"{}\" package is already installed, " "cannot downgrade it." msgstr "" -#: base/log_event.cpp:132 +#: base/log_event.cpp:135 msgid "" "Packages for argument '{}' installed and available, but in a different " "version => cannot reinstall" msgstr "" -#: base/log_event.cpp:137 +#: base/log_event.cpp:140 msgid "" "Packages for argument '{}' installed and available, but in a different " "version." msgstr "" -#: base/log_event.cpp:139 +#: base/log_event.cpp:142 msgid "Packages for argument '{}' installed, but not available." msgstr "" -#: base/log_event.cpp:148 +#: base/log_event.cpp:151 msgid "Package \"{}\" is already installed with reason \"{}\"." msgstr "" -#: base/log_event.cpp:150 +#: base/log_event.cpp:153 msgid "Package \"{}\" is already installed." msgstr "" -#: base/log_event.cpp:159 +#: base/log_event.cpp:162 msgid "Debug data written to \"{}\"" msgstr "" -#: base/log_event.cpp:162 +#: base/log_event.cpp:165 msgid "{} action for argument \"{}\" is not supported." msgstr "" diff --git a/libdnf5/po/de.po b/libdnf5/po/de.po index 932efceca..847d4c3d5 100644 --- a/libdnf5/po/de.po +++ b/libdnf5/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -89,49 +89,49 @@ msgstr "" msgid "Argument '{}' matches only excluded packages." msgstr "" -#: base/log_event.cpp:116 +#: base/log_event.cpp:119 msgid " * Maybe you meant: {}" msgstr "" -#: base/log_event.cpp:119 +#: base/log_event.cpp:122 msgid "There are following alternatives for '{0}': {1}" msgstr "" -#: base/log_event.cpp:126 +#: base/log_event.cpp:129 msgid "" "The lowest available version of the \"{}\" package is already installed, " "cannot downgrade it." msgstr "" -#: base/log_event.cpp:132 +#: base/log_event.cpp:135 msgid "" "Packages for argument '{}' installed and available, but in a different " "version => cannot reinstall" msgstr "" -#: base/log_event.cpp:137 +#: base/log_event.cpp:140 msgid "" "Packages for argument '{}' installed and available, but in a different " "version." msgstr "" -#: base/log_event.cpp:139 +#: base/log_event.cpp:142 msgid "Packages for argument '{}' installed, but not available." msgstr "" -#: base/log_event.cpp:148 +#: base/log_event.cpp:151 msgid "Package \"{}\" is already installed with reason \"{}\"." msgstr "" -#: base/log_event.cpp:150 +#: base/log_event.cpp:153 msgid "Package \"{}\" is already installed." msgstr "" -#: base/log_event.cpp:159 +#: base/log_event.cpp:162 msgid "Debug data written to \"{}\"" msgstr "" -#: base/log_event.cpp:162 +#: base/log_event.cpp:165 msgid "{} action for argument \"{}\" is not supported." msgstr "" diff --git a/libdnf5/po/ka.po b/libdnf5/po/ka.po index 3effd8fc3..5ab93fd78 100644 --- a/libdnf5/po/ka.po +++ b/libdnf5/po/ka.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 02:52+0000\n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" "PO-Revision-Date: 2023-11-16 19:01+0000\n" "Last-Translator: Temuri Doghonadze \n" "Language-Team: Georgian cannot reinstall" @@ -118,30 +118,30 @@ msgstr "" "პაკეტი არგუმენტისთვის '{}' დაყენებული და ხელმისაწვდომია, მაგრამ სხვა ვერსია " "=> თავიდან დაყენება შეუძლებელია" -#: base/log_event.cpp:137 +#: base/log_event.cpp:140 msgid "" "Packages for argument '{}' installed and available, but in a different " "version." msgstr "" "პაკეტი არგუმენტისთვის '{}' დაყენებული და ხელმისაწვდომია, მაგრამ სხვა ვერსია." -#: base/log_event.cpp:139 +#: base/log_event.cpp:142 msgid "Packages for argument '{}' installed, but not available." msgstr "პაკეტი არგუმენტისთვის '{}' დაყენებულია, მაგრამ ხელმისაწვდომი არაა." -#: base/log_event.cpp:148 +#: base/log_event.cpp:151 msgid "Package \"{}\" is already installed with reason \"{}\"." msgstr "პაკეტი \"{}\" უკვე დაყენებულია, მიზეზი: \"{}\"." -#: base/log_event.cpp:150 +#: base/log_event.cpp:153 msgid "Package \"{}\" is already installed." msgstr "პაკეტი \"{}\" უკვე დაყენებულია." -#: base/log_event.cpp:159 +#: base/log_event.cpp:162 msgid "Debug data written to \"{}\"" msgstr "გამართვის მონაცემები \"{}\"-ში ჩაიწერა" -#: base/log_event.cpp:162 +#: base/log_event.cpp:165 msgid "{} action for argument \"{}\" is not supported." msgstr "ქმედება {} არგუმენტისთვის \"{}\" მხარდაჭერილი არაა." diff --git a/libdnf5/po/sv.po b/libdnf5/po/sv.po new file mode 100644 index 000000000..c303f652c --- /dev/null +++ b/libdnf5/po/sv.po @@ -0,0 +1,1082 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Rafael Fontenelle , 2024. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-01-09 02:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: advisory/advisory.cpp:44 +msgid "" +"Bad libsolv id for advisory \"{}\", solvable name \"{}\" doesn't have " +"advisory prefix \"{}\"" +msgstr "" + +#: base/goal.cpp:387 +msgid "Unsupported argument for REMOVE action: {}" +msgstr "" + +#. TODO(lukash) throw a proper exception +#: base/goal.cpp:1098 +msgid "Incorrect configuration value for multilib_policy: {}" +msgstr "" + +#: base/goal.cpp:2306 +msgid "Failed to resolve modules." +msgstr "" + +#: base/log_event.cpp:80 +msgid "packages" +msgstr "" + +#: base/log_event.cpp:83 +msgid "groups" +msgstr "" + +#: base/log_event.cpp:86 +msgid "environmental groups" +msgstr "" + +#: base/log_event.cpp:89 +msgid "modules" +msgstr "" + +#: base/log_event.cpp:92 +msgid "No {} to remove for argument: {}" +msgstr "" + +#: base/log_event.cpp:95 +msgid "No match for group from environment: {}" +msgstr "" + +#: base/log_event.cpp:97 +msgid "No match for group package: {}" +msgstr "" + +#: base/log_event.cpp:100 +msgid "No match for argument: {}" +msgstr "" + +#: base/log_event.cpp:103 +msgid "No match for argument '{0}' in repositories '{1}'" +msgstr "" + +#: base/log_event.cpp:107 +msgid "Packages for argument '{}' available, but not installed." +msgstr "" + +#: base/log_event.cpp:110 +msgid "" +"Packages for argument '{}' available, but installed for a different " +"architecture." +msgstr "" + +#: base/log_event.cpp:112 +msgid "Argument '{}' matches only source packages." +msgstr "" + +#: base/log_event.cpp:114 +msgid "Argument '{}' matches only excluded packages." +msgstr "" + +#: base/log_event.cpp:119 +msgid " * Maybe you meant: {}" +msgstr "" + +#: base/log_event.cpp:122 +msgid "There are following alternatives for '{0}': {1}" +msgstr "" + +#: base/log_event.cpp:129 +msgid "" +"The lowest available version of the \"{}\" package is already installed, " +"cannot downgrade it." +msgstr "" + +#: base/log_event.cpp:135 +msgid "" +"Packages for argument '{}' installed and available, but in a different " +"version => cannot reinstall" +msgstr "" + +#: base/log_event.cpp:140 +msgid "" +"Packages for argument '{}' installed and available, but in a different " +"version." +msgstr "" + +#: base/log_event.cpp:142 +msgid "Packages for argument '{}' installed, but not available." +msgstr "" + +#: base/log_event.cpp:151 +msgid "Package \"{}\" is already installed with reason \"{}\"." +msgstr "" + +#: base/log_event.cpp:153 +msgid "Package \"{}\" is already installed." +msgstr "" + +#: base/log_event.cpp:162 +msgid "Debug data written to \"{}\"" +msgstr "" + +#: base/log_event.cpp:165 +msgid "{} action for argument \"{}\" is not supported." +msgstr "" + +#: base/solver_problems.cpp:37 +msgid "{} does not belong to a distupgrade repository" +msgstr "" + +#: base/solver_problems.cpp:38 +msgid "{} has inferior architecture" +msgstr "" + +#: base/solver_problems.cpp:39 +msgid "problem with installed package " +msgstr "" + +#: base/solver_problems.cpp:40 +msgid "conflicting requests" +msgstr "" + +#: base/solver_problems.cpp:41 +msgid "unsupported request" +msgstr "" + +#: base/solver_problems.cpp:42 +msgid "nothing provides requested {}" +msgstr "" + +#: base/solver_problems.cpp:43 +msgid "package {} does not exist" +msgstr "" + +#: base/solver_problems.cpp:44 +msgid "{} is provided by the system" +msgstr "" + +#: base/solver_problems.cpp:45 +msgid "some dependency problem" +msgstr "" + +#: base/solver_problems.cpp:46 +msgid "cannot install the best update candidate for package {}" +msgstr "" + +#: base/solver_problems.cpp:47 +msgid "cannot install the best candidate for the job" +msgstr "" + +#: base/solver_problems.cpp:48 +msgid "package {} is filtered out by modular filtering" +msgstr "" + +#: base/solver_problems.cpp:49 +msgid "package {} does not have a compatible architecture" +msgstr "" + +#: base/solver_problems.cpp:50 +msgid "package {} is not installable" +msgstr "" + +#: base/solver_problems.cpp:51 +msgid "package {} is filtered out by exclude filtering" +msgstr "" + +#: base/solver_problems.cpp:52 +msgid "nothing provides {0} needed by {1}" +msgstr "" + +#: base/solver_problems.cpp:53 +msgid "cannot install both {0} and {1}" +msgstr "" + +#: base/solver_problems.cpp:54 +msgid "package {0} conflicts with {1} provided by {2}" +msgstr "" + +#: base/solver_problems.cpp:55 +msgid "package {0} obsoletes {1} provided by {2}" +msgstr "" + +#: base/solver_problems.cpp:56 +msgid "installed package {0} obsoletes {1} provided by {2}" +msgstr "" + +#: base/solver_problems.cpp:57 +msgid "package {0} implicitly obsoletes {1} provided by {2}" +msgstr "" + +#: base/solver_problems.cpp:58 +msgid "package {1} requires {0}, but none of the providers can be installed" +msgstr "" + +#: base/solver_problems.cpp:59 +msgid "package {1} conflicts with {0} provided by itself" +msgstr "" + +#: base/solver_problems.cpp:60 +msgid "both package {0} and {2} obsolete {1}" +msgstr "" + +#: base/solver_problems.cpp:62 +msgid "" +"The operation would result in removing the following protected packages: {}" +msgstr "" + +#: base/solver_problems.cpp:65 +msgid "The operation would result in removing of running kernel: {}" +msgstr "" + +#: base/solver_problems.cpp:249 +msgid "Problem: " +msgstr "" + +#: base/solver_problems.cpp:253 +msgid "Problem {}: " +msgstr "" + +#: base/transaction.cpp:71 +msgid "This transaction has been already run before." +msgstr "" + +#: base/transaction.cpp:72 +msgid "Cannot run transaction with resolving problems." +msgstr "" + +#: base/transaction.cpp:73 +msgid "Rpm transaction check failed." +msgstr "" + +#: base/transaction.cpp:75 +msgid "" +"Failed to obtain rpm transaction lock. Another transaction is in progress." +msgstr "" + +#: base/transaction.cpp:76 +msgid "Rpm transaction failed." +msgstr "" + +#: base/transaction.cpp:77 +msgid "Signature verification failed." +msgstr "" + +#: base/transaction.cpp:81 +msgid "The repository does not have any PGP keys configured." +msgstr "" + +#: base/transaction.cpp:82 +msgid "Public key is not installed." +msgstr "" + +#: base/transaction.cpp:83 +msgid "Canceled by the user." +msgstr "" + +#: base/transaction.cpp:84 +msgid "Public key import failed." +msgstr "" + +#: base/transaction.cpp:620 +msgid "Invalid tsflag: {}" +msgstr "" + +#: base/transaction.cpp:954 +msgid "Public key \"{}\" is already present, not importing." +msgstr "" + +#: base/transaction.cpp:975 +msgid "An error occurred importing key \"{}\": {}" +msgstr "" + +#: base/transaction.cpp:1008 +msgid "PGP check for package \"{}\" ({}) from repo \"{}\" has failed: " +msgstr "" + +#: base/transaction.cpp:1035 +msgid "Import of the key didn't help, wrong key?" +msgstr "" + +#: base/transaction.cpp:1053 +msgid "Warning: skipped PGP checks for {} package(s)." +msgstr "" + +#: common/exception.cpp:78 +msgid "System error" +msgstr "" + +#: common/exception.cpp:199 +msgid "General RuntimeError exception" +msgstr "" + +#: common/sack/query.cpp:27 +msgid "Query must contain exactly one object." +msgstr "" + +#: common/xdg.cpp:43 +msgid "get_user_home_dir(): Cannot determine the user's home directory" +msgstr "" + +#: common/xdg.cpp:98 +msgid "get_user_runtime_dir(): Cannot determine the user's runtime directory" +msgstr "" + +#: comps/environment/environment.cpp:252 +msgid "failed to save xml document for comps" +msgstr "" + +#: comps/group/group.cpp:283 +msgid "Failed to save xml document for group \"{}\" to file \"{}\": {}" +msgstr "" + +#: comps/group/package.cpp:31 comps/group/package.cpp:34 +msgid "Invalid package type: {}" +msgstr "" + +#: conf/config_main.cpp:53 +msgid "Input is empty. Must contain a value." +msgstr "" + +#: conf/config_main.cpp:59 +msgid "Input value '{}' must not be negative" +msgstr "" + +#: conf/config_main.cpp:64 +msgid "Could not convert '{}' to bytes" +msgstr "" + +#: conf/config_main.cpp:80 +msgid "Unknown unit '{}'" +msgstr "" + +#: conf/config_main.cpp:327 +msgid "The throttle value {} is outside the allowed range {} ... {}" +msgstr "" + +#: conf/config_parser.cpp:53 +msgid "Section \"{}\" not found" +msgstr "" + +#: conf/config_parser.cpp:58 +msgid "Section \"{}\" does not contain option \"{}\"" +msgstr "" + +#: conf/config_parser.cpp:66 +msgid "Configuration file \"{}\" not found" +msgstr "" + +#: conf/config_parser.cpp:68 +msgid "Unable to access configuration file \"{}\"" +msgstr "" + +#: conf/config_parser.cpp:71 +msgid "Error in configuration file \"{}\"" +msgstr "" + +#: conf/option_binds.cpp:29 +msgid "Option \"{}\" not found" +msgstr "" + +#: conf/option_binds.cpp:32 +msgid "Option \"{}\" already exists" +msgstr "" + +#: conf/option_bool.cpp:84 +msgid "Invalid boolean value \"{}\"" +msgstr "" + +#: conf/option_enum.cpp:79 conf/option_enum.cpp:164 +msgid "Enum option value \"{}\" not allowed" +msgstr "" + +#: conf/option_enum.cpp:92 +msgid "Invalid enum option value \"{}\"" +msgstr "" + +#: conf/option_number.cpp:76 +msgid "Input value {} is outside the allowed range {} ... {}" +msgstr "" + +#: conf/option_number.cpp:89 +msgid "Invalid number option value \"{}\"" +msgstr "" + +#: conf/option_path.cpp:81 +msgid "Only absolute paths allowed, relative path \"{}\" detected" +msgstr "" + +#: conf/option_path.cpp:86 +msgid "Path \"{}\" does not exist" +msgstr "" + +#: conf/option_seconds.cpp:38 +msgid "Empty time option value" +msgstr "" + +#: conf/option_seconds.cpp:50 +msgid "Invalid time option value \"{}\", number or \"never\" expected" +msgstr "" + +#: conf/option_seconds.cpp:54 +msgid "" +"Invalid time option value \"{}\", negative values except \"-1\" not allowed" +msgstr "" + +#: conf/option_seconds.cpp:59 +msgid "Unknown time format \"{}\"" +msgstr "" + +#: conf/option_seconds.cpp:78 +msgid "Unknown time unit '{}'" +msgstr "" + +#: conf/option_string.cpp:72 +msgid "" +"Input value \"{}\" not allowed, allowed values for this option are defined " +"by regular expression \"{}\"" +msgstr "" + +#. TODO(jrohel): We don't know the option name at this time. Add a text name to the options +#. or extend exception (add name) in upper layer. +#: conf/option_string.cpp:97 +msgid "Option value is not set" +msgstr "" + +#: conf/option_string_list.cpp:118 +msgid "" +"Input item value \"{}\" not allowed, allowed values for this option are " +"defined by regular expression \"{}\"" +msgstr "" + +#: conf/vars.cpp:64 +msgid "failed to read rpm config files" +msgstr "" + +#: conf/vars.cpp:90 +msgid "Failed to execute uname()" +msgstr "" + +#: conf/vars.cpp:355 +msgid "Variable \"{}\" is read-only" +msgstr "" + +#: logger/rotating_file_logger.cpp:59 +msgid "Cannot open log file" +msgstr "" + +#: module/module_db.cpp:76 module/module_db.cpp:85 module/module_sack.cpp:764 +msgid "No such module: {}" +msgstr "" + +#: module/module_db.cpp:268 +msgid "Cannot enable multiple streams for module '{}'" +msgstr "" + +#. TODO(pkratoch) replace with a proper and descriptive exception +#. TODO(jmracek) else if (removalOfProtected && removalOfProtected->size()) { +#. throw Goal::Error(_("no solution, cannot remove protected package"), +#. DNF_ERROR_REMOVAL_OF_PROTECTED_PKG); +#. } +#. TODO(lukash) replace with a proper and descriptive exception +#: module/module_goal_private.cpp:83 rpm/solv/goal_private.cpp:337 +#: rpm/solv/goal_private.cpp:744 +msgid "no solution possible" +msgstr "" + +#: module/module_metadata.cpp:102 +msgid "Failed to update from string: {}" +msgstr "" + +#: module/module_metadata.cpp:129 +msgid "Failed to resolve: {}" +msgstr "" + +#: module/module_metadata.cpp:139 +msgid "Failed to upgrade defaults: {}" +msgstr "" + +#: module/module_metadata.cpp:143 +msgid "Failed to upgrade streams: {}" +msgstr "" + +#: module/module_sack.cpp:92 +msgid "Failed to load module metadata for repository \"{}\": {}" +msgstr "" + +#: module/module_sack.cpp:591 +msgid "Missing '='" +msgstr "" + +#: module/module_sack.cpp:595 module/module_sack.cpp:603 +msgid "Missing '\"' in the value" +msgstr "" + +#: module/module_sack.cpp:599 +msgid "Missing ':' in the value" +msgstr "" + +#: module/module_sack.cpp:830 +msgid "Invalid module status: {}" +msgstr "" + +#: plugin/plugins.cpp:64 +msgid "" +"Unsupported plugin API combination. API version provided by plugin " +"\"{}\" (\"{}\") is \"{}.{}\". API version in libdnf is \"{}.{}\"." +msgstr "" + +#: plugin/plugins.cpp:113 +msgid "Cannot find plugin library \"{}\"" +msgstr "" + +#: plugin/plugins.cpp:169 +msgid "Invalid option value: enabled={}" +msgstr "" + +#: plugin/plugins.cpp:187 +msgid "Plugins::load_plugins(): config_dir_path cannot be empty" +msgstr "" + +#: plugin/plugins.cpp:212 +msgid "Cannot load plugins: {}" +msgstr "" + +#: repo/config_repo.cpp:582 +msgid "get_unique_id(): Computation of SHA256 failed" +msgstr "" + +#: repo/file_downloader.cpp:143 +msgid "Cannot download files, cacheonly option is activated." +msgstr "" + +#: repo/file_downloader.cpp:204 +msgid "Failed to download files" +msgstr "" + +#: repo/librepo.cpp:123 +msgid "" +"Maximum download speed is lower than minimum, please change configuration of " +"minrate or throttle" +msgstr "" + +#: repo/package_downloader.cpp:147 +msgid "Cannot download the \"{0}\" package, cacheonly option is activated." +msgstr "" + +#: repo/package_downloader.cpp:222 +msgid "Failed to download packages" +msgstr "" + +#: repo/repo.cpp:74 +msgid "Failed to load RPM \"{}\": doesn't have the \".rpm\" extension" +msgstr "" + +#: repo/repo.cpp:78 +msgid "Failed to access RPM \"{}\": {}" +msgstr "" + +#: repo/repo.cpp:98 +msgid "Invalid repository id \"{}\": unexpected character '{}'" +msgstr "" + +#: repo/repo.cpp:139 +msgid "Repository \"{}\" has no source (baseurl, mirrorlist or metalink) set." +msgstr "" + +#: repo/repo.cpp:150 +msgid "Repository \"{}\" has unsupported type \"{}\", skipping." +msgstr "" + +#: repo/repo.cpp:415 +msgid "" +"Failed to load repository: \"primary\" data not present or in unsupported " +"format" +msgstr "" + +#: repo/repo.cpp:480 +msgid "Failed to load RPM \"{}\": {}" +msgstr "" + +#: repo/repo_cache.cpp:105 +msgid "Empty path to the repository cache directory." +msgstr "" + +#: repo/repo_cache.cpp:209 +msgid "Unable to determine id of the repository in the cache." +msgstr "" + +#: repo/repo_downloader.cpp:138 +msgid "Librepo error: {}" +msgstr "" + +#: repo/repo_downloader.cpp:170 +msgid "Failed to download metadata ({}: \"{}\") for repository \"{}\"" +msgstr "" + +#: repo/repo_downloader.cpp:241 +msgid "Error checking if metalink \"{}\" is in sync for repository \"{}\"" +msgstr "" + +#: repo/repo_downloader.cpp:271 +msgid "Error checking if repomd ({}: \"{}\") is in sync for repository \"{}\"" +msgstr "" + +#: repo/repo_downloader.cpp:335 +msgid "Error loading local metadata for repository \"{}\"" +msgstr "" + +#: repo/repo_downloader.cpp:455 +msgid "" +"No valid source (baseurl, mirrorlist or metalink) found for repository \"{}\"" +msgstr "" + +#: repo/repo_pgp.cpp:61 +msgid "Failed to import pgp keys into temporary keyring: {}" +msgstr "" + +#: repo/repo_pgp.cpp:67 repo/repo_pgp.cpp:94 +msgid "Failed to list pgp keys: {}" +msgstr "" + +#: repo/repo_pgp.cpp:141 +msgid "Failed to import pgp keys: {}" +msgstr "" + +#: repo/repo_sack.cpp:83 +msgid "" +"Failed to create repo \"{}\": Id is present more than once in the " +"configuration" +msgstr "" + +#: repo/repo_sack.cpp:417 +msgid "Cache-only enabled but no cache for repository \"{}\"" +msgstr "" + +#: repo/solv_repo.cpp:258 +msgid "Failed to load repomd for repo \"{}\" from \"{}\": {}." +msgstr "" + +#: repo/solv_repo.cpp:266 +msgid "Failed to load primary for repo \"{}\" from \"{}\": {}." +msgstr "" + +#: repo/solv_repo.cpp:311 +msgid "Unsupported extended repodata type for the system repo: \"{}\"." +msgstr "" + +#: repo/solv_repo.cpp:377 +msgid "Failed to load {} extension for repo \"{}\" from \"{}\": {}" +msgstr "" + +#: repo/solv_repo.cpp:412 +msgid "Failed to load system repo from root \"{}\": {}" +msgstr "" + +#: repo/solv_repo.cpp:511 +msgid "Failed to load {} cache for repo \"{}\" from \"{}\": {}" +msgstr "" + +#: repo/solv_repo.cpp:563 +msgid "Failed to write primary cache for repo \"{}\" to \"{}\": {}" +msgstr "" + +#: repo/solv_repo.cpp:580 +msgid "Failed to re-load primary cache for repo \"{}\" from \"{}\": {}" +msgstr "" + +#: repo/solv_repo.cpp:644 +msgid "Failed to write {} cache for repo \"{}\" to \"{}\": {}" +msgstr "" + +#: repo/solv_repo.cpp:665 +msgid "Failed to re-load {} cache for repo \"{}\" from \"{}\": {}" +msgstr "" + +#: repo/temp_files_memory.cpp:52 +msgid "" +"An error occurred when parsing the temporary files memory file at '{}': {}" +msgstr "" + +#: rpm/nevra.cpp:69 +msgid "NEVRA string \"{}\" contains ':' multiple times" +msgstr "" + +#: rpm/nevra.cpp:73 +msgid "Invalid character '{}' in NEVRA string \"{}\"" +msgstr "" + +#: rpm/package.cpp:507 +msgid "Package with rpmdbid was not found" +msgstr "" + +#: rpm/reldep.cpp:93 rpm/reldep.cpp:100 +msgid "Cannot parse a dependency string" +msgstr "" + +#: rpm/rpm_signature.cpp:45 +msgid "No corresponding key was found." +msgstr "" + +#: rpm/rpm_signature.cpp:46 +msgid "The signature is valid, but the key is not trusted." +msgstr "" + +#: rpm/rpm_signature.cpp:47 +msgid "The package is not signed." +msgstr "" + +#: rpm/rpm_signature.cpp:48 +msgid "Problem occurred when opening the package." +msgstr "" + +#: rpm/rpm_signature.cpp:64 +msgid "Failed to set rpm transaction rootDir \"{}\"." +msgstr "" + +#: rpm/rpm_signature.cpp:204 +msgid "\"{}\": key is not an armored public key." +msgstr "" + +#: rpm/rpm_signature.cpp:209 +msgid "Failed to import public key \"{}\" to rpmdb: {}" +msgstr "" + +#. TODO(jrohel): Why? Librpm does not provide this information. +#: rpm/transaction.cpp:116 +msgid "Cannot set root directory \"{}\"" +msgstr "" + +#: rpm/transaction.cpp:127 +#, c-format +msgid "Error %i opening rpm database" +msgstr "" + +#: rpm/transaction.cpp:136 +msgid "The rpmdbCookie() function did not return cookie of rpm database." +msgstr "" + +#: rpm/transaction.cpp:200 +msgid "Failed to order the rpm transaction." +msgstr "" + +#: rpm/transaction.cpp:227 +msgid "" +"Failed to set scriptlet output file, cannot duplicate file descriptor: {}" +msgstr "" + +#: rpm/transaction.cpp:246 +msgid "Failed to set scriptlet output file, cannot open file \"{}\": {}" +msgstr "" + +#: rpm/transaction.cpp:267 +msgid "Failed to read package header, cannot open file \"{}\": {}" +msgstr "" + +#: rpm/transaction.cpp:284 +msgid "Failed to read package header from file \"{}\"" +msgstr "" + +#: rpm/transaction.cpp:297 +msgid "Cannot init rpm database iterator" +msgstr "" + +#: rpm/transaction.cpp:301 +msgid "Package was not found in rpm database" +msgstr "" + +#. TODO(jrohel): Why? Librpm does not provide this information. +#: rpm/transaction.cpp:317 +msgid "Cannot reinstall package \"{}\"" +msgstr "" + +#. TODO(jrohel): Why? Librpm does not provide this information. +#: rpm/transaction.cpp:335 +msgid "Cannot remove package \"{}\"" +msgstr "" + +#. TODO(jrohel): Why? Librpm does not provide this information. +#: rpm/transaction.cpp:371 +msgid "Cannot {} package \"{}\"" +msgstr "" + +#. TODO(lukash) throw proper exception class +#: solv/pool.cpp:174 +msgid "Failed to convert epoch \"{}\" to number" +msgstr "" + +#: solv/solver.cpp:79 +msgid "Writing debugsolver data into \"{}\" failed: {}" +msgstr "" + +#: system/state.cpp:226 system/state.cpp:235 +msgid "Invalid TOML version \"{}\", \"MAJOR.MINOR\" expected" +msgstr "" + +#: system/state.cpp:243 +msgid "{} state for \"{}\" not found." +msgstr "" + +#: system/state.cpp:508 +msgid "{}" +msgstr "" + +#: system/state.cpp:535 +msgid "Unsupported TOML version \"{}\", maximum supported version is \"{}\"" +msgstr "" + +#: transaction/Swdb.cpp:91 +msgid "In progress" +msgstr "" + +#: transaction/Swdb.cpp:99 transaction/Swdb.cpp:126 transaction/Swdb.cpp:136 +#: transaction/Swdb.cpp:150 transaction/Swdb.cpp:273 transaction/Swdb.cpp:281 +msgid "Not in progress" +msgstr "" + +#: transaction/Swdb.cpp:158 +msgid "No transaction in progress" +msgstr "" + +#: transaction/Transformer.cpp:647 +msgid "Transformer: can't open history persist dir" +msgstr "" + +#: transaction/Transformer.cpp:660 +msgid "Couldn't find a history database" +msgstr "" + +#. TODO(dmach): replace with a better exception class +#: transaction/db/comps_environment_group.cpp:100 +msgid "" +"Failed to insert record into table 'comps_environment_group' in history " +"database" +msgstr "" + +#: transaction/db/db.cpp:71 +msgid "Unable to get 'version' from table 'config'" +msgstr "" + +#. TODO(dmach): replace with a better exception class +#: transaction/db/item.cpp:43 +msgid "Failed to insert record into table 'item' in history database" +msgstr "" + +#: transaction/transaction.cpp:66 +msgid "Invalid transaction state: {}" +msgstr "" + +#: transaction/transaction.cpp:234 +msgid "Transaction has already started!" +msgstr "" + +#: transaction/transaction_item_action.cpp:28 +msgid "Invalid transaction item action: {}" +msgstr "" + +#: transaction/transaction_item_reason.cpp:28 +msgid "Invalid transaction item reason: {}" +msgstr "" + +#: transaction/transaction_item_state.cpp:28 +msgid "Invalid transaction item state: {}" +msgstr "" + +#: transaction/transaction_item_type.cpp:28 +msgid "Invalid transaction item type: {}" +msgstr "" + +#: transaction/transaction_sr.cpp:55 +msgid "Transaction replay JSON serialized transaction input is empty" +msgstr "" + +#: transaction/transaction_sr.cpp:63 +msgid "Error during transaction replay JSON parsing : {}" +msgstr "" + +#: transaction/transaction_sr.cpp:73 +msgid "Incompatible major version: \"{}\", supported major version is \"{}\"" +msgstr "" + +#: utils/fs/file.cpp:86 +msgid "cannot open file" +msgstr "" + +#: utils/fs/file.cpp:99 +msgid "cannot open file from fd" +msgstr "" + +#: utils/fs/file.cpp:109 +msgid "cannot close file" +msgstr "" + +#: utils/fs/file.cpp:139 utils/fs/file.cpp:168 +msgid "error reading file" +msgstr "" + +#: utils/fs/file.cpp:154 utils/fs/file.cpp:180 +msgid "error writing file" +msgstr "" + +#: utils/fs/file.cpp:189 +msgid "error flushing file" +msgstr "" + +#: utils/fs/file.cpp:198 +msgid "error seeking in file" +msgstr "" + +#: utils/fs/file.cpp:209 +msgid "error retrieving file position" +msgstr "" + +#: utils/fs/file.cpp:297 +msgid "error reading a line from file" +msgstr "" + +#: utils/fs/file.cpp:335 +msgid "error retrieving file descriptor" +msgstr "" + +#: utils/fs/temp.cpp:42 +msgid "cannot create temporary directory" +msgstr "" + +#: utils/fs/temp.cpp:89 +msgid "cannot create temporary file" +msgstr "" + +#: utils/fs/temp.cpp:142 +msgid "cannot close temporary file" +msgstr "" + +#: utils/iniparser.cpp:126 +msgid "Missing ']' on line {}" +msgstr "" + +#: utils/iniparser.cpp:129 +msgid "Empty section name on line {}" +msgstr "" + +#: utils/iniparser.cpp:137 +msgid "Text after section on line {}" +msgstr "" + +#: utils/iniparser.cpp:147 +msgid "Missing section header on line {}" +msgstr "" + +#: utils/iniparser.cpp:152 +msgid "Illegal continuation line on line {}" +msgstr "" + +#: utils/iniparser.cpp:159 +msgid "Missing option name on line {}" +msgstr "" + +#: utils/iniparser.cpp:163 +msgid "Missing '=' on line {}" +msgstr "" + +#. returns localized mesage, problem with later translation +#: utils/library.cpp:32 +msgid "Cannot load shared library \"{}\": {}" +msgstr "" + +#: utils/library.cpp:47 +msgid "Cannot obtain address of symbol \"{}\": {}" +msgstr "" + +#: utils/locker.cpp:43 +msgid "Failed to open lock file \"{}\"" +msgstr "" + +#: utils/locker.cpp:58 +msgid "Failed to obtain lock \"{}\"" +msgstr "" + +#: utils/locker.cpp:68 +msgid "Failed to close lock file \"{}\"" +msgstr "" + +#: utils/locker.cpp:71 +msgid "Failed to delete lock file \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:29 +msgid "SQL statement compilation failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:31 +msgid "Binding integer value to SQL statement failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:33 +msgid "Binding integer64 value to SQL statement failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:35 +msgid "Binding unsigned integer32 value to SQL statement failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:37 +msgid "Binding double value to SQL statement failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:39 +msgid "Binding bool value to SQL statement failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:40 +msgid "Binding text to SQL statement failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:41 +msgid "Binding blob to SQL statement failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:42 +msgid "SQL statement evaluation failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:44 +msgid "Insufficient memory or result exceed maximum SQLite3 string length" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:46 +msgid "Column \"{}\" not found" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:48 +msgid "SQL statement execution failed: \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:68 +msgid "Failed to open database \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:105 +msgid "Failed to close database \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:117 utils/sqlite3/sqlite3.cpp:143 +msgid "Failed to open backup database \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:132 +msgid "Failed to backup database \"{}\" into \"{}\"" +msgstr "" + +#: utils/sqlite3/sqlite3.cpp:158 +msgid "Failed to restored database \"{}\"" +msgstr "" diff --git a/libdnf5/repo/repo_sack.cpp b/libdnf5/repo/repo_sack.cpp index 1e9b4caa4..a0208b28e 100644 --- a/libdnf5/repo/repo_sack.cpp +++ b/libdnf5/repo/repo_sack.cpp @@ -515,7 +515,7 @@ void RepoSack::update_and_load_enabled_repos(bool load_system) { update_and_load_repos(repos); - // TODO(jmracek) Replace by call that will resolve active modules and apply modular filterring + // TODO(jmracek) Replace by call that will resolve active modules and apply modular filtering base->get_module_sack()->p_impl->module_filtering(); repos_updated_and_loaded = true; diff --git a/libdnf5/rpm/nevra.cpp b/libdnf5/rpm/nevra.cpp index aa09d88ee..da27b0adc 100644 --- a/libdnf5/rpm/nevra.cpp +++ b/libdnf5/rpm/nevra.cpp @@ -48,7 +48,7 @@ std::vector Nevra::parse(const std::string & nevra_str, const std::vector // detect whether string contains a glob range [a-z] bool start_range = false; for (end = nevra_pattern; *end != '\0'; ++end) { - // skip all characteres before glob range is closed + // skip all characters before glob range is closed if (start_range) { if (*end == ']') { start_range = false; diff --git a/libdnf5/rpm/package.cpp b/libdnf5/rpm/package.cpp index 66a9e8e8b..f6ecd2db6 100644 --- a/libdnf5/rpm/package.cpp +++ b/libdnf5/rpm/package.cpp @@ -511,4 +511,8 @@ BaseWeakPtr Package::get_base() const { return base; } +std::string Package::to_string_description() const { + return fmt::format("", to_string(), get_id().id); +} + } // namespace libdnf5::rpm diff --git a/libdnf5/rpm/package_query.cpp b/libdnf5/rpm/package_query.cpp index ce9a90df3..e9cd7ee70 100644 --- a/libdnf5/rpm/package_query.cpp +++ b/libdnf5/rpm/package_query.cpp @@ -746,7 +746,7 @@ struct NevraID { /// bool create_evr_id - when `false` it will store evr as std::string (evr_str), when `true` it sets Id evr. When string is unknown to pool it returns false /// evr is stored only as Id (create_evr_id==true, evr), or a string (evr_str) but not both. /// - /// @return bool Returns true if parsing succesful and all elements is known to pool but related to create_evr_id + /// @return bool Returns true if parsing successful and all elements is known to pool but related to create_evr_id bool parse(libdnf5::solv::RpmPool & pool, const char * nevra_pattern, bool create_evr_id); }; @@ -982,7 +982,7 @@ inline static void filter_version_internal( std::string vr(pool.split_evr(pool.get_evr(candidate_id)).v); vr.append("-0"); int cmp = pool.evrcmp_str(vr.c_str(), formatted_c_pattern, EVRCMP_COMPARE); - if (cmp_eq(cmp)) { + if (cmp_fnc(cmp)) { filter_result.add_unsafe(candidate_id); } } @@ -1050,7 +1050,7 @@ inline static void filter_release_internal( std::string vr("0-"); vr.append(pool.split_evr(pool.get_evr(candidate_id)).r); int cmp = pool.evrcmp_str(vr.c_str(), formatted_c_pattern, EVRCMP_COMPARE); - if (cmp_eq(cmp)) { + if (cmp_fnc(cmp)) { filter_result.add_unsafe(candidate_id); } } @@ -1683,7 +1683,7 @@ void PackageQuery::PQImpl::filter_reldep( selection_make_matchsolvable(*pool, &out.get_queue(), package_id, flags, libsolv_key, 0); // Queue from selection_make_matchsolvable is a selection, which means - // it conntains pairs , flags refers to how was the Id + // it contains pairs , flags refers to how was the Id // matched, that is not important here, so skip it and iterate just // over the Ids. for (int j = 1; j < out.size(); j += 2) { @@ -2633,7 +2633,7 @@ std::pair PackageQuery::resolve_pkg_spec( return {true, libdnf5::rpm::Nevra()}; } } - // Seach for file provides - more expensive + // Search for file provides - more expensive for (auto & path : binary_paths_string) { filter_dataiterator( *pool, diff --git a/libdnf5/rpm/reldep.cpp b/libdnf5/rpm/reldep.cpp index 320e9ab4e..c300cf485 100644 --- a/libdnf5/rpm/reldep.cpp +++ b/libdnf5/rpm/reldep.cpp @@ -64,6 +64,10 @@ std::string Reldep::to_string() const { return cstring ? std::string(cstring) : std::string(); } +std::string Reldep::to_string_description() const { + return fmt::format("", to_string(), get_id().id); +} + ReldepId Reldep::get_reldep_id( const BaseWeakPtr & base, const char * name, const char * version, CmpType cmp_type, int create) { static_assert( diff --git a/libdnf5/rpm/rpm_signature.cpp b/libdnf5/rpm/rpm_signature.cpp index d9373510a..cb3efa572 100644 --- a/libdnf5/rpm/rpm_signature.cpp +++ b/libdnf5/rpm/rpm_signature.cpp @@ -119,7 +119,7 @@ RpmSignature::CheckResult RpmSignature::check_package_signature(rpm::Package pkg } // rpmcliVerifySignatures is the only API rpm provides for signature verification. - // Unfortunatelly to distinguish key_missing/not_signed/verification_failed cases + // Unfortunately to distinguish key_missing/not_signed/verification_failed cases // we need to temporarily increase log level to RPMLOG_INFO, collect the log // messages and parse them. // This code is only slightly better than running `rpmkeys --checksig` tool diff --git a/libdnf5/rpm/solv/goal_private.cpp b/libdnf5/rpm/solv/goal_private.cpp index facf25cb8..78477b3f2 100644 --- a/libdnf5/rpm/solv/goal_private.cpp +++ b/libdnf5/rpm/solv/goal_private.cpp @@ -254,7 +254,7 @@ bool GoalPrivate::limit_installonly_packages(libdnf5::solv::IdQueue & job, Id ru // to `q` IdQueue those that are not marked for install and are not already // installed are added to available_unused_providers. FOR_PROVIDES(p, pp, installonly[i]) { - // TODO(jmracek) Replase the test by cached data from sack.p_impl->get_solvables() + // TODO(jmracek) Replace the test by cached data from sack.p_impl->get_solvables() if (!spool.is_package(p)) { continue; } @@ -378,7 +378,7 @@ libdnf5::GoalProblem GoalPrivate::resolve() { /* apply the excludes */ //dnf_sack_recompute_considered(sack); - // TODO make_provides_ready remove temporrary Ids for One_OF => what about to lock it? + // TODO make_provides_ready remove temporary Ids for One_OF => what about to lock it? //dnf_sack_make_provides_ready(sack); if (libsolv_transaction) { transaction_free(libsolv_transaction); @@ -388,7 +388,7 @@ libdnf5::GoalProblem GoalPrivate::resolve() { init_solver(pool, libsolv_solver); // Remove SOLVER_WEAK and add SOLVER_BEST to all transactions to allow report skipped packages and best candidates - // with broken dependenies + // with broken dependencies if (run_in_strict_mode) { for (int i = 0; i < job.size(); i += 2) { job[i] &= ~SOLVER_WEAK; @@ -715,11 +715,11 @@ transaction::TransactionItemReason GoalPrivate::get_reason(Id id) { if ((reason == SOLVER_REASON_UNIT_RULE || reason == SOLVER_REASON_RESOLVE_JOB) && (libsolv_solver.ruleclass(info) == SOLVER_RULE_JOB || libsolv_solver.ruleclass(info) == SOLVER_RULE_BEST)) { - // explicitely user-installed + // explicitly user-installed if (transaction_user_installed && transaction_user_installed->contains(id)) { return transaction::TransactionItemReason::USER; } - // explicitely group-installed + // explicitly group-installed if (transaction_group_installed && transaction_group_installed->contains(id)) { return transaction::TransactionItemReason::GROUP; } diff --git a/libdnf5/rpm/solv/goal_private.hpp b/libdnf5/rpm/solv/goal_private.hpp index 410dd87f5..760016450 100644 --- a/libdnf5/rpm/solv/goal_private.hpp +++ b/libdnf5/rpm/solv/goal_private.hpp @@ -72,7 +72,7 @@ class GoalPrivate { /// Remember group action in the transaction /// @param group Group to be added - /// @param action Action to be commited - INSTALL, REMOVE, UPGRADE + /// @param action Action to be committed - INSTALL, REMOVE, UPGRADE /// @param reason Reason for the group action - USER, DEPENDENCY /// @param package_types Types of group packages requested to be installed along with the group. Used only for INSTALL action void add_group( @@ -153,7 +153,7 @@ class GoalPrivate { void set_allow_vendor_change(bool value) { allow_vendor_change = value; } void set_install_weak_deps(bool value) { install_weak_deps = value; } /// Remove SOLVER_WEAK and add SOLVER_BEST to all jobs to allow report skipped packages and best candidates - /// with broken dependenies + /// with broken dependencies void set_run_in_strict_mode(bool value) { run_in_strict_mode = value; } // TODO(jmracek) // PackageSet listUnneeded(); @@ -189,7 +189,7 @@ class GoalPrivate { // packages potentially installed by any group in this transaction std::unique_ptr transaction_group_installed; - // packages explicitely user-installed in this transaction + // packages explicitly user-installed in this transaction std::unique_ptr transaction_user_installed; // packages that should be not included to satisfy weak dependencies diff --git a/libdnf5/rpm/transaction.cpp b/libdnf5/rpm/transaction.cpp index d8eec7f7d..485924aa8 100644 --- a/libdnf5/rpm/transaction.cpp +++ b/libdnf5/rpm/transaction.cpp @@ -142,7 +142,7 @@ std::string Transaction::get_db_cookie() const { void Transaction::fill(const base::Transaction & transaction) { transaction_items = transaction.get_transaction_packages(); - // Auxilliary map name->package with the latest versions of currently + // Auxiliary map name->package with the latest versions of currently // installed installonly packages. // Used to detect installation of a installonly package with lower version // that is currently installed. diff --git a/libdnf5/solv/reldep_parser.hpp b/libdnf5/solv/reldep_parser.hpp index 2eeba0759..fb1ca760a 100644 --- a/libdnf5/solv/reldep_parser.hpp +++ b/libdnf5/solv/reldep_parser.hpp @@ -30,10 +30,10 @@ namespace libdnf5::solv { struct ReldepParser { public: /// Parses `reldep` into three elements: name, evr, and comparison type. - /// If parsing is not succesful, the object contains garbage (tm). + /// If parsing is not successful, the object contains garbage (tm). /// /// @param reldep The reldep string to parse. - /// @return `true` if parsing was succesful. + /// @return `true` if parsing was successful. bool parse(const std::string & reldep); const std::string & get_name() const noexcept { return name; } diff --git a/libdnf5/system/state.cpp b/libdnf5/system/state.cpp index 6d1426d78..a9096f016 100644 --- a/libdnf5/system/state.cpp +++ b/libdnf5/system/state.cpp @@ -610,7 +610,7 @@ void State::reset_packages_states( this->environment_states = std::move(environment_states); // Try to save the new system state. - // dnf can be used without root priviledges or with read-only system state location. + // dnf can be used without root privileges or with read-only system state location. // In that case ignore the filesystem errors and only keep new system state in memory. try { save(); diff --git a/libdnf5/transaction/db/repo.hpp b/libdnf5/transaction/db/repo.hpp index 906d350b9..5e4b484d7 100644 --- a/libdnf5/transaction/db/repo.hpp +++ b/libdnf5/transaction/db/repo.hpp @@ -43,7 +43,7 @@ int64_t repo_insert(libdnf5::utils::SQLite3::Statement & query, const std::strin std::unique_ptr repo_select_pk_new_query(libdnf5::utils::SQLite3 & conn); -/// Find a primary key of a recod in table 'repo' that matches the Package. +/// Find a primary key of a record in table 'repo' that matches the Package. /// Return an existing primary key or 0 if the record was not found. int64_t repo_select_pk(libdnf5::utils::SQLite3::Statement & query, const std::string & repoid); diff --git a/libdnf5/transaction/db/rpm.hpp b/libdnf5/transaction/db/rpm.hpp index 98d66c24b..55051f888 100644 --- a/libdnf5/transaction/db/rpm.hpp +++ b/libdnf5/transaction/db/rpm.hpp @@ -44,7 +44,7 @@ class RpmDbUtils { static int64_t rpm_insert(libdnf5::utils::SQLite3::Statement & query, const Package & rpm); - /// Find a primary key of a recod in table 'rpm' that matches the Package. + /// Find a primary key of a record in table 'rpm' that matches the Package. /// Return an existing primary key or 0 if the record was not found. static int64_t rpm_select_pk(libdnf5::utils::SQLite3::Statement & query, const Package & rpm); diff --git a/libdnf5/utils/dnf4convert/dnf4convert.cpp b/libdnf5/utils/dnf4convert/dnf4convert.cpp index 4739d4c1b..56e761739 100644 --- a/libdnf5/utils/dnf4convert/dnf4convert.cpp +++ b/libdnf5/utils/dnf4convert/dnf4convert.cpp @@ -34,7 +34,7 @@ namespace libdnf5::dnf4convert { // each NEVRA. Only REINSTALLED (10) action is skipped because it can be ordered // after respective REINSTALL action overwriting potential repoid change. // Packages with the latest action 3 (DOWNGRADED), 5 (OBSOLETED), 7 (UPGRADED), and -// 8 (REMOVE) are eventually skiped as removed from the system. +// 8 (REMOVE) are eventually skipped as removed from the system. static constexpr const char * SQL_CURRENTLY_INSTALLED_PACKAGES = R"**( SELECT "ti"."item_id", diff --git a/libdnf5/utils/library.cpp b/libdnf5/utils/library.cpp index 90bd92807..49bfb0c4b 100644 --- a/libdnf5/utils/library.cpp +++ b/libdnf5/utils/library.cpp @@ -28,7 +28,7 @@ namespace libdnf5::utils { Library::Library(const std::string & path) : path(path) { handle = dlopen(path.c_str(), RTLD_LAZY); if (!handle) { - const char * err_msg = dlerror(); // returns localized mesage, problem with later translation + const char * err_msg = dlerror(); // returns localized message, problem with later translation throw LibraryLoadingError(M_("Cannot load shared library \"{}\": {}"), path, std::string(err_msg)); } } @@ -41,7 +41,7 @@ void * Library::get_address(const char * symbol) const { dlerror(); // Clear any existing error void * address = dlsym(handle, symbol); if (!address) { - const char * err_msg = dlerror(); // returns localized mesage, problem with later translation + const char * err_msg = dlerror(); // returns localized message, problem with later translation if (err_msg) { throw LibrarySymbolNotFoundError( M_("Cannot obtain address of symbol \"{}\": {}"), std::string(symbol), std::string(err_msg)); diff --git a/libdnf5/utils/sqlite3/sqlite3.cpp b/libdnf5/utils/sqlite3/sqlite3.cpp index 0ef2d126a..374c299a8 100644 --- a/libdnf5/utils/sqlite3/sqlite3.cpp +++ b/libdnf5/utils/sqlite3/sqlite3.cpp @@ -155,7 +155,7 @@ void SQLite3::restore(const std::string & input_file) { sqlite3_close(backup_db); if (result != SQLITE_OK) { - throw SQLite3SQLError(result, M_("Failed to restored database \"{}\""), input_file); + throw SQLite3SQLError(result, M_("Failed to restore database \"{}\""), input_file); } } diff --git a/test/data/repos-solv/solv-humongous.repo b/test/data/repos-solv/solv-humongous.repo index 604e0c9f2..dfa6884cd 100644 --- a/test/data/repos-solv/solv-humongous.repo +++ b/test/data/repos-solv/solv-humongous.repo @@ -1,6 +1,6 @@ =Ver: 3.0 -# a repo with 1000 packages for performace tests +# a repo with 1000 packages for performance tests =Pkg: pkg-a 1 1 noarch =Prv: prv-a-1-1 diff --git a/test/libdnf5/conf/test_config_parser.cpp b/test/libdnf5/conf/test_config_parser.cpp index e0730bef8..91d0fae4f 100644 --- a/test/libdnf5/conf/test_config_parser.cpp +++ b/test/libdnf5/conf/test_config_parser.cpp @@ -321,8 +321,8 @@ void ConfigParserTest::test_create_with_comments_header() { create(items_with_comments_header, with_comments_header_content, false); } -// Creates crazy (crazy custom formating) ini file. -// Uses raw texts, ini file uses custom formating. +// Creates crazy (crazy custom formatting) ini file. +// Uses raw texts, ini file uses custom formatting. void ConfigParserTest::test_create_crazy() { create(crazy_items, crazy_ini_content, true); } diff --git a/test/libdnf5/impl_ptr/test_impl_ptr.cpp b/test/libdnf5/impl_ptr/test_impl_ptr.cpp index dac0f5740..1ee24e172 100644 --- a/test/libdnf5/impl_ptr/test_impl_ptr.cpp +++ b/test/libdnf5/impl_ptr/test_impl_ptr.cpp @@ -46,7 +46,7 @@ class CTest { ~CTest() { --instance_counter; } - // Returns the nuber of existing class instances. + // Returns the number of existing class instances. static int get_instance_counter() noexcept { return instance_counter; } int get_a() const noexcept { return a; } diff --git a/test/libdnf5/rpm/test_package_query.cpp b/test/libdnf5/rpm/test_package_query.cpp index f53d4d81c..edbb2bdbe 100644 --- a/test/libdnf5/rpm/test_package_query.cpp +++ b/test/libdnf5/rpm/test_package_query.cpp @@ -501,6 +501,29 @@ void RpmPackageQueryTest::test_filter_version() { expected = {get_pkg("pkg-libs-1:1.3-4.x86_64")}; CPPUNIT_ASSERT_EQUAL(expected, to_vector(query2)); + + // packages with version < "1.3" + PackageQuery query3(base); + query3.filter_version({"1.3"}, libdnf5::sack::QueryCmp::LT); + + expected = { + get_pkg("pkg-0:1.2-3.src"), + get_pkg("pkg-0:1.2-3.x86_64"), + get_pkg("pkg-libs-0:1.2-3.x86_64"), + get_pkg("pkg-libs-1:1.2-4.x86_64")}; + CPPUNIT_ASSERT_EQUAL(expected, to_vector(query3)); + + // packages with version <= "1.3" + PackageQuery query4(base); + query4.filter_version({"1.3"}, libdnf5::sack::QueryCmp::LTE); + + expected = { + get_pkg("pkg-0:1.2-3.src"), + get_pkg("pkg-0:1.2-3.x86_64"), + get_pkg("pkg-libs-0:1.2-3.x86_64"), + get_pkg("pkg-libs-1:1.2-4.x86_64"), + get_pkg("pkg-libs-1:1.3-4.x86_64")}; + CPPUNIT_ASSERT_EQUAL(expected, to_vector(query4)); } @@ -523,6 +546,25 @@ void RpmPackageQueryTest::test_filter_release() { expected = {get_pkg("pkg-libs-1:1.2-4.x86_64"), get_pkg("pkg-libs-1:1.3-4.x86_64")}; CPPUNIT_ASSERT_EQUAL(expected, to_vector(query2)); + + // packages with release > "3" + PackageQuery query3(base); + query3.filter_release({"3"}, libdnf5::sack::QueryCmp::GT); + + expected = {get_pkg("pkg-libs-1:1.2-4.x86_64"), get_pkg("pkg-libs-1:1.3-4.x86_64")}; + CPPUNIT_ASSERT_EQUAL(expected, to_vector(query3)); + + // packages with release >= "3" + PackageQuery query4(base); + query4.filter_release({"3"}, libdnf5::sack::QueryCmp::GTE); + + expected = { + get_pkg("pkg-0:1.2-3.src"), + get_pkg("pkg-0:1.2-3.x86_64"), + get_pkg("pkg-libs-0:1.2-3.x86_64"), + get_pkg("pkg-libs-1:1.2-4.x86_64"), + get_pkg("pkg-libs-1:1.3-4.x86_64")}; + CPPUNIT_ASSERT_EQUAL(expected, to_vector(query4)); } void RpmPackageQueryTest::test_filter_priority() { diff --git a/test/libdnf5/solv/test_id_queue.cpp b/test/libdnf5/solv/test_id_queue.cpp index 8515128e9..c64de1f05 100644 --- a/test/libdnf5/solv/test_id_queue.cpp +++ b/test/libdnf5/solv/test_id_queue.cpp @@ -44,7 +44,7 @@ void IdQueueTest::test_push_back() { id_queue.push_back(3, 2); CPPUNIT_ASSERT(id_queue.size() == 3); - // insert same valule like it is in queue will result in increase of elements + // insert same value like it is in queue will result in increase of elements id_queue.push_back(3); CPPUNIT_ASSERT(id_queue.size() == 4); @@ -74,12 +74,12 @@ void IdQueueTest::test_operators() { CPPUNIT_ASSERT(id_queue_different4 != id_queue_different3); CPPUNIT_ASSERT(id_queue_different3 != id_queue_different4); - // test copy costructor + // test copy constructor auto copy = id_queue_same1; CPPUNIT_ASSERT(id_queue_same1 == copy); CPPUNIT_ASSERT(id_queue_same1.size() == 2); - // test move costructor + // test move constructor auto move = std::move(id_queue_same1); CPPUNIT_ASSERT(id_queue_same1 != move); CPPUNIT_ASSERT(id_queue_same1.size() == 0); diff --git a/test/libdnf5/transaction/test_transaction.cpp b/test/libdnf5/transaction/test_transaction.cpp index 3a9b26220..c3201f1e0 100644 --- a/test/libdnf5/transaction/test_transaction.cpp +++ b/test/libdnf5/transaction/test_transaction.cpp @@ -127,7 +127,7 @@ void TransactionTest::test_update() { (trans.*get(set_state{}))(TransactionState::ERROR); (trans.*get(finish{}))(TransactionState::OK); - // load the transction from the database + // load the transaction from the database auto base2 = new_base(); auto ts_list = base2->get_transaction_history()->list_transactions({trans.get_id()}); CPPUNIT_ASSERT_EQUAL((size_t)1, ts_list.size()); diff --git a/test/libdnf5/weak_ptr/test_weak_ptr.cpp b/test/libdnf5/weak_ptr/test_weak_ptr.cpp index 5eb587ce5..d296b389a 100644 --- a/test/libdnf5/weak_ptr/test_weak_ptr.cpp +++ b/test/libdnf5/weak_ptr/test_weak_ptr.cpp @@ -80,7 +80,7 @@ void WeakPtrTest::test_weak_ptr() { // delete sack2 sack2.reset(); - // data from sack1 must be still accesible, but access to data from sack2 must throw exception + // data from sack1 must be still accessible, but access to data from sack2 must throw exception CPPUNIT_ASSERT(*item1_weak_ptr.get() == "sack1_item1"); CPPUNIT_ASSERT(item2_weak_ptr->compare("sack1_item2") == 0); CPPUNIT_ASSERT_THROW(static_cast(*item3_weak_ptr.get() == "sack2_item1"), libdnf5::AssertionError); @@ -197,7 +197,7 @@ void WeakPtrTest::test_weak_ptr_is_owner() { // delete sack2 sack2.reset(); - // data from sack1 must be still accesible, but access to data from sack2 must throw exception + // data from sack1 must be still accessible, but access to data from sack2 must throw exception CPPUNIT_ASSERT(*item1_weak_ptr.get()->remote_data == "sack1_item1"); CPPUNIT_ASSERT(*item2_weak_ptr->remote_data == "sack1_item2"); CPPUNIT_ASSERT_THROW( diff --git a/test/python3/libdnf5/rpm/test_package_query.py b/test/python3/libdnf5/rpm/test_package_query.py index 048ef9608..d6eb2edcc 100644 --- a/test/python3/libdnf5/rpm/test_package_query.py +++ b/test/python3/libdnf5/rpm/test_package_query.py @@ -147,7 +147,7 @@ def test_pkg_query_without_setup(self): # Create a new Base object base = libdnf5.base.Base() - # Try to create a packge query without running base.setup() + # Try to create a package query without running base.setup() self.assertRaises(RuntimeError, libdnf5.rpm.PackageQuery, base) def test_pkg_get_changelogs(self): diff --git a/test/python3/libdnf5/tutorial/session/create_base.py b/test/python3/libdnf5/tutorial/session/create_base.py index 24f33ca06..e1d26009c 100644 --- a/test/python3/libdnf5/tutorial/session/create_base.py +++ b/test/python3/libdnf5/tutorial/session/create_base.py @@ -19,7 +19,7 @@ # is loaded. Function also loads configuration files from distribution and # user ("/etc/dnf/libdnf5.conf.d") drop-in directories. # Optionally set a custom value to "config_file_path" before calling this method -# to load configuration from a anoher configuration file. +# to load configuration from a another configuration file. base.load_config() # Optionally you can set and get vars diff --git a/test/python3/libdnf5/tutorial/transaction/transaction.py b/test/python3/libdnf5/tutorial/transaction/transaction.py index d06927607..5089559a3 100644 --- a/test/python3/libdnf5/tutorial/transaction/transaction.py +++ b/test/python3/libdnf5/tutorial/transaction/transaction.py @@ -7,11 +7,11 @@ # Resolve the goal, create a transaction object. # -# The argument is `allow_erasing`, a flag indicating wheter to allow removing +# The argument is `allow_erasing`, a flag indicating whether to allow removing # packages in the resolved transaction. transaction = goal.resolve() -# We can iterate over the resolved transction and inspect the packages. +# We can iterate over the resolved transaction and inspect the packages. print("Resolved transaction:") for tspkg in transaction.get_transaction_packages(): print(tspkg.get_package().get_nevra(), ": ", diff --git a/test/tutorial/session/create_base.cpp b/test/tutorial/session/create_base.cpp index 2555c811a..feb016f59 100644 --- a/test/tutorial/session/create_base.cpp +++ b/test/tutorial/session/create_base.cpp @@ -20,7 +20,7 @@ base.get_config().get_installroot_option().set(installroot); // is loaded. Function also loads configuration files from distribution and // user ("/etc/dnf/libdnf5.conf.d") drop-in directories. // Optionally set a custom value to "config_file_path" before calling this method -// to load configuration from a anoher configuration file. +// to load configuration from a another configuration file. base.load_config(); // Load vars and do other initialization (of libsolv pool, etc.) based on the diff --git a/test/tutorial/transaction/transaction.cpp b/test/tutorial/transaction/transaction.cpp index 24960c520..5f3690d5f 100644 --- a/test/tutorial/transaction/transaction.cpp +++ b/test/tutorial/transaction/transaction.cpp @@ -12,11 +12,11 @@ goal.add_rpm_install("one"); // Resolve the goal, create a transaction object. // -// The argument is `allow_erasing`, a flag indicating wheter to allow removing +// The argument is `allow_erasing`, a flag indicating whether to allow removing // packages in the resolved transaction. auto transaction = goal.resolve(); -// We can iterate over the resolved transction and inspect the packages. +// We can iterate over the resolved transaction and inspect the packages. std::cout << "Resolved transaction:" << std::endl; for (const auto & tspkg : transaction.get_transaction_packages()) { std::cout << tspkg.get_package().get_nevra() << ": " << transaction_item_action_to_string(tspkg.get_action())