New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[history] Populate history operations via goal rather than directly. #1186
[history] Populate history operations via goal rather than directly. #1186
Conversation
@rh-atomic-bot try |
When transaction is populated directly, running scriptlets ends up with errors: RuntimeError: TransactionItem not found for key: <rpm-name> Using populating transaction via goal and Base._goal2transaction() fixes the problem. Resolves: rhbz#1625259 Closes: #1186 Approved by: <try>
💔 Test failed - status-papr |
4f9f8a6
to
2087d5d
Compare
@rh-atomic-bot retry |
2087d5d
to
3481393
Compare
dnf/base.py
Outdated
|
||
self.history.rpm.new(pkg, action, ti.reason) | ||
# try to use package from the original repo first | ||
q = self.sack.query().available().filter(nevra_strict=str(ti), reponame=ti.from_repo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Flake8]
[E501] line too long (101 > 100 characters)
69ff7a9
to
316460b
Compare
Flake8 detected 22 issues on 316460b |
316460b
to
346871a
Compare
dnf/base.py
Outdated
|
||
self.history.rpm.new(pkg, action, ti.reason) | ||
# try to use package from the original repo first | ||
q = self.sack.query().available().filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please ramove ".available()". It is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q = self.sack.query().filterm(nevra_strict=str(ti))
346871a
to
87fd648
Compare
Failing tests: |
@rh-atomic-bot retry |
@rh-atomic-bot try |
When transaction is populated directly, running scriptlets ends up with errors: RuntimeError: TransactionItem not found for key: <rpm-name> Using populating transaction via goal and Base._goal2transaction() fixes the problem. Resolves: rhbz#1625259 Closes: #1186 Approved by: <try>
💔 Test failed - status-papr |
dnf/base.py
Outdated
|
||
self.history.rpm.new(pkg, action, ti.reason) | ||
# try to use package from the original repo first | ||
q = self.sack.query().available().filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q = self.sack.query().filterm(nevra_strict=str(ti))
dnf/cli/cli.py
Outdated
@@ -617,7 +617,7 @@ def history_rollback_transaction(self, extcmd): | |||
# operations += history.transaction_nevra_ops(id_) | |||
|
|||
try: | |||
self._history_undo_operations(mobj, old.tid + 1, True) | |||
self._history_undo_operations(mobj, old.tid + 1, True, strict=self.base.conf.strict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace "strict=self.base.conf.strict" by "strict=self.conf.strict"
dnf/cli/cli.py
Outdated
self._history_undo_operations( | ||
mobj, | ||
old.tid) | ||
self._history_undo_operations(mobj, old.tid, strict=self.base.conf.strict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace "strict=self.base.conf.strict" by "strict=self.conf.strict"
When transaction is populated directly, running scriptlets ends up with errors: RuntimeError: TransactionItem not found for key: <rpm-name> Using populating transaction via goal and Base._goal2transaction() fixes the problem. Resolves: rhbz#1625259
87fd648
to
199d788
Compare
@rh-atomic-bot retry |
@rh-atomic-bot try |
When transaction is populated directly, running scriptlets ends up with errors: RuntimeError: TransactionItem not found for key: <rpm-name> Using populating transaction via goal and Base._goal2transaction() fixes the problem. Resolves: rhbz#1625259 Closes: #1186 Approved by: <try>
Failed test(s): history-1-dnf-2 history-1-dnf-3 |
💥 Test timed out |
Depends on rpm-software-management/libdnf#579 |
@rh-atomic-bot try |
@rh-atomic-bot retry |
When transaction is populated directly, running scriptlets ends up with errors: RuntimeError: TransactionItem not found for key: <rpm-name> Using populating transaction via goal and Base._goal2transaction() fixes the problem. Resolves: rhbz#1625259 Closes: #1186 Approved by: <try>
💔 Test failed - status-papr |
All tests passed |
The code looks good |
When transaction is populated directly, running scriptlets ends up
with errors: RuntimeError: TransactionItem not found for key:
Using populating transaction via goal and Base._goal2transaction()
fixes the problem.
Resolves: rhbz#1625259