Dnf5/feature/config#918
Conversation
0c420ca to
bfddb71
Compare
Conan-Kudo
left a comment
There was a problem hiding this comment.
Generally looks like a good start, but there are a few things I feel should be addressed...
| OptionStringList & protected_packages(); | ||
| OptionString & username(); | ||
| OptionString & password(); | ||
| OptionBool & gpgcheck(); |
There was a problem hiding this comment.
Can we go ahead and lay the groundwork here for the GPG check refactor? (As noted in RhBug:1433592#c7). This is the perfect time to do so.
There was a problem hiding this comment.
@Conan-Kudo Am I correct that this is a request to drop RHEL7, RHEL8 compatibility in favour of Zypper behaviour?
There was a problem hiding this comment.
Somewhat. The gpgcheck_policy option would control whether we behave as YUM does or as Zypper does for gpgcheck. In general, I think the correct default is to behave like Zypper here, but I'm okay with making the default the same as YUM, as long as we can tune this.
| OptionPath & destdir(); | ||
| OptionString & comment(); | ||
| OptionBool & downloadonly(); | ||
| OptionBool & ignorearch(); |
There was a problem hiding this comment.
Let's go ahead and add the sticky vendor options that are part of #907.
There was a problem hiding this comment.
We have to first finish review of #907.
We would like to develop dnf5 into state of libdnf master, then we will backport all additional patches from dnf-4
| constexpr const char * PERSISTDIR = "/var/lib/dnf"; | ||
| constexpr const char * SYSTEM_CACHEDIR = "/var/cache/dnf"; | ||
|
|
||
| constexpr const char * CONF_FILENAME = "/etc/dnf/dnf.conf"; |
There was a problem hiding this comment.
Where is the /etc/dnf/conf.d setup?
There was a problem hiding this comment.
Thanks for comments. I wrote notes. The code is under development. I'm trying to reuse old code and adopt it to libdnf5.
There was a problem hiding this comment.
That's what's in the dnf PR: rpm-software-management/dnf#1414
36efaec to
deb378e
Compare
| virtual const char * get_domain_name() const noexcept { return "libdnf"; } | ||
| virtual const char * get_name() const noexcept { return "Exception"; } | ||
| virtual const char * get_description() const noexcept { return ""; } | ||
| }; |
There was a problem hiding this comment.
Shell we extend all errors by error code value?
There was a problem hiding this comment.
Example:
An Exception with error code bad_value can be replaced by inherited specialized exception BadValue.
I thought about adding error code for easy transform to other languages eg C. The same approach as get_name() -> Each exception class will have unique id (error code). But how create well defined unique id? The string get_domain_name() + get_name() is unique to each exception now.
Note:
There is error_code in my SystemError exception class. Because system error codes are defined and I think that is no need to create specialized exception for each system error code.
I have some concept but it can be modified.
608f883 to
86e93f6
Compare
void swap_logger(std::unique_ptr<Logger> & logger, size_t index); Swaps the logger at the "index" position with another "logger". It is used, for example, to replace a temporary (memory buffer) logger with a final one.
Formatting library for C++. Safe printf implementation including the POSIX extension for positional arguments and implementation of C++20 std::format. Idea: If we only use C++20 style (std::format) in libdnf then the fmt library will only be needed for compilers without C++20 support.
Abstract class. Base class for all configuration options type.
Uses a new exception hierarchy, snake_case, ...
The type of option is taken from linked option during compile type. It uses topical default value and parameters from linked option during runtime.
OptionBool, OptionNumber, OptionString
OptionEnum, OptionStringList
OptionEnum, OptionStringList
option that represents a time duration
Support for text translation
Type safe printf() replacement
error: conversion from ‘long unsigned int’ to ‘int’ may change value [-Werror=conversion] 1017 | detail::FormatListN<sizeof...(Args)> makeFormatList(const Args&... args)
We don't want to depend on GLib, but librepo and libmodulemd use it in API.
WeakPtr is a "smart" pointer. It contains a pointer to resource and to guard of resource. WeakPtr pointer can be owner of the resource. However, the resource itself may depend on another resource. WeakPtr registers/unregisters itself at the guard of resource. And the resource guard invalidates the registered WeakPtrs when the resource is unusable (eg. its dependecny was released).
Only example will be updated.
86e93f6 to
ea44f15
Compare
|
☔ The latest upstream changes (presumably 188cdbc) made this pull request unmergeable. Please resolve the merge conflicts. |
No description provided.