Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dnfdaemon
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
manatools
dnfdaemon
Commits
340ffa05
Commit
340ffa05
authored
May 5, 2015
by
Tim Lauridsen
Browse files
Options
Downloads
Patches
Plain Diff
fix: make fetching of available updates better
Make repo priority and other excluding work. (Rhbug: 1217155)
parent
4ecccdd4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dnfdaemon/server/backend.py
+17
-1
17 additions, 1 deletion
python/dnfdaemon/server/backend.py
with
17 additions
and
1 deletion
python/dnfdaemon/server/backend.py
+
17
−
1
View file @
340ffa05
...
...
@@ -145,7 +145,23 @@ class Packages:
@property
def
updates
(
self
):
"""
Get available updates.
"""
return
self
.
query
.
upgrades
().
latest
().
run
()
pkgs
=
[]
try
:
# we have to do upgrade_all & resolve
# to make sure pkgs exclude by repo priority etc
# get handled.
self
.
_base
.
upgrade_all
()
self
.
_base
.
resolve
(
allow_erasing
=
True
)
except
dnf
.
exceptions
.
DepsolveError
as
e
:
self
.
logger
.
debug
(
str
(
e
))
return
pkgs
# return install/upgrade type pkgs from transaction
for
tsi
in
self
.
_base
.
transaction
:
#print(tsi.op_type, tsi.installed, tsi.erased, tsi.obsoleted)
if
tsi
.
op_type
==
dnf
.
transaction
.
UPGRADE
or
\
tsi
.
op_type
==
dnf
.
transaction
.
INSTALL
:
pkgs
.
append
(
tsi
.
installed
)
return
pkgs
@property
def
all
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment