mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 00:27:20 -05:00
fix: say offline files are not downloaded
The line mode under --offline, with files that need the internet, ended on Done with 0 files installed. It now counts them as not downloaded and says --offline is why, not an answer.
This commit is contained in:
1 parent
92ee80f40b
commit
7abe5b8309
5 files changed
+16
-12
No files matched your search
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$defaultInstallUrl = "https://raw.githubusercontent.com/Abdess/retrobios/main/install.py"
|
||||
$defaultInstallSha256 = "d59defaa5802d2d7b73b4b02e693e9592618803b308eb625a6f436b8a5388464"
|
||||
$defaultInstallSha256 = "b7eec15ba746bbaaaea471396964a83a255a4a1c4bd51316fbdb0ff62a065169"
|
||||
$maximumInstallerBytes = 2MB
|
||||
$installerExit = 0
|
||||
$installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null }
|
||||
|
||||
+3
-1
@@ -5403,7 +5403,7 @@ def _report_outcome(
|
||||
print(f" ... and {len(failures) - 10} more")
|
||||
if declined and not downloaded and not errors and not interrupted:
|
||||
print(f"\nNothing installed: {_plural(declined, 'file')} not downloaded, "
|
||||
"as answered.")
|
||||
+ ("which --offline does not do." if _offline_only() else "as answered."))
|
||||
print(f"{_plural(up_to_date, 'file')} already up to date at {_locations(paths)}.")
|
||||
return
|
||||
kept = _kept_lines()
|
||||
@@ -10405,7 +10405,9 @@ def _install(args: argparse.Namespace, real_stdout: TextIO) -> None:
|
||||
"--offline does not use. Copy them from your old card or a folder "
|
||||
"(--from), or run the installer again with a pack (--from-pack) or "
|
||||
"without --offline.")
|
||||
# Not done: the summary says they were not downloaded.
|
||||
files_pending += len(fetched)
|
||||
total_declined += len(fetched)
|
||||
to_download = [f for f in to_download if id(f) in copies]
|
||||
fetched = []
|
||||
dl_size = sum(f.get("size", 0) for f in to_download)
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ esac
|
||||
TEMP_INSTALLER=""
|
||||
TEMP_DIRECTORY=""
|
||||
DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/install.py"
|
||||
DEFAULT_INSTALL_SHA256="d59defaa5802d2d7b73b4b02e693e9592618803b308eb625a6f436b8a5388464"
|
||||
DEFAULT_INSTALL_SHA256="b7eec15ba746bbaaaea471396964a83a255a4a1c4bd51316fbdb0ff62a065169"
|
||||
MAX_INSTALLER_BYTES=2097152
|
||||
|
||||
cleanup() {
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
{
|
||||
"dest": "roms/ports/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 650749,
|
||||
"sha256": "d59defaa5802d2d7b73b4b02e693e9592618803b308eb625a6f436b8a5388464",
|
||||
"size": 650926,
|
||||
"sha256": "b7eec15ba746bbaaaea471396964a83a255a4a1c4bd51316fbdb0ff62a065169",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -71,8 +71,8 @@
|
||||
"muos": {
|
||||
"archive": {
|
||||
"dest": "ARCHIVE/RetroBIOS.muxapp",
|
||||
"size": 703298,
|
||||
"sha256": "bb54c96f4ae4850f997cc925b2958b21477be655a658b6bc3551d1aef68fdbb5"
|
||||
"size": 703475,
|
||||
"sha256": "1928a1ee174ab57d2890fa7d668a34fa996637669446bb6ad4329fa0fc3d76dc"
|
||||
},
|
||||
"members": [
|
||||
{
|
||||
@@ -92,8 +92,8 @@
|
||||
{
|
||||
"name": "RetroBIOS/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 650749,
|
||||
"sha256": "d59defaa5802d2d7b73b4b02e693e9592618803b308eb625a6f436b8a5388464",
|
||||
"size": 650926,
|
||||
"sha256": "b7eec15ba746bbaaaea471396964a83a255a4a1c4bd51316fbdb0ff62a065169",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -166,8 +166,8 @@
|
||||
{
|
||||
"dest": ".config/modules/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 650749,
|
||||
"sha256": "d59defaa5802d2d7b73b4b02e693e9592618803b308eb625a6f436b8a5388464",
|
||||
"size": 650926,
|
||||
"sha256": "b7eec15ba746bbaaaea471396964a83a255a4a1c4bd51316fbdb0ff62a065169",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3578,7 +3578,9 @@ class LineModeOffline(unittest.TestCase):
|
||||
self.assertIn("--offline: only the files found on this machine are installed.", out)
|
||||
self.assertIn("5 files need the internet, which --offline does not use.", out)
|
||||
self.assertNotIn("Downloading", out)
|
||||
self.assertNotIn("failed", out.lower().replace("not failed", ""))
|
||||
self.assertNotIn("failed", out.lower())
|
||||
self.assertIn("Nothing installed: 5 files not downloaded, which --offline does not do.",
|
||||
out.replace("\r\n", " ").replace("\n", " "))
|
||||
|
||||
def test_the_data_files_are_counted_before_the_question(self):
|
||||
files = [{"dest": "a.bin", "size": 1024}]
|
||||
|
||||
Reference in new issue
Block a user