GNU bug report logs - #66173
Package unknown-horizons fails during build process

Previous Next

Package: guix;

Reported by: Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>

Date: Sun, 24 Sep 2023 02:37:02 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66173 in the body.
You can then email your comments to 66173 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#66173; Package guix. (Sun, 24 Sep 2023 02:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 24 Sep 2023 02:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: [BUG] Package unknown-horizons fails during build process
Date: Sun, 24 Sep 2023 02:35:39 +0000
The last 120 lines of the build log (i.e.
=/var/log/guix/drvs/d7/hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv.gz=)
are shown in the second code block below.

The complete build log can be downloaded at http://0x0.st/HVoh.drv.gz
[[https://web.archive.org/web/20230924023306/http://0x0.st/HVoh.drv.gz][(archive
link)]]

#+BEGIN_EXAMPLE
$ guix package -i unknown-horizons
The following package will be installed:
   unknown-horizons 2019.1

The following derivation will be built:
  /gnu/store/d7hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv

building /gnu/store/d7hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv...
100% 'check'
builder for `/gnu/store/d7hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv'
failed with exit code 1
build of /gnu/store/d7hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv
failed
View build log at
'/var/log/guix/drvs/d7/hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv.gz'.
guix package: error: build of
`/gnu/store/d7hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv'
failed
$ echo $?
1
#+END_EXAMPLE

#+BEGIN_SRC sh
zcat /var/log/guix/drvs/d7/hlb25qf9wirgdl4w80snbadsm8fgkq-unknown-horizons-2019.1.drv.gz
| tail -n 120
#+END_SRC

#+RESULTS:
#+begin_example
tests/unittests/test_timer.py .............                              [ 70%]
tests/unittests/gui/test_window_manager.py .....                         [ 72%]
tests/unittests/misc/test_paths.py ..                                    [ 73%]
tests/unittests/mp/test_run_server.py ss                                 [ 73%]
tests/unittests/mp/test_server_statistics.py ..                          [ 74%]
tests/unittests/util/test_check_updates.py ..................            [ 79%]
tests/unittests/util/test_color.py ....                                  [ 80%]
tests/unittests/util/test_platform.py ..                                 [ 81%]
tests/unittests/util/test_registry.py ..                                 [ 82%]
tests/unittests/util/test_shapes.py ...                                  [ 83%]
tests/unittests/util/test_tile_orientation.py ..........                 [ 86%]
tests/unittests/util/test_yamlcachestorage.py .                          [ 86%]
tests/unittests/world/test_component.py .                                [ 86%]
tests/unittests/world/test_ingametype_classes.py ...                     [ 87%]
tests/unittests/world/test_storage.py ..............                     [ 91%]
tests/unittests/world/test_world.py .                                    [ 92%]
tests/unittests/world/buildability/test_connectedareacache.py .          [ 92%]
tests/unittests/world/buildability/test_partialbinarycache.py .....      [ 93%]
tests/unittests/world/component/test_healthcomponent.py .....            [ 95%]
tests/unittests/world/component/test_namedcomponent.py ......            [ 97%]
tests/unittests/world/component/test_tradepostcomponent.py ..            [ 97%]
tests/unittests/world/production/test_productionline.py ...              [ 98%]
tests/unittests/world/units/collectors/test_collector.py ....            [100%]

=================================== FAILURES ===================================
____________________________ test_savegame_upgrade _____________________________

args = ()

    def wrapped(*args):
    if not manual_session and not use_fixture:
    s, p = new_session(mapgen=mapgen, human_player=human_player,
ai_players=ai_players)
    elif use_fixture:
    path = os.path.join(TEST_FIXTURES_DIR, use_fixture + '.sqlite')
    if not os.path.exists(path):
    raise Exception('Savegame {} not found'.format(path))
    s = load_session(path)

    timelimit = Timer(handler)
    timelimit.start(timeout)

    try:
    if use_fixture:
    return func(s, *args)
    elif not manual_session:
    return func(s, p, *args)
    else:
>    return func(*args)

tests/game/__init__.py:243:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/game/test_load_save.py:215: in test_savegame_upgrade
    session.run(seconds=30)
tests/game/__init__.py:140: in run
    Scheduler().tick(Scheduler().cur_tick + 1)
horizons/scheduler.py:95: in tick
    callback.callback()
horizons/util/python/callback.py:48: in __call__
    return self.callback(*self.args, **self.kwargs)
horizons/ai/pirate.py:99: in tick
    self.combat_manager.tick()
horizons/ai/aiplayer/combat/combatmanager.py:343: in tick
    self.lookout()
horizons/ai/aiplayer/combat/combatmanager.py:334: in lookout
    self.handle_casual_combat()
horizons/ai/aiplayer/combat/combatmanager.py:423: in handle_casual_combat
    rules = (filters.not_in_fleet, filters.pirate,
filters.ship_state(self.ships, self.shipStates.idle))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <horizons.ai.aiplayer.combat.unitmanager.UnitManager object at
0x7ffff0e81840>
state_dict = <DefaultWeakKeyDictionary at 0x7ffff0e82a70>
ship_states = EnumValue(<horizons.ext.enum.Enum object at
0x7ffff5b24e50>, 0, 'idle')

    def _ship_state_rule(self, state_dict, ship_states):
    """
    Rule stating that ship has to be in any of given states.
    """
>    if not isinstance(ship_states, collections.Iterable):
E    AttributeError: module 'collections' has no attribute 'Iterable'

horizons/ai/aiplayer/combat/unitmanager.py:154: AttributeError
------------------------------ Captured log call -------------------------------
WARNING  util.savegameupgrader:savegameupgrader.py:75 Discovered old
savegame file, auto-upgrading: 76 -> 77
=============================== warnings summary ===============================
horizons/extscheduler.py:72
  /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/horizons/extscheduler.py:72:
SyntaxWarning: "is" with a literal. Did you mean "=="?
    if obj.loops > 0 or obj.loops is -1:

tests/gui/__init__.py:148
  /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/tests/gui/__init__.py:148:
PytestUnknownMarkWarning: Unknown pytest.mark.gui_test - is this a
typo?  You can register custom marks to avoid this warning - for
details, see https://docs.pytest.org/en/stable/how-to/mark.html
    gui_test = pytest.mark.gui_test

tests/game/long/test_ai_long.py:30
  /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/tests/game/long/test_ai_long.py:30:
PytestUnknownMarkWarning: Unknown pytest.mark.long - is this a typo?
You can register custom marks to avoid this warning - for details, see
https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.long

tests/game/long/test_ai_quick.py:30
  /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/tests/game/long/test_ai_quick.py:30:
PytestUnknownMarkWarning: Unknown pytest.mark.long - is this a typo?
You can register custom marks to avoid this warning - for details, see
https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.long

tests/game/long/test_ai_very_long.py:30
  /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/tests/game/long/test_ai_very_long.py:30:
PytestUnknownMarkWarning: Unknown pytest.mark.long - is this a typo?
You can register custom marks to avoid this warning - for details, see
https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.long

tests/game/long/test_load_save_long.py:33
  /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/tests/game/long/test_load_save_long.py:33:
PytestUnknownMarkWarning: Unknown pytest.mark.long - is this a typo?
You can register custom marks to avoid this warning - for details, see
https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.long

horizons/util/tile_orientation.py:26
  /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/horizons/util/tile_orientation.py:26:
DeprecationWarning: invalid escape sequence '\ '
    """

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/game/test_load_save.py::test_savegame_upgrade - AttributeError: ...
====== 1 failed, 237 passed, 91 skipped, 2 xfailed, 7 warnings in 26.45s =======
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "pytest" arguments: ("tests")
exit-status: 1 term-signal: #f stop-signal: #f>
phase `check' failed after 26.7 seconds
command "pytest" "tests" failed with status 1
#+end_example




Information forwarded to bug-guix <at> gnu.org:
bug#66173; Package guix. (Tue, 26 Sep 2023 22:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 66173 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 66173 <at> debbugs.gnu.org
Subject: Re: Package unknown-horizons fails during build process
Date: Wed, 27 Sep 2023 00:04:03 +0200
Hi Rodrigo, all,

[For future reference.]

> http://0x0.st/HVoh.drv.gz

Third-party hosting sites tend to delete pastes after some time.  I know 
0x0 does.

While I certainly hope that your issue can be resolved before then, I 
recommend attaching logs, photos, and other documentation to the bug 
report.  This list has a more generous attachment limit for that reason.

Kind regards,

T G-R

Sent from a Web browser.  Excuse or enjoy my brevity.




Changed bug title to 'Package unknown-horizons fails during build process' from '[BUG] Package unknown-horizons fails during build process' Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Tue, 26 Sep 2023 22:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#66173; Package guix. (Thu, 04 Jan 2024 20:36:01 GMT) Full text and rfc822 format available.

Message #13 received at 66173 <at> debbugs.gnu.org (full text, mbox):

From: Simon South <simon <at> simonsouth.net>
To: 66173 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: unknown-horizons: Fix build and runtime errors.
Date: Thu,  4 Jan 2024 15:33:56 -0500
Apply two upstream commits that allow building with Python 3.9 or newer and
running with Python 3.10.

* gnu/packages/patches/unknown-horizons-python-3.9.patch,
* gnu/packages/patches/unknown-horizons-python-3.10.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/games.scm (unknown-horizons)[source]: Apply them.

Change-Id: Icbc8b698b913be01465b09ab26afb29e5fd62a87
---
 gnu/local.mk                                  |  2 +
 gnu/packages/games.scm                        |  4 +-
 .../unknown-horizons-python-3.10.patch        | 32 +++++++++++++++
 .../patches/unknown-horizons-python-3.9.patch | 41 +++++++++++++++++++
 4 files changed, 78 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/unknown-horizons-python-3.10.patch
 create mode 100644 gnu/packages/patches/unknown-horizons-python-3.9.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f66db809a9..bbde67cee2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2082,6 +2082,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/ungoogled-chromium-system-ffmpeg.patch	\
   %D%/packages/patches/ungoogled-chromium-system-nspr.patch	\
   %D%/packages/patches/unknown-horizons-python-3.8-distro.patch	\
+  %D%/packages/patches/unknown-horizons-python-3.9.patch	\
+  %D%/packages/patches/unknown-horizons-python-3.10.patch	\
   %D%/packages/patches/unzip-CVE-2014-8139.patch		\
   %D%/packages/patches/unzip-CVE-2014-8140.patch		\
   %D%/packages/patches/unzip-CVE-2014-8141.patch		\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 333dbfcec5..880aebe0bb 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4396,7 +4396,9 @@ (define-public unknown-horizons
               (sha256
                (base32
                 "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))
-              (patches (search-patches "unknown-horizons-python-3.8-distro.patch"))))
+              (patches (search-patches "unknown-horizons-python-3.8-distro.patch"
+                                       "unknown-horizons-python-3.9.patch"
+                                       "unknown-horizons-python-3.10.patch"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
diff --git a/gnu/packages/patches/unknown-horizons-python-3.10.patch b/gnu/packages/patches/unknown-horizons-python-3.10.patch
new file mode 100644
index 0000000000..599de1fec5
--- /dev/null
+++ b/gnu/packages/patches/unknown-horizons-python-3.10.patch
@@ -0,0 +1,32 @@
+From 4ff605d6c55fcf3e9b4777ffbcb0c24ef17ba4ca Mon Sep 17 00:00:00 2001
+From: Arti <artism90 <at> googlemail.com>
+Date: Mon, 28 Feb 2022 21:19:50 +0100
+Subject: [PATCH] Rename instances of `collections.Iterable` into
+ `collections.abc.Iterable` (#2956)
+
+---
+ horizons/ai/aiplayer/combat/unitmanager.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/horizons/ai/aiplayer/combat/unitmanager.py b/horizons/ai/aiplayer/combat/unitmanager.py
+index 8449d5563c5..57db0d47061 100644
+--- a/horizons/ai/aiplayer/combat/unitmanager.py
++++ b/horizons/ai/aiplayer/combat/unitmanager.py
+@@ -151,7 +151,7 @@ def _ship_state_rule(self, state_dict, ship_states):
+ 		"""
+ 		Rule stating that ship has to be in any of given states.
+ 		"""
+-		if not isinstance(ship_states, collections.Iterable):
++		if not isinstance(ship_states, collections.abc.Iterable):
+ 			ship_states = (ship_states,)
+ 		return lambda ship: (state_dict[ship] in ship_states)
+ 
+@@ -178,7 +178,7 @@ def filter_ships(self, ships, rules):
+ 		@param rules: conditions each ship has to meet (AND)
+ 		@type rules: iterable of lambda(ship) or single lambda(ship)
+ 		"""
+-		if not isinstance(rules, collections.Iterable):
++		if not isinstance(rules, collections.abc.Iterable):
+ 			rules = (rules,)
+ 		return [ship for ship in ships if all((rule(ship) for rule in rules))]
+ 
diff --git a/gnu/packages/patches/unknown-horizons-python-3.9.patch b/gnu/packages/patches/unknown-horizons-python-3.9.patch
new file mode 100644
index 0000000000..8b93a71b6c
--- /dev/null
+++ b/gnu/packages/patches/unknown-horizons-python-3.9.patch
@@ -0,0 +1,41 @@
+From 7f6f613826aef9810999c1599c8354e8a78fbdb4 Mon Sep 17 00:00:00 2001
+From: Lukas1818 <44570204+Lukas1818 <at> users.noreply.github.com>
+Date: Fri, 19 Feb 2021 21:08:44 +0100
+Subject: [PATCH] fixs for Phyton 3.9 (#2955)
+
+* change deprecated isAlive() to is_alive()
+
+* remove unsupported keyword "encoding"
+
+Co-authored-by: Lukas1818 <git <at> lukas1818.de>
+---
+ horizons/util/loaders/jsondecoder.py | 2 +-
+ horizons/util/preloader.py           | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/horizons/util/loaders/jsondecoder.py b/horizons/util/loaders/jsondecoder.py
+index ea2ddfb3308..138a948f42a 100644
+--- a/horizons/util/loaders/jsondecoder.py
++++ b/horizons/util/loaders/jsondecoder.py
+@@ -37,4 +37,4 @@ def _decode_dict(dct):
+ 			return newdict
+ 
+ 		with open(path, "r") as f:
+-			return json.load(f, encoding="ascii", object_hook=_decode_dict)
++			return json.load(f, object_hook=_decode_dict)
+diff --git a/horizons/util/preloader.py b/horizons/util/preloader.py
+index 5689cc68152..2e072fcc642 100644
+--- a/horizons/util/preloader.py
++++ b/horizons/util/preloader.py
+@@ -79,9 +79,9 @@ def wait_for_finish(self):
+ 		"""
+ 		self.lock.acquire()
+ 		# wait until it finished its current action
+-		if self.isAlive():
++		if self.is_alive():
+ 			self.join()
+-			assert not self.isAlive()
++			assert not self.is_alive()
+ 		else:
+ 			try:
+ 				self.lock.release()
-- 
2.41.0





Information forwarded to bug-guix <at> gnu.org:
bug#66173; Package guix. (Thu, 04 Jan 2024 20:36:01 GMT) Full text and rfc822 format available.

Message #16 received at 66173 <at> debbugs.gnu.org (full text, mbox):

From: Simon South <simon <at> simonsouth.net>
To: 66173 <at> debbugs.gnu.org
Subject: [PATCH 0/2] unknown-horizons: Fix build, runtime errors
Date: Thu,  4 Jan 2024 15:33:54 -0500
This patch series fixes unknown-horizons, a real-time strategy game,
by applying upstream commits that allow the game and its engine to
build and run using recent versions of Python.

This also resolves issue #54815, "Unknown Horizons 2019.1 fails to
start"[0].

I've tested this on AArch64 and x86-64 and everything seems fine: The
game starts as expected using

  ./pre-inst-env guix shell unknown-horizons -- unknown-horizons

--
Simon South
simon <at> simonsouth.net

[0] https://issues.guix.gnu.org/54815


Simon South (2):
  gnu: fifengine: Fix runtime error when using Python 3.9 or newer.
  gnu: unknown-horizons: Fix build and runtime errors.

 gnu/local.mk                                  |  3 +
 gnu/packages/games.scm                        |  7 +-
 .../patches/fifengine-python-3.9-compat.patch | 81 +++++++++++++++++++
 .../unknown-horizons-python-3.10.patch        | 32 ++++++++
 .../patches/unknown-horizons-python-3.9.patch | 41 ++++++++++
 5 files changed, 162 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/fifengine-python-3.9-compat.patch
 create mode 100644 gnu/packages/patches/unknown-horizons-python-3.10.patch
 create mode 100644 gnu/packages/patches/unknown-horizons-python-3.9.patch


base-commit: 3c1f25fc7b3cd1942c33a48e71697f94c4c86bc2
-- 
2.41.0





Information forwarded to bug-guix <at> gnu.org:
bug#66173; Package guix. (Thu, 04 Jan 2024 20:36:02 GMT) Full text and rfc822 format available.

Message #19 received at 66173 <at> debbugs.gnu.org (full text, mbox):

From: Simon South <simon <at> simonsouth.net>
To: 66173 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: fifengine: Fix runtime error when using Python 3.9
 or newer.
Date: Thu,  4 Jan 2024 15:33:55 -0500
* gnu/packages/patches/fifengine-python-3.9-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/games.scm (fifengine)[source]: Apply it.

Change-Id: I61001d6b87db00c71f1e2e6ca3bac8581e941451
---
 gnu/local.mk                                  |  1 +
 gnu/packages/games.scm                        |  3 +-
 .../patches/fifengine-python-3.9-compat.patch | 81 +++++++++++++++++++
 3 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/fifengine-python-3.9-compat.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f804f4ef5b..f66db809a9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1166,6 +1166,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/fenics-dolfin-boost.patch		\
   %D%/packages/patches/fenics-dolfin-config-slepc.patch		\
   %D%/packages/patches/fifengine-boost-compat.patch		\
+  %D%/packages/patches/fifengine-python-3.9-compat.patch	\
   %D%/packages/patches/fifengine-swig-compat.patch		\
   %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch		\
   %D%/packages/patches/fifo-map-remove-catch.hpp.patch		\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index c7813790a1..333dbfcec5 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4060,7 +4060,8 @@ (define-public fifengine
                                   "fifengine/tar.gz/" version))
               (file-name (string-append name "-" version ".tar.gz"))
               (patches (search-patches "fifengine-swig-compat.patch"
-                                       "fifengine-boost-compat.patch"))
+                                       "fifengine-boost-compat.patch"
+                                       "fifengine-python-3.9-compat.patch"))
               (sha256
                (base32
                 "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
diff --git a/gnu/packages/patches/fifengine-python-3.9-compat.patch b/gnu/packages/patches/fifengine-python-3.9-compat.patch
new file mode 100644
index 0000000000..2def4681cd
--- /dev/null
+++ b/gnu/packages/patches/fifengine-python-3.9-compat.patch
@@ -0,0 +1,81 @@
+Fix runtime error when using Python 3.9 or newer.
+
+Taken from upstream:
+https://github.com/fifengine/fifengine/commit/cf295fd98a8fba080f6305c27be56d10ab7ce94d
+
+diff --git a/engine/python/fife/extensions/serializers/simplexml.py b/engine/python/fife/extensions/serializers/simplexml.py
+index c4e10f4f8..d05567936 100644
+--- a/engine/python/fife/extensions/serializers/simplexml.py
++++ b/engine/python/fife/extensions/serializers/simplexml.py
+@@ -200,7 +200,7 @@ def get(self, module, name, defaultValue=None):
+ 		#get the module tree: for example find tree under module FIFE
+ 		moduleTree = self._getModuleTree(module)
+ 		element = None
+-		for e in moduleTree.getchildren():
++		for e in moduleTree:
+ 			if e.tag == "Setting" and e.get("name", "") == name:
+ 				element = e
+ 				break
+@@ -275,7 +275,7 @@ def set(self, module, name, value, extra_attrs={}):
+ 			e_type = "str"
+ 			value = str(value)
+ 
+-		for e in moduleTree.getchildren():
++		for e in moduleTree:
+ 			if e.tag != "Setting": continue
+ 			if e.get("name", "") == name:
+ 				e.text = value
+@@ -305,7 +305,7 @@ def remove(self, module, name):
+ 
+ 		moduleTree = self._getModuleTree(module)
+ 
+-		for e in moduleTree.getchildren():
++		for e in moduleTree:
+ 			if e.tag != "Setting": continue
+ 			if e.get("name", "") == name:
+ 				moduleTree.remove(e)
+@@ -321,7 +321,7 @@ def getModuleNameList(self):
+ 			self._initialized = True
+ 
+ 		moduleNames = []
+-		for c in self._root_element.getchildren():
++		for c in self._root_element:
+ 			if c.tag == "Module":
+ 				name = c.get("name","")
+ 				if not isinstance(name, basestring):
+@@ -344,7 +344,7 @@ def getAllSettings(self, module):
+ 		
+ 		# now from the tree read every value, and put the necessary values
+ 		# to the list
+-		for e in moduleTree.getchildren():
++		for e in moduleTree:
+ 			if e.tag == "Setting":
+ 				name = e.get("name", "")
+ 	
+@@ -383,7 +383,7 @@ def _validateTree(self):
+ 		
+ 		Raises an InvalidFormat exception if there is a format error.
+ 		"""
+-		for c in self._root_element.getchildren():
++		for c in self._root_element:
+ 			if c.tag != "Module":
+ 				raise InvalidFormat("Invalid tag in " + self._file + \
+ 									". Expected Module, got: " + c.tag)
+@@ -391,7 +391,7 @@ def _validateTree(self):
+ 				raise InvalidFormat("Invalid tag in " + self._file + \
+ 									". Module name is empty.")
+ 			else:
+-				for e in c.getchildren():
++				for e in c:
+ 					if e.tag != "Setting":
+ 						raise InvalidFormat("Invalid tag in " + self._file + \
+ 											" in module: " + c.tag + \
+@@ -414,7 +414,7 @@ def _getModuleTree(self, module):
+ 			raise AttributeError("Settings:_getModuleTree: Invalid type for "
+ 								 "module argument.")
+ 
+-		for c in self._root_element.getchildren():
++		for c in self._root_element:
+ 			if c.tag == "Module" and c.get("name", "") == module:
+ 				return c
+ 
-- 
2.41.0





Added tag(s) patch. Request was from Simon South <simon <at> simonsouth.net> to control <at> debbugs.gnu.org. (Thu, 04 Jan 2024 20:40:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#66173; Package guix. (Sat, 13 Jan 2024 15:52:02 GMT) Full text and rfc822 format available.

Message #24 received at 66173 <at> debbugs.gnu.org (full text, mbox):

From: Simon South <simon <at> simonsouth.net>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 宋文武 <iyzsong <at> envs.net>
Cc: 66173 <at> debbugs.gnu.org
Subject: Re: bug#66173: Package unknown-horizons fails during build process
Date: Sat, 13 Jan 2024 10:50:48 -0500
Liliana, 宋文武:

Are you interested in reviewing these patches?  Unfortunately I
neglected to CC the games team when posting them.

They fix the build of Unknown Horizons in master.

https://issues.guix.gnu.org/66173

-- 
Simon South
simon <at> simonsouth.net


-------------------- Start of forwarded message --------------------
Subject: bug#66173: [PATCH 0/2] unknown-horizons: Fix build, runtime errors
To: 66173 <at> debbugs.gnu.org
From: Simon South <simon <at> simonsouth.net>
Date: Thu,  4 Jan 2024 15:33:54 -0500

This patch series fixes unknown-horizons, a real-time strategy game,
by applying upstream commits that allow the game and its engine to
build and run using recent versions of Python.

This also resolves issue #54815, "Unknown Horizons 2019.1 fails to
start"[0].

I've tested this on AArch64 and x86-64 and everything seems fine: The
game starts as expected using

  ./pre-inst-env guix shell unknown-horizons -- unknown-horizons

--
Simon South
simon <at> simonsouth.net

[0] https://issues.guix.gnu.org/54815


Simon South (2):
  gnu: fifengine: Fix runtime error when using Python 3.9 or newer.
  gnu: unknown-horizons: Fix build and runtime errors.

 gnu/local.mk                                  |  3 +
 gnu/packages/games.scm                        |  7 +-
 .../patches/fifengine-python-3.9-compat.patch | 81 +++++++++++++++++++
 .../unknown-horizons-python-3.10.patch        | 32 ++++++++
 .../patches/unknown-horizons-python-3.9.patch | 41 ++++++++++
 5 files changed, 162 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/fifengine-python-3.9-compat.patch
 create mode 100644 gnu/packages/patches/unknown-horizons-python-3.10.patch
 create mode 100644 gnu/packages/patches/unknown-horizons-python-3.9.patch


base-commit: 3c1f25fc7b3cd1942c33a48e71697f94c4c86bc2
-- 
2.41.0





-------------------- End of forwarded message --------------------




Reply sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
You have taken responsibility. (Sun, 14 Jan 2024 12:09:02 GMT) Full text and rfc822 format available.

Notification sent to Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>:
bug acknowledged by developer. (Sun, 14 Jan 2024 12:09:02 GMT) Full text and rfc822 format available.

Message #29 received at 66173-done <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Simon South <simon <at> simonsouth.net>, 
 宋文武 <iyzsong <at> envs.net>
Cc: 66173-done <at> debbugs.gnu.org
Subject: Re: bug#66173: Package unknown-horizons fails during build process
Date: Sun, 14 Jan 2024 13:08:42 +0100
Am Samstag, dem 13.01.2024 um 10:50 -0500 schrieb Simon South:
> Liliana, 宋文武:
> 
> Are you interested in reviewing these patches?  Unfortunately I
> neglected to CC the games team when posting them.
> 
> They fix the build of Unknown Horizons in master.
> 
> https://issues.guix.gnu.org/66173
> 
> -- 
I came, saw, and pushed.

Sorry for not coming earlier.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 11 Feb 2024 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.