mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-21 03:09:08 -05:00
fix: pack no launcher file the emulator installs
The launcher layer packed a file under the launcher's name whatever the platform installs: ROCKNIX's xemu config reads hdd/xbox_hdd.qcow2, and the profile marks that image installed_on rocknix, yet the pack brought one. A place whose entry the emulator installs on that platform is now filled by the install, as validation.deliverable has it for the pack.
This commit is contained in:
1 parent
6295bf4545
commit
c702cdf62e
2 files changed
+20
No files matched your search
@@ -399,6 +399,11 @@ class LauncherLayer:
|
||||
return True
|
||||
if not place.anchored:
|
||||
continue
|
||||
# The emulator as this platform installs it brings the file: the
|
||||
# place is filled, nothing is packed (ROCKNIX's xemu hdd image).
|
||||
if any(key in candidate.names and report.get("bundled")
|
||||
for candidate, report in matched):
|
||||
return True
|
||||
source = self._content_for(place, name, key, matched, resolve_held)
|
||||
if source is None:
|
||||
continue
|
||||
|
||||
@@ -186,6 +186,21 @@ class LauncherLayerTest(unittest.TestCase):
|
||||
self.assertIn("sub/fix.bin", added)
|
||||
self.assertEqual(added["sub/fix.bin"]["md5"], _md5(CONTENT["core.bin"]))
|
||||
|
||||
def test_a_file_the_emulator_installs_is_not_brought(self) -> None:
|
||||
"""ROCKNIX installs xemu's xbox_hdd.qcow2 (installed_on), and the
|
||||
layer packed one under the launcher's hdd/ path all the same."""
|
||||
profile = {
|
||||
"emulator": "FixEmu", "type": "standalone", "systems": ["test-sys"],
|
||||
"files": [{"name": "core.bin", "aliases": ["fix.bin"], "required": True,
|
||||
"installed_on": ["launchertest"]}],
|
||||
}
|
||||
with open(os.path.join(self.emulators_dir, "fixemu.yml"), "w") as fh:
|
||||
yaml.dump(profile, fh)
|
||||
_emulator_profiles_cache.clear()
|
||||
self.profiles = load_emulator_profiles(self.emulators_dir)
|
||||
added = [u["path"] for u in self._report() if u.get("launcher")]
|
||||
self.assertNotIn("sub/fix.bin", added)
|
||||
|
||||
def test_no_place_is_filled_twice(self) -> None:
|
||||
added = [u["path"] for u in self._report() if u.get("launcher")]
|
||||
self.assertEqual(sorted(added), ["e.bin", "sub/fix.bin"])
|
||||
|
||||
Reference in new issue
Block a user