modules/admin-full: improve opkg error reporting
This commit is contained in:
parent
275470fe63
commit
e4a3fd177c
3 changed files with 55 additions and 4 deletions
|
@ -110,6 +110,25 @@ a_s_packages_search = 'Find package'
|
||||||
a_s_packages_update = 'Package lists updated'
|
a_s_packages_update = 'Package lists updated'
|
||||||
a_s_packages_updatelist = 'Update package lists'
|
a_s_packages_updatelist = 'Update package lists'
|
||||||
a_s_packages_upgrade = 'Upgrade installed packages'
|
a_s_packages_upgrade = 'Upgrade installed packages'
|
||||||
|
a_s_packages_code1 = 'Could not set default destination'
|
||||||
|
a_s_packages_code2 = 'Error parsing config file'
|
||||||
|
a_s_packages_code3 = 'Could not create temporary directory (ran out of space?)'
|
||||||
|
a_s_packages_code4 = 'Could not get adminstrative lock (ran out of space?)'
|
||||||
|
a_s_packages_code5 = 'Unsatisfied Dependencies'
|
||||||
|
a_s_packages_code6 = 'Refused to remove essential package'
|
||||||
|
a_s_packages_code7 = 'Package has dependents'
|
||||||
|
a_s_packages_code8 = 'Package has no installation candidate (wrong name?)'
|
||||||
|
a_s_packages_code9 = 'Package has no available architecture '
|
||||||
|
a_s_packages_code10 = 'Package is not trusted'
|
||||||
|
a_s_packages_code11 = 'Error while downloading'
|
||||||
|
a_s_packages_code12 = 'Conflicts with other packages'
|
||||||
|
a_s_packages_code13 = 'Package is already installed'
|
||||||
|
a_s_packages_code14 = 'Package has unresolved dependencies'
|
||||||
|
a_s_packages_code15 = 'Refused to downgrade package'
|
||||||
|
a_s_packages_code16 = 'Package manager ran out of space'
|
||||||
|
a_s_packages_code17 = 'Bad signature while verifiying package'
|
||||||
|
a_s_packages_code18 = 'MD5 error while verifiying package'
|
||||||
|
a_s_packages_code19 = 'Internal error occured'
|
||||||
a_s_p_ipkg_pkglists = 'Package lists'
|
a_s_p_ipkg_pkglists = 'Package lists'
|
||||||
a_s_p_ipkg_targets = 'Installation targets'
|
a_s_p_ipkg_targets = 'Installation targets'
|
||||||
a_s_changepw1 = 'Change the password of the system administrator (User <code>root</code>)'
|
a_s_changepw1 = 'Change the password of the system administrator (User <code>root</code>)'
|
||||||
|
|
|
@ -80,6 +80,25 @@ a_s_packages_search = 'Paket suchen'
|
||||||
a_s_packages_update = 'Paketlisten aktualisieren'
|
a_s_packages_update = 'Paketlisten aktualisieren'
|
||||||
a_s_packages_updatelist = 'Paketlisten aktualisieren'
|
a_s_packages_updatelist = 'Paketlisten aktualisieren'
|
||||||
a_s_packages_upgrade = 'Installierte Pakete aktualisieren'
|
a_s_packages_upgrade = 'Installierte Pakete aktualisieren'
|
||||||
|
a_s_packages_code1 = 'Konnte das Zielverzeichnis nicht auswählen'
|
||||||
|
a_s_packages_code2 = 'Fehler beim Lesen der Konfigurationsdatei'
|
||||||
|
a_s_packages_code3 = 'Konnte kein temporäres Verzeichnis erstellen (kein Platz mehr frei?)'
|
||||||
|
a_s_packages_code4 = 'Konnte keine Lock-Datei erzeugen (kein Platz mehr frei?)'
|
||||||
|
a_s_packages_code5 = 'Ein oder mehrere Abhängigkeiten konnten nicht aufgelöst werden'
|
||||||
|
a_s_packages_code6 = 'Deinstallation von essentiellem Paket verweigert'
|
||||||
|
a_s_packages_code7 = 'Andere Pakete hängen noch von diesem Paket ab'
|
||||||
|
a_s_packages_code8 = 'Paket hat keinen Installationskandidaten (falscher Name?)'
|
||||||
|
a_s_packages_code9 = 'Paket hat keine verfügbare Architektur definiert'
|
||||||
|
a_s_packages_code10 = 'Das Paket ist nicht vertrauenswürdig'
|
||||||
|
a_s_packages_code11 = 'Fehler beim Herunterladen'
|
||||||
|
a_s_packages_code12 = 'Konflikte mit anderem Paket'
|
||||||
|
a_s_packages_code13 = 'Paket ist bereits installiert'
|
||||||
|
a_s_packages_code14 = 'Ein oder mehrere Abhängigkeiten konnten nicht aufgelöst werden'
|
||||||
|
a_s_packages_code15 = 'Installation von älterer Paketversion verweigert'
|
||||||
|
a_s_packages_code16 = 'Nicht genug verfügbarer Arbeitsspeicher'
|
||||||
|
a_s_packages_code17 = 'Kaputte Signatur beim Versuch das Paket zu verifizieren'
|
||||||
|
a_s_packages_code18 = 'Falsche Prüfsumme beim Versuch das Paket zu verifizieren'
|
||||||
|
a_s_packages_code19 = 'Interner Fehler aufgetreten'
|
||||||
a_s_reboot1 = 'Startet das Betriebssystem des Routers neu.'
|
a_s_reboot1 = 'Startet das Betriebssystem des Routers neu.'
|
||||||
a_s_reboot_do = 'Neustart durchführen'
|
a_s_reboot_do = 'Neustart durchführen'
|
||||||
a_s_reboot_running = 'Bitte warten: Neustart wird durchgeführt...'
|
a_s_reboot_running = 'Bitte warten: Neustart wird durchgeführt...'
|
||||||
|
|
|
@ -13,11 +13,24 @@ $Id$
|
||||||
|
|
||||||
-%>
|
-%>
|
||||||
<%-
|
<%-
|
||||||
|
local bit = require "bit"
|
||||||
local rowcnt = 1
|
local rowcnt = 1
|
||||||
|
|
||||||
function rowstyle()
|
function rowstyle()
|
||||||
rowcnt = rowcnt + 1
|
rowcnt = rowcnt + 1
|
||||||
return (rowcnt % 2) + 1
|
return (rowcnt % 2) + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function opkg_error(code)
|
||||||
|
code = bit.rshift(tonumber(code), 8)
|
||||||
|
return translate(
|
||||||
|
'a_s_packages_code%i' % code,
|
||||||
|
translate(
|
||||||
|
'a_s_packages_code%i' % code,
|
||||||
|
'%s %i' % { translate('code'), code }
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
-%>
|
-%>
|
||||||
<%+header%>
|
<%+header%>
|
||||||
<h2><a id="content" name="content"><%:system%></a></h2>
|
<h2><a id="content" name="content"><%:system%></a></h2>
|
||||||
|
@ -28,16 +41,16 @@ end
|
||||||
<% if install or remove or update or upgrade then %>
|
<% if install or remove or update or upgrade then %>
|
||||||
<div class="code"><strong><%:status%>:</strong><br />
|
<div class="code"><strong><%:status%>:</strong><br />
|
||||||
<% if update then %>
|
<% if update then %>
|
||||||
<%:a_s_packages_update%>: <% if update == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=update%>)</span><% end %><br />
|
<%:a_s_packages_update%>: <% if update == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(update)%>)</span><% end %><br />
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if upgrade then%>
|
<% if upgrade then%>
|
||||||
<%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=upgrade%>)</span><% end %><br />
|
<%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(upgrade)%>)</span><% end %><br />
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if install then for k,v in pairs(install) do %>
|
<% if install then for k,v in pairs(install) do %>
|
||||||
<%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
|
<%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(v)%>)</span><% end %><br />
|
||||||
<% end end %>
|
<% end end %>
|
||||||
<% if remove then for k,v in pairs(remove) do %>
|
<% if remove then for k,v in pairs(remove) do %>
|
||||||
<%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
|
<%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(v)%>)</span><% end %><br />
|
||||||
<% end end %>
|
<% end end %>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Reference in a new issue