Skip to content

Commit a787acb

Browse files
xmlqiuzhiqian
authored andcommitted
fix: The component field can be empty
Task: https://pms.uniontech.com/task-view-385551.html
1 parent 3d7da21 commit a787acb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/lastore-upgrade-query/upgrade_query.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ bool UpgradePackage::Valid() const {
2626
CandidateVersion.empty() ||
2727
Architecture.empty() ||
2828
Codename.empty() ||
29-
Component.empty() ||
3029
Site.empty() ||
3130
Filename.empty() ||
3231
Hash.empty()) {
@@ -131,7 +130,7 @@ std::vector<UpgradePackage> GetUpgradePackages(const std::string &sourcelist, co
131130
for (pkgCache::PkgIterator pkg = Cache->PkgBegin(); !pkg.end(); ++pkg) {
132131
const pkgDepCache::StateCache& state = (*Cache)[pkg];
133132

134-
if (state.NewInstall() || state.Upgrade()) {
133+
if (state.NewInstall() || state.Upgrade() || state.Downgrade()) {
135134
result.emplace_back(GetUpgradePackage(Cache, Recs, pkg));
136135
}
137136
}

0 commit comments

Comments
 (0)