feat(ogl-iar): German archive progress and interactive local console (#202)

* feat(ogl-iar): localized archive logs and interactive console progress

* fix(ogl-iar): keep console redraw lock safe and show compact live bar
This commit is contained in:
OpenGenesis (MPL 2.0) authored and GitHub committed 2026-10-14 17:16:46 +02:00
1 parent 6c3f6e7ff5
commit fae3b6876b
10 files changed
+398 -123

No files matched your search

@@ -141,6 +141,7 @@ namespace OpenSim.Framework.Console
["save oar"] = "Regionsarchiv exportieren (Freigabe erforderlich).",
["load iar"] = "Inventararchiv importieren (Freigabe erforderlich).",
["save iar"] = "Inventararchiv exportieren (Freigabe erforderlich).",
["show iar"] = "Fortschritt und Status laufender IAR-Archive anzeigen.",
["show regions"] = "Alle geladenen Regionen anzeigen.",
["change region"] = "Aktive Region für nachfolgende Befehle auswählen.",
["create region"] = "Eine neue Region erstellen.",
+41 -5
View File
@@ -58,6 +58,22 @@ namespace OpenSim.Framework.Console
private int m_cursorYPosition = -1;
private int m_cursorXPosition = 0;
private StringBuilder m_commandLine = new StringBuilder();
// Non-persistent, console-only status next to the editable command
// prompt. It is never inserted into the log stream or command text.
private string m_oglIarStatus = string.Empty;
private int m_lastOglIarStatusLength;
public void UpdateOglIarProgress(string status)
{
status = status ?? string.Empty;
// Bound text to prevent huge server messages wrapping the prompt.
if (status.Length > 72)
status = status.Substring(0, 72);
LockOutput();
try { m_oglIarStatus = status; }
finally { UnlockOutput(); }
}
private bool m_echo = true;
private List<string> m_history = new List<string>();
@@ -289,6 +305,13 @@ namespace OpenSim.Framework.Console
if (m_cursorYPosition == -1 || System.Console.BufferWidth == 0)
return;
int room = System.Console.BufferWidth - prompt.Length - m_commandLine.Length - 1;
string suffix = m_oglIarStatus.Length > 0 && room > 12
? " | " + m_oglIarStatus.Substring(0, Math.Min(m_oglIarStatus.Length, room - 3))
: string.Empty;
int previousSuffix = m_lastOglIarStatusLength;
m_lastOglIarStatusLength = suffix.Length;
int xc = prompt.Length + m_cursorXPosition;
int new_x = xc % System.Console.BufferWidth;
@@ -310,6 +333,10 @@ namespace OpenSim.Framework.Console
else
System.Console.Write("{0}", prompt);
System.Console.Write(suffix);
if (previousSuffix > suffix.Length)
System.Console.Write(new string(' ', previousSuffix - suffix.Length));
SetCursorTopLeft(new_y, new_x);
}
}
@@ -323,7 +350,8 @@ namespace OpenSim.Framework.Console
{
m_cursorYPosition = SetCursorZeroLeft(m_cursorYPosition);
int count = m_commandLine.Length + prompt.Length;
int count = m_commandLine.Length + prompt.Length + m_lastOglIarStatusLength;
m_lastOglIarStatusLength = 0;
if(count > 0)
System.Console.Write(new string(' ', count));
@@ -337,12 +365,20 @@ namespace OpenSim.Framework.Console
public override void UnlockOutput()
{
if (m_cursorYPosition != -1)
try
{
m_cursorYPosition = System.Console.CursorTop;
Show();
if (m_cursorYPosition != -1)
{
m_cursorYPosition = System.Console.CursorTop;
Show();
}
}
finally
{
// Even a terminal resize/disconnect must not leave the
// shared console output lock held by a progress callback.
Monitor.Exit(m_commandLine);
}
Monitor.Exit(m_commandLine);
}
private void WriteColorText(ConsoleColor color, string sender)
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (folderCandidates.Count == 0)
{
// Possibly provide an option later on to automatically create this folder if it does not exist
m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath);
m_log.ErrorFormat("[OGL-IAR]: Der Inventarpfad {0} existiert nicht.", m_invPath);
return m_loadedNodes;
}
@@ -235,7 +235,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
LoadInventoryLinks();
m_log.DebugFormat(
"[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures",
"[OGL-IAR]: {0} Assets importiert, {1} fehlgeschlagen.",
m_successfulAssetRestores, m_failedAssetRestores);
//Alicia: When this is called by LibraryModule or Tests, m_module will be null as event is not required
@@ -492,7 +492,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
m_creatorIdForAssetId[item.AssetID] = item.CreatorIdAsUuid;
if (!m_InventoryService.AddItem(item))
m_log.WarnFormat("[INVENTORY ARCHIVER]: Unable to save item {0} in folder {1}", item.Name, item.Folder);
m_log.WarnFormat("[OGL-IAR]: Inventareintrag {0} konnte nicht im Ordner {1} gespeichert werden.", item.Name, item.Folder);
}
return item;
@@ -514,7 +514,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (indx < 32)
{
m_log.ErrorFormat(
"[INVENTORY ARCHIVER]: Could not find extension information in asset path {0} since it's missing the separator {1}. Skipping",
"[OGL-IAR]: Asset-Pfad {0} enthält keine gültige Dateiendung (Trennzeichen {1} fehlt). Eintrag übersprungen.",
assetPath, ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
return false;
@@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (!ArchiveConstants.EXTENSION_TO_ASSET_TYPE.TryGetValue(extension, out sbyte assetType))
{
m_log.ErrorFormat(
"[INVENTORY ARCHIVER]: Tried to dearchive data with path {0} with an unknown type extension {1}",
"[OGL-IAR]: Asset {0} hat die unbekannte Dateiendung {1} und wird übersprungen.",
assetPath, extension);
return false;
}
@@ -535,7 +535,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (assetType == (sbyte)AssetType.Unknown)
{
m_log.WarnFormat("[INVENTORY ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, assetId);
m_log.WarnFormat("[OGL-IAR]: Asset {1} mit {0} Bytes besitzt einen unbekannten Typ und wird übersprungen.", data.Length, assetId);
return false;
}
@@ -594,12 +594,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
throw new Exception(
string.Format(
"The IAR you are trying to load has major version number of {0} but this version of OpenSim can only load IARs with major version number {1} and below",
"Das IAR besitzt Hauptversion {0}; dieser Simulator unterstützt nur IAR-Versionen bis einschließlich {1}.",
majorVersion, MAX_MAJOR_VERSION));
}
ControlFileLoaded = true;
m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version);
m_log.InfoFormat("[OGL-IAR]: Importiere IAR-Archivformat Version {0}.", version);
}
/// <summary>
@@ -613,13 +613,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (!ControlFileLoaded)
throw new Exception(
string.Format(
"The IAR you are trying to load does not list {0} before {1}. Aborting load",
"Ungültige IAR-Reihenfolge: {0} muss vor {1} stehen. Import abgebrochen.",
ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.INVENTORY_PATH));
if (m_assetsLoaded)
throw new Exception(
string.Format(
"The IAR you are trying to load does not list all {0} before {1}. Aborting load",
"Ungültige IAR-Reihenfolge: Alle {0} müssen vor {1} stehen. Import abgebrochen.",
ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH));
path = path.Substring(ArchiveConstants.INVENTORY_PATH.Length);
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
it.AssetID = m_itemIDs[target];
if(!m_InventoryService.AddItem(it))
m_log.WarnFormat("[INVENTORY ARCHIVER]: Unable to save item {0} in folder {1}",it.Name,it.Folder);
m_log.WarnFormat("[OGL-IAR]: Inventareintrag {0} konnte nicht im Ordner {1} gespeichert werden.",it.Name,it.Folder);
else
{
m_successfulItemRestores++;
@@ -684,13 +684,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (!ControlFileLoaded)
throw new Exception(
string.Format(
"The IAR you are trying to load does not list {0} before {1}. Aborting load",
"Ungültige IAR-Reihenfolge: {0} muss vor {1} stehen. Import abgebrochen.",
ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.ASSETS_PATH));
if (!m_inventoryNodesLoaded)
throw new Exception(
string.Format(
"The IAR you are trying to load does not list all {0} before {1}. Aborting load",
"Ungültige IAR-Reihenfolge: Alle {0} müssen vor {1} stehen. Import abgebrochen.",
ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH));
if (LoadAsset(path, data))
@@ -700,7 +700,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if ((m_successfulAssetRestores) % 50 == 0)
m_log.DebugFormat(
"[INVENTORY ARCHIVER]: Loaded {0} assets...",
"[OGL-IAR]: {0} Assets importiert …",
m_successfulAssetRestores);
m_assetsLoaded = true;
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (timedOut)
{
succeeded = false;
reportedException = new Exception("Loading assets timed out");
reportedException = new Exception("Zeitüberschreitung beim Laden der Assets");
}
m_module.TriggerInventoryArchiveSaved(
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (options.ContainsKey("verbose"))
{
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Skipping inventory item {0} {1} at {2}",
"[OGL-IAR]: Inventareintrag {0} ({1}) unter {2} wird übersprungen.",
inventoryItem.Name, inventoryItem.ID, path);
}
@@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (!CanUserArchiveObject(m_userInfo.PrincipalID, inventoryItem))
{
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Insufficient permissions, skipping inventory item {0} {1} at {2}",
"[OGL-IAR]: Unzureichende Berechtigung: Inventareintrag {0} ({1}) unter {2} wird übersprungen.",
inventoryItem.Name, inventoryItem.ID, path);
// Count Items Excluded
@@ -204,7 +204,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (options.ContainsKey("verbose"))
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Saving item {0} {1} (asset UUID {2})",
"[OGL-IAR]: Sichere Inventareintrag {0} ({1}; Asset-UUID {2}).",
inventoryItem.ID, inventoryItem.Name, inventoryItem.AssetID);
string filename = path + CreateArchiveItemName(inventoryItem);
@@ -242,14 +242,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if(curErrorCntr > 0)
{
m_log.ErrorFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references to missing or damaged assets",
m_log.ErrorFormat("[OGL-IAR]: Inventareintrag {0} '{1}' (Typ {2}, Pfad '{3}') enthält {4} Referenzen auf fehlende oder beschädigte Assets.",
inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, curErrorCntr);
if(possible > 0)
m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item also contains {0} references that may be to missing or damaged assets or not a problem", possible);
m_log.WarnFormat("[OGL-IAR]: Zusätzlich {0} möglicherweise ungültige Asset-Referenzen; bitte prüfen.", possible);
}
else if(possible > 0)
{
m_log.WarnFormat("[INVENTORY ARCHIVER Warning]: item {0} '{1}', type {2}, in '{3}', contains {4} references that may be to missing or damaged assets or not a problem", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, possible);
m_log.WarnFormat("[OGL-IAR]: Inventareintrag {0} '{1}' (Typ {2}, Pfad '{3}') enthält {4} möglicherweise ungültige Asset-Referenzen.", inventoryItem.ID, inventoryItem.Name, itemAssetType.ToString(), spath, possible);
}
}
}
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (options.ContainsKey("verbose"))
{
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Skipping folder {0} at {1}",
"[OGL-IAR]: Ordner {0} unter {1} wird übersprungen.",
inventoryFolder.Name, path);
}
return;
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
}
if (options.ContainsKey("verbose"))
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving folder {0}", inventoryFolder.Name);
m_log.InfoFormat("[OGL-IAR]: Sichere Ordner {0}.", inventoryFolder.Name);
if (saveThisFolderItself)
{
@@ -409,7 +409,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (null == inventoryFolder && null == inventoryItem)
{
// We couldn't find the path indicated
string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath);
string errorMessage = string.Format("Export abgebrochen: Inventarpfad {0} nicht gefunden.", m_invPath);
Exception e = new InventoryArchiverException(errorMessage);
m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e, 0, 0);
if(m_saveStream != null && m_saveStream.CanWrite)
@@ -420,7 +420,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_module?.TriggerInventoryArchiveProgress(m_id, "inventory", 0, 0);
m_archiveWriter = new TarArchiveWriter(m_saveStream);
m_log.InfoFormat("[INVENTORY ARCHIVER]: Adding control file to archive.");
m_log.Info("[OGL-IAR]: Archiv-Kontrolldatei wird geschrieben.");
// Write out control file. This has to be done first so that subsequent loaders will see this file first
// XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this
@@ -459,9 +459,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
int errors = m_assetGatherer.FailedUUIDs.Count;
m_log.DebugFormat(
"[INVENTORY ARCHIVER]: The items to save reference {0} possible assets", m_assetGatherer.GatheredUuids.Count + errors);
"[OGL-IAR]: Inventareinträge verweisen auf {0} mögliche Assets.", m_assetGatherer.GatheredUuids.Count + errors);
if(errors > 0)
m_log.DebugFormat("[INVENTORY ARCHIVER]: {0} of these have problems or are not assets and will be ignored", errors);
m_log.WarnFormat("[OGL-IAR]: {0} Referenzen sind beschädigt oder keine gültigen Assets und werden ausgelassen.", errors);
int assetTotal = m_assetGatherer.GatheredUuids.Count;
m_module?.TriggerInventoryArchiveProgress(m_id, "assets", 0, Math.Max(1, assetTotal));
@@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// </summary>
protected void SaveUsers()
{
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving user information for {0} users", m_userUuids.Count);
m_log.InfoFormat("[OGL-IAR]: Sichere Erstellerinformationen für {0} Benutzer.", m_userUuids.Count);
foreach (UUID creatorId in m_userUuids.Keys)
{
@@ -508,7 +508,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
}
else
{
m_log.WarnFormat("[INVENTORY ARCHIVER]: Failed to get creator profile for {0}", creatorId);
m_log.WarnFormat("[OGL-IAR]: Erstellerprofil für {0} konnte nicht geladen werden.", creatorId);
}
}
}
@@ -591,7 +591,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
minorVersion = 3;
}
m_log.InfoFormat("[INVENTORY ARCHIVER]: Creating version {0}.{1} IAR", majorVersion, minorVersion);
m_log.InfoFormat("[OGL-IAR]: Erzeuge IAR-Archivformat Version {0}.{1}.", majorVersion, minorVersion);
StringWriter sw = new StringWriter();
XmlTextWriter xtw = new XmlTextWriter(sw);
@@ -61,6 +61,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
// Only console jobs are printed; managed/API jobs use the progress event.
private readonly Dictionary<UUID, string> m_consoleProgressState = new Dictionary<UUID, string>();
private sealed class ConsoleIarJob
{
public string Action;
public string Archive;
public string Phase = "start";
public int Processed;
public int Total;
public int Percent;
public int LastDisplayedPercent = -1;
public string LastDisplayedPhase = "";
public DateTime Started = DateTime.UtcNow;
}
private readonly Dictionary<UUID, ConsoleIarJob> m_consoleJobs =
new Dictionary<UUID, ConsoleIarJob>();
private bool m_liveConsoleProgress = true;
/// <summary>
/// The file to load and save inventory if no filename has been specified
@@ -107,6 +124,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
public void Initialise(IConfigSource source)
{
m_liveConsoleProgress =
source?.Configs["Startup"]?.GetBoolean("OGLIarLiveProgress", true) ?? true;
}
public void AddRegion(Scene scene)
@@ -125,6 +144,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
OnInventoryArchiveLoaded += LoadInvConsoleCommandCompleted;
OnInventoryArchiveProgress += DisplayConsoleArchiveProgress;
scene.AddCommand(
"Archiving", this, "show iar progress",
"show iar progress",
"Aktiven IAR-Import oder -Export mit Prozenten, Zählern und Laufzeit anzeigen.",
"Zeigt den aktuellen Stand laufender IAR-Konsolenoperationen. " +
"Die lokale OpenGenesisLINK-Konsole aktualisiert ihren Status zusätzlich live.",
ShowConsoleIarProgress);
scene.AddCommand(
"Archiving", this, "load iar",
"load iar [-m|--merge] <first> <last> <inventory path> <password> [<IAR path>]",
@@ -235,49 +262,175 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
foreach (Action<UUID, string, int, int> handler in handlers.GetInvocationList())
{
try { handler(id, phase, processed, total); }
catch (Exception e) { m_log.Warn("[OGL-IAR] Progress listener failed.", e); }
catch (Exception e) { m_log.Warn("[OGL-IAR]: Fortschritts-Listener fehlgeschlagen.", e); }
}
}
private static string GermanIarPhase(string phase)
{
switch (phase)
{
case "inventory": return "Inventar erfassen";
case "inventory-complete": return "Inventar erfasst";
case "assets": return "Assets sichern";
case "import": return "Inventar importieren";
case "finalizing": return "Archiv abschließen";
default: return "Archiv verarbeiten";
}
}
private static int GetIarPercent(string phase, int processed, int total)
{
if (phase == "inventory-complete") return 40;
if (phase == "assets" && total > 0)
return 40 + (int)Math.Min(55L, (long)Math.Max(0, processed) * 55L / total);
if (phase == "import" && total > 0)
return 5 + (int)Math.Min(90L, (long)Math.Max(0, processed) * 90L / total);
if (phase == "finalizing") return 98;
return 5;
}
private static string ProgressBar(int percent)
{
int blocks = Math.Clamp(percent / 5, 0, 20);
return "[" + new string('#', blocks) + new string('-', 20 - blocks) + "]";
}
private static string LiveIarSummary(ConsoleIarJob job)
{
string counters = job.Total > 0
? " " + job.Processed + "/" + job.Total + (job.Phase == "assets" ? " Assets" : " Eintr.")
: " " + job.Processed + " bearbeitet";
int completed = Math.Clamp(job.Percent / 10, 0, 10);
string miniBar = "[" + new string('#', completed) +
new string('-', 10 - completed) + "]";
return "IAR " + job.Action + " " + miniBar + " " +
job.Percent + "% " + GermanIarPhase(job.Phase) + counters;
}
private void RefreshIarPrompt()
{
if (!m_liveConsoleProgress || MainConsole.Instance is not LocalConsole local)
return;
string status = string.Empty;
lock (m_pendingConsoleTasks)
{
// Multiple parallel archives remain individually queryable.
if (m_consoleJobs.Count == 1)
{
foreach (ConsoleIarJob job in m_consoleJobs.Values)
status = LiveIarSummary(job);
}
else if (m_consoleJobs.Count > 1)
status = "IAR: " + m_consoleJobs.Count + " Aufträge aktiv (show iar progress)";
}
try { local.UpdateOglIarProgress(status); }
catch (Exception e) { m_log.Debug("[OGL-IAR]: Live-Anzeige nicht verfügbar.", e); }
}
private void StartConsoleIarJob(UUID id, string action, string archive)
{
lock (m_pendingConsoleTasks)
{
m_pendingConsoleTasks.Add(id);
m_consoleJobs[id] = new ConsoleIarJob
{
Action = action,
Archive = archive
};
}
RefreshIarPrompt();
}
private void RemoveConsoleIarJob(UUID id)
{
lock (m_pendingConsoleTasks)
{
m_pendingConsoleTasks.Remove(id);
m_consoleJobs.Remove(id);
m_consoleProgressState.Remove(id);
}
RefreshIarPrompt();
}
private void ShowConsoleIarProgress(string module, string[] cmdparams)
{
lock (m_pendingConsoleTasks)
{
if (m_consoleJobs.Count == 0)
{
MainConsole.Instance.Output("[OGL-IAR]: Kein Import oder Export aktiv.");
return;
}
MainConsole.Instance.Output("[OGL-IAR]: Aktuelle Archivvorgänge:");
foreach (KeyValuePair<UUID, ConsoleIarJob> pair in m_consoleJobs)
{
ConsoleIarJob job = pair.Value;
string unit = job.Phase == "assets" ? "Assets" : "Einträge";
string counters = job.Total > 0
? job.Processed + "/" + job.Total + " " + unit
: job.Processed + " " + unit + " (Gesamtzahl noch unbekannt)";
MainConsole.Instance.Output(
"[OGL-IAR]: {0} | {1} | {2} {3}% | {4} | Laufzeit {5:n0} s | ID {6}",
job.Action, job.Archive, ProgressBar(job.Percent),
job.Percent, GermanIarPhase(job.Phase) + ": " + counters,
(DateTime.UtcNow - job.Started).TotalSeconds, pair.Key);
}
}
}
private void DisplayConsoleArchiveProgress(UUID id, string phase, int processed, int total)
{
int percent = GetIarPercent(phase, processed, total);
bool known = total > 0 || phase == "finalizing";
int percent = 0;
if (phase == "inventory-complete")
percent = 40;
else if (phase == "assets" && total > 0)
percent = 40 + (int)Math.Min(55L, (long)processed * 55L / total);
else if (phase == "import" && total > 0)
percent = 5 + (int)Math.Min(90L, (long)processed * 90L / total);
else if (phase == "finalizing")
percent = 98;
else if (phase == "inventory")
percent = 5;
int rounded = known ? percent / 5 * 5 : 0;
bool milestone = known || processed == 0 || processed % 250 == 0;
if (!milestone && phase != "finalizing" && phase != "inventory-complete")
return;
bool report;
bool liveUpdate;
lock (m_pendingConsoleTasks)
{
if (!m_pendingConsoleTasks.Contains(id))
if (!m_pendingConsoleTasks.Contains(id) ||
!m_consoleJobs.TryGetValue(id, out ConsoleIarJob job))
return;
string marker = phase + ":" + (known ? rounded.ToString() : processed == 0 ? "start" : (processed / 250).ToString());
if (m_consoleProgressState.TryGetValue(id, out string last) && last == marker)
return;
m_consoleProgressState[id] = marker;
job.Phase = phase;
job.Processed = Math.Max(0, processed);
job.Total = Math.Max(0, total);
job.Percent = percent;
liveUpdate = job.LastDisplayedPercent != percent ||
job.LastDisplayedPhase != phase ||
(total <= 0 && processed % 100 == 0);
if (liveUpdate)
{
job.LastDisplayedPercent = percent;
job.LastDisplayedPhase = phase;
}
int rounded = known ? percent / 5 * 5 : 0;
string marker = phase + ":" + (known
? rounded.ToString()
: processed == 0 ? "start" : (processed / 250).ToString());
report = !m_consoleProgressState.TryGetValue(id, out string previous)
|| previous != marker;
if (report)
m_consoleProgressState[id] = marker;
}
// The local console shows the newest value between log milestones,
// while log4net records only 5%-checkpoints as durable lines.
if (liveUpdate)
RefreshIarPrompt();
if (!report)
return;
if (phase == "finalizing")
m_log.Info("[OGL-IAR] Abschluss: Daten werden finalisiert und geprueft (98%).");
m_log.Info("[OGL-IAR]: Abschluss: Archiv wird finalisiert und geprüft (98 %).");
else if (known)
{
int blocks = rounded / 5;
m_log.InfoFormat("[OGL-IAR] {0} [{1}{2}] {3}% ({4}/{5} Eintraege)",
phase, new string('#', blocks), new string('-', 20 - blocks), rounded, processed, total);
}
m_log.InfoFormat("[OGL-IAR]: {0} {1} {2}% ({3}/{4} {5})",
GermanIarPhase(phase), ProgressBar(percent), percent,
processed, total, phase == "assets" ? "Assets" : "Einträge");
else
m_log.InfoFormat("[OGL-IAR] {0}: {1} Eintraege verarbeitet (Gesamtzahl noch unbekannt).", phase, processed);
m_log.InfoFormat("[OGL-IAR]: {0}: {1} Einträge bearbeitet (Gesamtzahl noch unbekannt).",
GermanIarPhase(phase), processed);
}
private void ForgetConsoleProgress(UUID id)
@@ -555,10 +708,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
return;
}
UUID id = UUID.Random();
try
{
UUID id = UUID.Random();
Dictionary<string, object> options = new Dictionary<string, object>();
OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; });
@@ -567,7 +719,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (mainParams.Count < 6)
{
m_log.Error(
"[INVENTORY ARCHIVER]: usage is load iar [-m|--merge] <first name> <last name> <inventory path> <user password> [<load file path>]");
"[OGL-IAR]: Syntax: load iar [-m|--merge] <Vorname> <Nachname> <Inventarpfad> <Passwort> [<Archivpfad>]");
return;
}
@@ -578,7 +730,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
string loadPath = (mainParams.Count > 6 ? mainParams[6] : DEFAULT_INV_BACKUP_FILENAME);
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Loading archive {0} to inventory path {1} for {2} {3}",
"[OGL-IAR]: Importiere Archiv {0} nach Inventarpfad {1} für {2} {3}.",
loadPath, invPath, firstName, lastName);
// The same bounded validator used by the managed API must run
@@ -587,33 +739,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_aScene?.RequestModuleInterface<IInventoryArchiveInspector>();
if (inspector == null)
{
m_log.Error("[OGL-IAR] Import abgelehnt: sichere IAR-Vorabpruefung nicht verfuegbar.");
m_log.Error("[OGL-IAR]: Import abgelehnt: Sichere IAR-Vorprüfung nicht verfügbar.");
return;
}
m_log.Info("[OGL-IAR] Pruefe Archivstruktur, Groessenlimits und TAR/GZip-Integritaet...");
m_log.Info("[OGL-IAR]: Prüfe Archivstruktur, Größenlimits und TAR/GZip-Integrität …");
if (!inspector.TryInspect(loadPath, out int expectedEntries, out string reason))
{
m_log.ErrorFormat("[OGL-IAR] Import abgelehnt: {0}", reason);
m_log.ErrorFormat("[OGL-IAR]: Import abgelehnt: {0}", reason);
return;
}
options["iar_total_entries"] = expectedEntries;
m_log.InfoFormat("[OGL-IAR] Archivpruefung erfolgreich: {0} Eintraege.", expectedEntries);
m_log.InfoFormat("[OGL-IAR]: Archivprüfung erfolgreich: {0} Einträge.", expectedEntries);
lock (m_pendingConsoleTasks)
m_pendingConsoleTasks.Add(id);
StartConsoleIarJob(id, "Import", loadPath);
if (!DearchiveInventory(id, firstName, lastName, invPath, pass, loadPath, options))
{
lock (m_pendingConsoleTasks)
{
m_pendingConsoleTasks.Remove(id);
m_consoleProgressState.Remove(id);
}
RemoveConsoleIarJob(id);
}
}
catch (InventoryArchiverException e)
catch (Exception e)
{
m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", e.Message);
RemoveConsoleIarJob(id);
m_log.Error("[OGL-IAR]: Import fehlgeschlagen.", e);
}
}
@@ -660,12 +808,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (mainParams.Count < 6)
{
m_log.Error(
"[INVENTORY ARCHIVER]: save iar [-h|--home=<url>] [--noassets] <first> <last> <inventory path> <password> [<IAR path>] [-c|--creators] [-e|--exclude=<name/uuid>] [-f|--excludefolder=<foldername/uuid>] [-v|--verbose]");
"[OGL-IAR]: Syntax: save iar [-h|--home=<URL>] [--noassets] <Vorname> <Nachname> <Inventarpfad> <Passwort> [<Archivpfad>] [-c|--creators] [-e|--exclude=<Name/UUID>] [-f|--excludefolder=<Ordner/UUID>] [-v|--verbose]");
return;
}
if (options.ContainsKey("home"))
m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -home option if you want to produce a compatible IAR");
m_log.Warn("[OGL-IAR]: Achtung: Mit -home erzeugte Archive sind nicht mit OpenSim 0.7.0.2 oder älter kompatibel.");
string firstName = mainParams[2];
string lastName = mainParams[3];
@@ -674,24 +822,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
string savePath = (mainParams.Count > 6 ? mainParams[6] : DEFAULT_INV_BACKUP_FILENAME);
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}",
"[OGL-IAR]: Exportiere Archiv {0} aus Inventarpfad {1} für {2} {3}.",
savePath, invPath, firstName, lastName);
lock (m_pendingConsoleTasks)
m_pendingConsoleTasks.Add(id);
StartConsoleIarJob(id, "Export", savePath);
if (!ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, options))
{
lock (m_pendingConsoleTasks)
{
m_pendingConsoleTasks.Remove(id);
m_consoleProgressState.Remove(id);
}
RemoveConsoleIarJob(id);
}
}
catch (InventoryArchiverException e)
catch (Exception e)
{
m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", e.Message);
RemoveConsoleIarJob(id);
m_log.Error("[OGL-IAR]: Export fehlgeschlagen.", e);
}
}
@@ -701,27 +845,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
lock (m_pendingConsoleTasks)
{
if (m_pendingConsoleTasks.Contains(id))
m_pendingConsoleTasks.Remove(id);
else
if (!m_pendingConsoleTasks.Contains(id))
return;
}
ForgetConsoleProgress(id);
RemoveConsoleIarJob(id);
if (succeeded)
{
m_log.Info("[OGL-IAR] [####################] 100% - Export abgeschlossen.");
m_log.Info("[OGL-IAR]: [####################] 100% – Exportvorgang abgeschlossen (Asset-Warnungen beachten).");
// Report success and include item count and filter count (Skipped items due to --perm or --exclude switches)
if(FilterCount == 0)
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saved archive with {0} items for {1} {2}", SaveCount, userInfo.FirstName, userInfo.LastName);
m_log.InfoFormat("[OGL-IAR]: Archiv für {1} {2} erfolgreich gespeichert: {0} Inventareinträge.", SaveCount, userInfo.FirstName, userInfo.LastName);
else
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saved archive with {0} items for {1} {2}. Skipped {3} items due to exclude and/or perm switches", SaveCount, userInfo.FirstName, userInfo.LastName, FilterCount);
m_log.InfoFormat("[OGL-IAR]: Archiv für {1} {2} gespeichert: {0} Inventareinträge, {3} durch Ausschluss- oder Berechtigungsfilter übersprungen.", SaveCount, userInfo.FirstName, userInfo.LastName, FilterCount);
}
else
{
m_log.ErrorFormat(
"[INVENTORY ARCHIVER]: Archive save for {0} {1} failed - {2}",
userInfo.FirstName, userInfo.LastName, reportedException.Message);
"[OGL-IAR]: Archivexport für {0} {1} fehlgeschlagen: {2}",
userInfo?.FirstName, userInfo?.LastName, reportedException?.Message ?? "Unbekannter Fehler");
}
}
@@ -731,23 +873,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
lock (m_pendingConsoleTasks)
{
if (m_pendingConsoleTasks.Contains(id))
m_pendingConsoleTasks.Remove(id);
else
if (!m_pendingConsoleTasks.Contains(id))
return;
}
ForgetConsoleProgress(id);
RemoveConsoleIarJob(id);
if (succeeded)
{
m_log.Info("[OGL-IAR] [####################] 100% - Import abgeschlossen.");
m_log.InfoFormat("[INVENTORY ARCHIVER]: Loaded {0} items from archive {1} for {2} {3}", LoadCount, invPath, userInfo.FirstName, userInfo.LastName);
m_log.Info("[OGL-IAR]: [####################] 100% – Import erfolgreich abgeschlossen.");
m_log.InfoFormat("[OGL-IAR]: {0} Inventareinträge aus Archiv nach {1} für {2} {3} importiert.", LoadCount, invPath, userInfo.FirstName, userInfo.LastName);
}
else
{
m_log.ErrorFormat(
"[INVENTORY ARCHIVER]: Archive load for {0} {1} failed - {2}",
userInfo.FirstName, userInfo.LastName, reportedException.Message);
"[OGL-IAR]: Archivimport für {0} {1} fehlgeschlagen: {2}",
userInfo?.FirstName, userInfo?.LastName, reportedException?.Message ?? "Unbekannter Fehler");
}
}
@@ -766,7 +906,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (null == account)
{
m_log.ErrorFormat(
"[INVENTORY ARCHIVER]: Failed to find user info for {0} {1}",
"[OGL-IAR]: Benutzerkonto für {0} {1} nicht gefunden.",
firstName, lastName);
return null;
}
@@ -781,14 +921,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
else
{
m_log.ErrorFormat(
"[INVENTORY ARCHIVER]: Password for user {0} {1} incorrect. Please try again.",
"[OGL-IAR]: Ungültiges Passwort für {0} {1}. Bitte erneut versuchen.",
firstName, lastName);
return null;
}
}
catch (Exception e)
{
m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e);
m_log.ErrorFormat("[OGL-IAR]: Passwortauthentifizierung fehlgeschlagen: {0}", e);
return null;
}
}
@@ -132,14 +132,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
else
{
m_log.Error(
$"[ARCHIVER]: Unrecognized asset type {asset.Type} with uuid {asset.ID}. This asset will be saved but may not load");
$"[ARCHIVER]: Unbekannter Asset-Typ {asset.Type} für UUID {asset.ID}. Das Asset wird gesichert, kann beim Import aber möglicherweise nicht geladen werden.");
m_archiveWriter.WriteFile($"{ArchiveConstants.ASSETS_PATH}{asset.FullID}", asset.Data);
}
m_assetsWritten++;
if (m_assetsWritten % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0)
m_log.Info($"[ARCHIVER]: Added {m_assetsWritten} assets to archive");
// Detailed milestones are debug-only; OGL-IAR already provides
// a summarized 5% progress line and a live terminal indicator.
m_log.Debug($"[ARCHIVER]: {m_assetsWritten} Assets dem Archiv hinzugefügt.");
}
}
}
@@ -160,7 +160,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
sbyte assetType = kvp.Value;
if (asset != null && assetType == (sbyte)AssetType.Unknown)
{
m_log.InfoFormat("[ARCHIVER]: Rewriting broken asset type for {0} to {1}", thiskey, SLUtil.AssetTypeFromCode(assetType));
m_log.InfoFormat("[ARCHIVER]: Korrigiere beschädigten Asset-Typ für {0} auf {1}.", thiskey, SLUtil.AssetTypeFromCode(assetType));
asset.Type = assetType;
}
@@ -175,13 +175,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
catch (Exception e)
{
m_log.ErrorFormat("[ARCHIVER]: Execute failed with {0}", e);
m_log.ErrorFormat("[ARCHIVER]: Verarbeitung fehlgeschlagen: {0}", e);
}
finally
{
// Includes missing/damaged assets so the progress denominator is accurate.
try { m_progressCallback?.Invoke(++m_assetsProcessed, m_repliesRequired); }
catch (Exception e) { m_log.Warn("[ARCHIVER]: Asset progress callback failed.", e); }
catch (Exception e) { m_log.Warn("[ARCHIVER]: Asset-Fortschrittsrückmeldung fehlgeschlagen.", e); }
}
}
@@ -189,11 +189,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
int totalerrors = m_notFoundAssetUuids.Count + m_previousErrorsCount;
if(m_timeout)
m_log.DebugFormat("[ARCHIVER]: Aborted because AssetService request timeout. Successfully added {0} assets", m_foundAssetUuids.Count);
m_log.WarnFormat("[ARCHIVER]: Zeitüberschreitung beim AssetService. Bis zum Abbruch wurden {0} Assets gesichert.", m_foundAssetUuids.Count);
else if(totalerrors == 0)
m_log.DebugFormat("[ARCHIVER]: Successfully added all {0} assets", m_foundAssetUuids.Count);
m_log.DebugFormat("[ARCHIVER]: Alle {0} angeforderten Assets wurden gesichert.", m_foundAssetUuids.Count);
else
m_log.DebugFormat("[ARCHIVER]: Successfully added {0} assets ({1} of total possible assets requested were not found, were damaged or were not assets)",
m_log.WarnFormat("[ARCHIVER]: {0} Assets gesichert; {1} angeforderte Einträge waren nicht auffindbar, beschädigt oder keine gültigen Assets (Archiv möglicherweise unvollständig).",
m_foundAssetUuids.Count, totalerrors);
GC.Collect();
+3
View File
@@ -40,6 +40,9 @@
PrivatePort = "8003"
[Startup]
; IAR-Fortschritt live neben der lokalen Konsolen-Eingabe anzeigen.
; Remote-Konsole: show iar progress (manuelle Live-Abfrage).
OGLIarLiveProgress = true
meshing = Meshmerizer
physics = BulletSim
EnableCertConverter = false
@@ -0,0 +1,83 @@
# OGL 0.9.3.12 – IAR-Konsole: deutsche Meldungen und Live-Fortschritt
## Funktionsumfang
Die klassische OpenGenesisLINK-Simulatorkonsole zeigt beim IAR-Export und
-Import die Fortschrittsphasen auf Deutsch. Beispiele:
```text
[OGL-IAR]: Exportiere Archiv backup.iar aus Inventarpfad / für Muster Resident.
[OGL-IAR]: Inventar erfassen: 474 Einträge bearbeitet (Gesamtzahl noch unbekannt).
[OGL-IAR]: Inventar erfasst [########------------] 40% (474/474 Einträge)
[OGL-IAR]: Assets sichern [#############-------] 65% (1288/2832 Assets)
[OGL-IAR]: Abschluss: Archiv wird finalisiert und geprüft (98 %).
[OGL-IAR]: [####################] 100% – Exportvorgang abgeschlossen (Asset-Warnungen beachten).
[OGL-IAR]: Archiv für Muster Resident erfolgreich gespeichert: 474 Inventareinträge.
```
**Live-Anzeige:** Beim aktiven IAR-Vorgang wird der Status in der
interaktiven **lokalen Simulator-Konsole** direkt neben dem Prompt
aktualisiert (kompakter 10-Segmente-Balken und Prozentzahl).
Das geschieht etwa bei jeder Prozentänderung, ohne tausende
neue Logzeilen zu erzeugen. Der eingegebene Befehl und der Cursor bleiben
erhalten. In sehr schmalen Terminalfenstern wird die Anzeige gekürzt oder
ausgeblendet. Die Logzeilen bleiben unabhängig davon alle fünf Prozent
als dauerhaftes Protokoll erhalten.
Die Anzeige lässt sich in `[Startup]` konfigurieren:
```ini
[Startup]
OGLIarLiveProgress = true
```
Mit `false` wird ausschließlich die Live-Anzeige im lokalen Prompt
deaktiviert; die Protokoll-Fortschrittsmeldungen und Archivvorgänge
bleiben erhalten.
**Jederzeit abfragen (auch in Remote-Konsolen):**
```text
show iar progress
```
Der Befehl zeigt laufende IAR-Konsolenjobs mit Archivdatei,
Verarbeitungsphase, Prozentanzeige, Eintragszähler, Laufzeit und
interner Auftrags-ID. Bei mehreren parallelen Jobs werden alle aufgelistet;
die lokale Statusanzeige verweist dann auf den Abfragebefehl.
## Warnungen
Die Ausgabe des gemeinsamen `AssetsArchiver` im Abstand von 100 Assets
wurde von INFO auf DEBUG reduziert und übersetzt. Dadurch konkurrieren
die Meldungen nicht mehr mit dem OGL-IAR-Fortschritt.
Fehlende, beschädigte oder nicht erkannte Assets bleiben **sichtbar**:
Die WARN-Zeile nennt deren Anzahl. Ein IAR kann technisch erfolgreich
gespeichert sein, obwohl das Archiv wegen solcher Referenzen inhaltlich
unvollständig ist. Das wird ausdrücklich vermerkt und darf nicht als
vollständiger Backup-Restore-Nachweis gewertet werden.
Die **100-%-Meldung** wird ausschließlich aus dem Abschlussereignis
ausgegeben, nicht allein weil die Asset-Verarbeitung 95 % erreicht hat.
Sie bedeutet ein technisch abgeschlossenes Schreiben des Archivs;
Integritäts- und Restore-Tests bleiben separat erforderlich.
## Abnahme
```bash
python3 tools/ci/verify_iar_progress.py
dotnet build OpenSim.sln -c Release
```
Live-Test auf isolierter Entwicklungsregion mit `save iar` und `load iar`:
1. Beobachte Fortschrittsprompt und 5-%-Logcheckpoints.
2. Während eines laufenden Exports `show iar progress` eingeben.
3. Sicherstellen, dass der Status nach Abschluss wieder verschwindet.
4. Beschädigtes Asset oder defekte IAR in einem isolierten Testkonto
überprüfen; WARN beziehungsweise sichere Importablehnung erwarten.
5. Normale und Remote-Konsole sowie schmale Terminalfenster gegenprüfen.
Diese Codeänderungen ersetzen **nicht** den manuellen IAR01–03-RC1-Test
unter einem realen OpenGenesisLINK-Simulator.
+12 -2
View File
@@ -4,6 +4,8 @@ from pathlib import Path
root=Path(__file__).resolve().parents[2]
paths={
"contract": "OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs",
"console": "OpenSim/Framework/Console/LocalConsole.cs",
"asset_writer": "OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs",
"module": "OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs",
"reader": "OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs",
"writer": "OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs",
@@ -14,10 +16,14 @@ paths={
src={k:(root / p).read_text() for k,p in paths.items()}
required={
"contract":["interface IInventoryArchiverProgress","interface IInventoryArchiveInspector","OnInventoryArchiveProgress"],
"module":["IInventoryArchiverProgress","DisplayConsoleArchiveProgress","TryInspect(loadPath","iar_total_entries","TriggerInventoryArchiveProgress","ArchiveInventory(id, firstName","DearchiveInventory(id, firstName"],
"console":["UpdateOglIarProgress","m_oglIarStatus","LockOutput();","m_lastOglIarStatusLength"],
"asset_writer":["Assets dem Archiv hinzugefügt","m_log.Debug"],
"module":["IInventoryArchiverProgress","DisplayConsoleArchiveProgress","TryInspect(loadPath","iar_total_entries","TriggerInventoryArchiveProgress","ArchiveInventory(id, firstName","DearchiveInventory(id, firstName",
'show iar progress', 'RefreshIarPrompt()', 'OGLIarLiveProgress', 'RemoveConsoleIarJob(id)', 'm_consoleJobs.TryGetValue(id', 'OGL-IAR'],
"reader":["ExpectedEntries","m_entriesProcessed","TriggerInventoryArchiveProgress(m_id, \"import\"","TriggerInventoryArchiveProgress(m_id, \"finalizing\""],
"writer":["TriggerInventoryArchiveProgress(m_id, \"inventory\"","TriggerInventoryArchiveProgress(m_id, \"assets\"","ReceivedAllAssets"],
"assets":["m_progressCallback","finally","++m_assetsProcessed"],
"assets":["m_progressCallback","finally","++m_assetsProcessed",
"angeforderte Einträge waren nicht auffindbar"],
"inspector":["IInventoryArchiveInspector","OglIarInspector.Inspect(archivePath)","RegisterModuleInterface<IInventoryArchiveInspector>"],
"manager":["m_ProgressSource.OnInventoryArchiveProgress","HandleProgress","inspection.Entries","operation.ProgressPercent = 100","operation.ProgressPhase = \"completed\""],
}
@@ -28,4 +34,8 @@ for file, tokens in required.items():
module=src["module"]
assert module.index("inspector.TryInspect(loadPath") < module.index("DearchiveInventory(id, firstName, lastName, invPath, pass, loadPath, options)")
assert 'm_consoleProgressState.Remove(id)' in module
assert 'if (succeeded)' in module and '100% – Exportvorgang abgeschlossen' in module
assert 'if (liveUpdate)' in module and 'if (!report)' in module
assert 'm_pendingConsoleTasks.Contains(id)' in module
assert 'OGLIarLiveProgress = true' in (root / 'bin/OpenSim.ini.example').read_text()
print("OpenGenesisLINK console IAR progress and bounded preflight wiring: OK")