Skip to content
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

Rpmcallback inst start stop #5

Open
wants to merge 2 commits into
base: transaction-item
Choose a base branch
from

Conversation

dmach
Copy link

@dmach dmach commented Jun 5, 2019

No description provided.

@@ -1005,7 +1006,7 @@ def _run_transaction(self, cb):
else:
if self._record_history():
herrors = [ucd(x) for x in errors]
self.history.end(rpmdbv, 2, errors=herrors)
self.history.end(rpmdbv)
Copy link
Owner

@j-mracek j-mracek Jun 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe here is a problem. First I would like to move self.history.end(rpmdbv) few lines bellow. Also I believe that in this case it is normal that some elements were not done.

        else:
            logger.critical(_("Transaction couldn't start:"))
            for e in errors:
                logger.critical(ucd(e[0]))  # should this be 'to_unicoded'?

            if self._record_history() and not self._ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST):
                self.history.end(rpmdbv)
            msg = _("Could not run transaction.")
            raise dnf.exceptions.Error(msg)

@@ -995,6 +995,7 @@ def _run_transaction(self, cb):

errstring = _('Errors occurred during transaction.')
logger.debug(errstring)
self.history.end(rpmdbv)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It results that the transaction will ends twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants