Browse Source

Исправлен запуск emerge --metadata. Добавлено логгирование

tags/3.2.0_alpha12
Mike khiretskiy 7 years ago
parent
commit
d28b4d7de4
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      update/update.py

+ 6
- 2
update/update.py View File

@@ -234,11 +234,15 @@ class Update:
if not emerge:
raise UpdateError(_("The Emerge tool is not found"))
self.addProgress()
p = PercentProgress(emerge, "--metadata", part=1, atty=True)
p = PercentProgress(emerge, "--ask=n", "--metadata", part=1, atty=True)
for perc in p.progress():
self.setProgress(perc)
if p.failed():
raise UpdateError(_("Failed to update metadata"), addon=p.read())
data = p.read()
with open('/var/log/calculate/failed-metadata-%d.log' % time.time(),
'w') as f:
f.write(data+p.alldata)
raise UpdateError(_("Failed to update metadata"), addon=data)
return True

def eixUpdate(self):


Loading…
Cancel
Save