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

Darstellung von Paketversion falsch mit Paketen für die < gilt - Beispiel paho-mqtt #656

Closed
bmxp opened this issue Jun 22, 2024 · 6 comments
Assignees

Comments

@bmxp
Copy link
Member

bmxp commented Jun 22, 2024

In requirements/conf_all.txt findet sich

# SmartHomeNG-module 'mqtt'
paho-mqtt>=1.2.2,<2.0.0

# SmartHomeNG-lib
psutil>=5.9.8,<6.0.0

image

Als maximale Version sollte bei paho-mqtt nicht 2.0.0 in grün angezeigt werden, ebenso für psutil was explizit als Anforderung < 6.0.0 hat.

@bmxp bmxp added the bug label Jun 22, 2024
@Morg42
Copy link
Member

Morg42 commented Jun 27, 2024

lib/shpypi.py, Zeile 1009 ff:

        for req in reqs:
            operator, version = self._split_operator(req)
            if operator in ['>=', '==', '>']:
                result['min'] = version
            if operator in ['<', '<=', '==']:
                result['max'] = version

Auch bei Operatoren ">" und "<" werden die angegebenen Werte als min/max gesichert.

Ich kenne das System nicht gut genug, um zu wissen, wie man das am besten umgeht - bei version < 4.2.0 dann 4.1.999 als max setzen? Ansonsten bräuchte man neben min/max noch jeweils ein zusätzliches Feld "below"/"above" oder so.

(Schonmal als Hinweis, wo man suchen muss - bzw. jetzt nur noch lösen ;) )

@Morg42
Copy link
Member

Morg42 commented Aug 3, 2024

@bmxp bei dir funktionierte das? dann würde ich hier zu machen...

@bmxp
Copy link
Member Author

bmxp commented Jan 27, 2025

Funktioniert besser aber nicht ganz:

Image

psutil>=5.9.8,<6.0.0

maximale Version ist angegeben mit 6.0.0.1 in grün. Das ist nicht korrekt aber ich weiß nicht ob das aktuell überhaupt zu lösen ist.

@Morg42
Copy link
Member

Morg42 commented Jan 27, 2025

Die Berechnung der min/max-Versionen geht jetzt auch bei < und > korrekt. Allerdings kennt er irgendwo noch < und > nicht im Test für die Anzeige, das mache ich später.

@Morg42 Morg42 reopened this Jan 27, 2025
@Morg42
Copy link
Member

Morg42 commented Jan 27, 2025

Geht jetzt. Braucht nach dem Start nur eine Weile, und wenn man zu früh "nachsieht", einen reload.

@Morg42 Morg42 closed this as completed Jan 27, 2025
@bmxp
Copy link
Member Author

bmxp commented Jan 28, 2025

Jup, geht jetzt. Sieht zwar nicht schön aus mit den ganzen .999.999.999 aber es geht.

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

No branches or pull requests

3 participants