Commit a3dd17f 1 parent f9dd8a5 commit a3dd17f Copy full SHA for a3dd17f
File tree 2 files changed +6
-15
lines changed
2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -24,23 +24,12 @@ namespace libdnf {
24
24
25
25
bool isAdvisoryApplicable (libdnf::Advisory & advisory, DnfSack * sack)
26
26
{
27
- auto moduleContainer = dnf_sack_get_module_container (sack);
28
- if (!moduleContainer) {
29
- return true ;
30
- }
31
- auto moduleAdvisories = advisory.getModules ();
32
- if (moduleAdvisories.empty ()) {
33
- return true ;
34
- }
35
- for (auto & moduleAdvisory: moduleAdvisories) {
36
- if (const char * name = moduleAdvisory.getName ()) {
37
- if (const char * stream = moduleAdvisory.getStream ()) {
38
- if (moduleContainer->isEnabled (name, stream)) {
39
- return true ;
40
- }
41
- }
27
+ for (auto & advisoryModule: advisory.getModules ()) {
28
+ if (advisoryModule.isApplicable ()) {
29
+ return true ;
42
30
}
43
31
}
32
+
44
33
return false ;
45
34
}
46
35
Original file line number Diff line number Diff line change 8
8
#define REPOID_CHARS ASCII_LETTERS DIGITS " -_.:"
9
9
10
10
#include " libdnf/sack/advisory.hpp"
11
+ #include " libdnf/dnf-utils.h"
11
12
12
13
#include < functional>
13
14
#include < string>
@@ -36,6 +37,7 @@ class Finalizer {
36
37
std::function<void ()> func;
37
38
};
38
39
40
+ DEPRECATED (" advisory now provides getApplicablePackages and each AdvisoryModule provides isApplicable." )
39
41
bool isAdvisoryApplicable (Advisory & advisory, DnfSack * sack);
40
42
41
43
namespace string {
You can’t perform that action at this time.
0 commit comments