checkdeps.py broken #1316

Open
opened 2018-07-19 09:27:38 +02:00 by PeterSurda · 11 comments
PeterSurda commented 2018-07-19 09:27:38 +02:00 (Migrated from github.com)
Traceback (most recent call last):
  File "checkdeps.py", line 142, in <module>
    if x in EXTRAS_REQUIRE_DEPS
KeyError: None
``` Traceback (most recent call last): File "checkdeps.py", line 142, in <module> if x in EXTRAS_REQUIRE_DEPS KeyError: None ```
PeterSurda commented 2018-07-22 13:18:39 +02:00 (Migrated from github.com)

At least on Debian it's still broken after e1d2ead701, haven't tested others.

At least on Debian it's still broken after e1d2ead7019f30330a9999e49411a609839b6e41, haven't tested others.
g1itch commented 2018-07-22 13:19:49 +02:00 (Migrated from github.com)

Sad

Sad
PeterSurda commented 2018-07-22 13:28:41 +02:00 (Migrated from github.com)

What OS did you test it on?

What OS did you test it on?
PeterSurda commented 2018-07-22 13:30:22 +02:00 (Migrated from github.com)

It probably works now with Ubuntu for example, but on Debian this is in the os-releases:

NAME="Debian GNU/Linux"

and it looks like that's parsed incorrectly, maybe it should be added to the OS_RELEASE dict.

It probably works now with Ubuntu for example, but on Debian this is in the os-releases: NAME="Debian GNU/Linux" and it looks like that's parsed incorrectly, maybe it should be added to the OS_RELEASE dict.
g1itch commented 2018-07-22 13:30:34 +02:00 (Migrated from github.com)

@PeterSurda Gentoo/Calculate, Ubuntu:Xenial and Ubuntu:Trusy - on Travis CI.

@PeterSurda Gentoo/Calculate, Ubuntu:Xenial and Ubuntu:Trusy - on Travis CI.
g1itch commented 2018-07-22 13:30:50 +02:00 (Migrated from github.com)

wow

wow
g1itch commented 2018-07-22 13:55:21 +02:00 (Migrated from github.com)

I really forgot Debian, excuse me please.
Possible further changes:

diff --git a/checkdeps.py b/checkdeps.py
index f261c924..4115c5a8 100755
--- a/checkdeps.py
+++ b/checkdeps.py
@@ -136,6 +136,8 @@ if prereqs:
 OPSYS = detectOS()
 CMD = PACKAGE_MANAGER[OPSYS] if OPSYS in PACKAGE_MANAGER else 'UNKNOWN_INSTALLER'
 for lhs, rhs in EXTRAS_REQUIRE.items():
+    if OPSYS is None:
+        break
     if rhs and any([
         EXTRAS_REQUIRE_DEPS[x][OPSYS]
         for x in rhs
diff --git a/src/depends.py b/src/depends.py
index 39f5e759..d284a11b 100755
--- a/src/depends.py
+++ b/src/depends.py
@@ -29,6 +29,7 @@ logger.addHandler(handler)
 logger.setLevel(logging.ERROR)
 
 OS_RELEASE = {
+    "Debian GNU/Linux".lower(): "Debian",
     "fedora": "Fedora",
     "opensuse": "openSUSE",
     "ubuntu": "Ubuntu",

Maybe it was my mistake to agree with creation of OS_RELEASE dict.

I really forgot Debian, excuse me please. Possible further changes: ```patch diff --git a/checkdeps.py b/checkdeps.py index f261c924..4115c5a8 100755 --- a/checkdeps.py +++ b/checkdeps.py @@ -136,6 +136,8 @@ if prereqs: OPSYS = detectOS() CMD = PACKAGE_MANAGER[OPSYS] if OPSYS in PACKAGE_MANAGER else 'UNKNOWN_INSTALLER' for lhs, rhs in EXTRAS_REQUIRE.items(): + if OPSYS is None: + break if rhs and any([ EXTRAS_REQUIRE_DEPS[x][OPSYS] for x in rhs diff --git a/src/depends.py b/src/depends.py index 39f5e759..d284a11b 100755 --- a/src/depends.py +++ b/src/depends.py @@ -29,6 +29,7 @@ logger.addHandler(handler) logger.setLevel(logging.ERROR) OS_RELEASE = { + "Debian GNU/Linux".lower(): "Debian", "fedora": "Fedora", "opensuse": "openSUSE", "ubuntu": "Ubuntu", ``` Maybe it was my mistake to agree with creation of OS_RELEASE dict.
g1itch commented 2019-07-10 17:10:56 +02:00 (Migrated from github.com)

Is this still actual?

Is this still actual?
PeterSurda commented 2019-07-10 17:17:31 +02:00 (Migrated from github.com)

It still has at least one bug (after doing the checks, it doesn't always print "run apt-get blablblah", but I think that's a separate one.

It still has at least one bug (after doing the checks, it doesn't always print "run apt-get blablblah", but I think that's a separate one.
g1itch commented 2019-07-10 17:20:39 +02:00 (Migrated from github.com)

Perhaps it needs a separate test suit.

Perhaps it needs a separate test suit.
dimyme commented 2019-11-10 15:49:53 +01:00 (Migrated from github.com)

checkdeps does not catch all cases and is worded quite terribly with lots of nonsensical ` ] . and such garbage. will do a PR soon. 😭 🏞️ 🇳🇦

checkdeps does not catch all cases and is worded quite terribly with lots of nonsensical **` ] .** and such garbage. will do a PR soon. :sob: :national_park: :namibia:
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-08-21#1316
No description provided.