Skip to content

Commit

Permalink
versionlock: Ignore versionlock excludes in commands
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha committed Feb 7, 2024
1 parent f969a17 commit d828aaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dnf5/commands/versionlock/versionlock_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void VersionlockAddCommand::run() {
const libdnf5::ResolveSpecSettings settings{
.with_nevra = true, .with_provides = false, .with_filenames = false, .with_binaries = false};
for (const auto & spec : pkg_specs) {
libdnf5::rpm::PackageQuery query(ctx.base);
libdnf5::rpm::PackageQuery query(ctx.base, libdnf5::sack::ExcludeFlags::IGNORE_VERSIONLOCK);
query.resolve_pkg_spec(spec, settings, false);
if (query.empty()) {
std::cerr << libdnf5::utils::sformat(_("No package found for \"{}\"."), spec) << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion dnf5/commands/versionlock/versionlock_exclude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void VersionlockExcludeCommand::run() {
const libdnf5::ResolveSpecSettings settings{
.with_nevra = true, .with_provides = false, .with_filenames = false, .with_binaries = false};
for (const auto & spec : pkg_specs) {
libdnf5::rpm::PackageQuery query(ctx.base);
libdnf5::rpm::PackageQuery query(ctx.base, libdnf5::sack::ExcludeFlags::IGNORE_VERSIONLOCK);
query.resolve_pkg_spec(spec, settings, false);
if (query.empty()) {
std::cerr << libdnf5::utils::sformat(_("No package found for \"{}\"."), spec) << std::endl;
Expand Down

0 comments on commit d828aaf

Please sign in to comment.