Skip to content

Commit

Permalink
versionlock: Remove "version" from filtering keys
Browse files Browse the repository at this point in the history
The functionality is covered by "evr" filter and this way we can avoid
confusion about packages with the same versions, but different epochs.
  • Loading branch information
m-blaha committed Jan 9, 2024
1 parent fb2219e commit c14e9fd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions libdnf5/rpm/package_sack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ void PackageSack::Impl::load_versionlock_excludes() {
std::vector<long unsigned int>{std::stoul(vl_condition.get_value())},
vl_condition.get_comparator());
break;
case VersionlockCondition::Keys::VERSION:
pkg_query.filter_version({vl_condition.get_value()}, vl_condition.get_comparator());
break;
case VersionlockCondition::Keys::EVR:
pkg_query.filter_evr({vl_condition.get_value()}, vl_condition.get_comparator());
break;
Expand Down
2 changes: 0 additions & 2 deletions libdnf5/rpm/versionlock_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ VersionlockCondition::VersionlockCondition(
// check that condition key is present and valid
if (key_str == "epoch") {
key = Keys::EPOCH;
} else if (key_str == "version") {
key = Keys::VERSION;
} else if (key_str == "evr") {
key = Keys::EVR;
} else if (key_str == "arch") {
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/rpm/versionlock_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace libdnf5::rpm {

class VersionlockCondition {
public:
enum class Keys { EPOCH, VERSION, EVR, ARCH };
enum class Keys { EPOCH, EVR, ARCH };

VersionlockCondition(const std::string & key_str, const std::string & comparator_str, const std::string & value);

Expand Down

0 comments on commit c14e9fd

Please sign in to comment.