package/depot-tools: fix running gclient.py

As of Buildroot commit [1] which updated
the python-httplib2 package from 0.22.0 to 0.31.0, gclient.py has
been broken due to the internal socks.py file being removed from
the httplib directory (in upstream commit [2]).

As the depot-tools package doesn't have a build step, and is only
used when generating a flutter-engine tarball, no autobuild failures
have occured.

Add a simple patch that changes `import httplib2.socks` to
`import socks` and depend on the host-python-pysocks package.

[1] 55a80f89d7
[2] 1a6ff78179

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/12188741354

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
[Julien:
 - change commit id to urls
 - add "Fixes:" link
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Adam Duskett
2025-11-04 12:30:32 +01:00
committed by Julien Olivain
parent 85de5639c1
commit d1380f5863
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
From e52f67026d7ce5b30887e1cfe486ed994169119d Mon Sep 17 00:00:00 2001
From: Adam Duskett <adam.duskett@amarulasolutions.com>
Date: Tue, 4 Nov 2025 11:58:37 +0100
Subject: [PATCH] gerrit_util.py: fix importing socks
As of commit 1a6ff781792099e9e14d7beb610bd99112b17b07,
httplib2 removed the internal copy of socksipy module.
The commit message specifically states to install pysocks.
Upstream: unsubmitted
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
gerrit_util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gerrit_util.py b/gerrit_util.py
index eef2f5749..d866bc47a 100644
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -35,7 +35,7 @@ from typing import NamedTuple, List, Optional
from typing import Tuple, TypedDict, cast
import httplib2
-import httplib2.socks
+import socks
import auth
import gclient_utils
--
2.51.1

View File

@@ -14,6 +14,7 @@ HOST_DEPOT_TOOLS_DEPENDENCIES = \
host-python3 \
host-python-httplib2 \
host-python-pyparsing \
host-python-pysocks \
host-python-six
define HOST_DEPOT_TOOLS_INSTALL_CMDS