Commit be92740
committed
BadPackageUpdate: fix when not run inside profiles/ dir
When we weren't inside profiles/ dir, we were running the VisibilityCheck
check. This check was collecting repo.config.updates. This one is cached,
resulting in the value not being recomputed when time comes for
PackageUpdatesCheck to run. This commit fixes this by making sure we
invalidate the cache.
Sadly the object we're using to store config is Immutable, resulting in
a very ugly hack to invalidate the cache, by using the __dict__ attribute
of the object. This is not a good practice, but it works.
Reported-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>1 parent 0abdd45 commit be92740
4 files changed
Lines changed: 4 additions & 0 deletions
File tree
- src/pkgcheck/checks
- testdata
- data/repos/visibility/PackageUpdatesCheck
- BadPackageUpdate
- OldPackageUpdate
- repos/visibility/profiles/updates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
0 commit comments