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

Smart rejects upgrade specific package #10

Open
niamster opened this issue Mar 14, 2017 · 4 comments
Open

Smart rejects upgrade specific package #10

niamster opened this issue Mar 14, 2017 · 4 comments

Comments

@niamster
Copy link

# smart query packagegroup-apps
...
packagegroup-apps-1.0-r1.24.4@all
packagegroup-apps-1.0-r1.35.6.0@all
# smart query packagegroup-apps --installed
...
packagegroup-apps-1.0-r1.24.4@all
# smart upgrade
...
No interesting upgrades available.

The problem is that smart is rejecting the changeset by weight.
For a given changeset the calculated weight is 1.99, while empty changeset has weight 0.

Changeset

{packagegroup-apps-1.0-r1.35.6.0@all: INSTALL, kb-events-1.0-r2.4@cortexa7hf_neon_vfpv4: INSTALL, python3-msgpack-0.4.7-r0@cortexa7hf_neon_vfpv4: INSTALL, logrotate-3.9.1-r0.1@cortexa7hf_neon_vfpv4: INSTALL, hfsprogs-332.25-r0.0@cortexa7hf_neon_vfpv4: INSTALL, python-flask-0.10.1-r0@cortexa7hf_neon_vfpv4: INSTALL, python-fasteners-0.14.1-r0.0@cortexa7hf_neon_vfpv4: INSTALL, logrotate-cfg-1.0-r4@cortexa7hf_neon_vfpv4: INSTALL, python-markupsafe-0.23-r0@cortexa7hf_neon_vfpv4: INSTALL, python-gevent-1.2.1-r0.0@cortexa7hf_neon_vfpv4: INSTALL, python-werkzeug-0.11.5-r0@cortexa7hf_neon_vfpv4: INSTALL, python-itsdangerous-0.24-r0@cortexa7hf_neon_vfpv4: INSTALL, uwsgi-2.0.14-r1.0@cortexa7hf_neon_vfpv4: INSTALL, python-chacha-1+git81ee4df1020e64a93abe5fbea6b9c9dd8dc3e934-0.0@cortexa7hf_neon_vfpv4: INSTALL, python-greenlet-0.4.12-r0.0@cortexa7hf_neon_vfpv4: INSTALL, glibc-binary-localedata-en-us-2.23-r0@cortexa7hf_neon_vfpv4: INSTALL, python-pycparser-2.14-r0@cortexa7hf_neon_vfpv4: INSTALL, python-monotonic-1.0-r0@cortexa7hf_neon_vfpv4: INSTALL, python-jinja2-2.8-r0@cortexa7hf_neon_vfpv4: INSTALL, python-six-1.10.0-r0@cortexa7hf_neon_vfpv4: INSTALL, led-blink-ext-1.0-r3@cortexa7hf_neon_vfpv4: INSTALL, vlog-fix-1.0-r3@cortexa7hf_neon_vfpv4: INSTALL, share-1.0+gitrzzz-r6.2@cortexa7hf_neon_vfpv4: INSTALL, lastlog-kpanic-1.0-r3@cortexa7hf_neon_vfpv4: INSTALL, python3-pyzmq-16.0.2-r0@cortexa7hf_neon_vfpv4: INSTALL, libexpat1-2.1.0-r0@cortexa7hf_neon_vfpv4: INSTALL, libbsd0-0.8.2-r0@cortexa7hf_neon_vfpv4: INSTALL, nginx-1.8.1-r1.0@cortexa7hf_neon_vfpv4: INSTALL, root-env-cfg-1.0-r1@cortexa7hf_neon_vfpv4: INSTALL, monit-5.20.0-r3.0@cortexa7hf_neon_vfpv4: INSTALL, python-natsort-5.0.2-r0.0@cortexa7hf_neon_vfpv4: INSTALL, zip-3.0-r2@cortexa7hf_neon_vfpv4: INSTALL, python-cffi-1.5.2-r0@cortexa7hf_neon_vfpv4: INSTALL, locale-base-en-us-2.23-r0@cortexa7hf_neon_vfpv4: INSTALL, packagegroup-apps-1.0-r1.24.4@all: REMOVE}

The fix below did the trick but I'm not 100% confident it's the most correct way to fix the issue:

diff --git a/smart/transaction.py b/smart/transaction.py
index 4b90cb7..d7d8526 100644
--- a/smart/transaction.py
+++ b/smart/transaction.py
@@ -1014,7 +1014,7 @@ class Transaction(object):
             else:
                 lockedstate[pkg] = lk
                 csweight = getweight(cs)
-                if csweight < weight:
+                if csweight < weight or len(changeset) == 0:
                     weight = csweight
                     changeset.setState(cs)
@lucagiove
Copy link

The two version of the package were available in the channels?
Might be related to this: #11

@niamster
Copy link
Author

@lucagiove no, there was only one version in the channel.

@lucagiove
Copy link

Ok, so it seems a different issue to #11
I guess epoch was the same on both version of the packages.

@niamster
Copy link
Author

Yes, the epoch was the same.

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

No branches or pull requests

2 participants