You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.6 KiB
37 lines
1.6 KiB
diff --git update/update.py update/update.py
|
|
index 19a1fe2..0181cfd 100644
|
|
--- update/update.py
|
|
+++ update/update.py
|
|
@@ -169,10 +169,10 @@ class Update:
|
|
branch, cb_progress=self.setProgress)
|
|
removeDir(rpath)
|
|
os.rename(rpath_new, rpath)
|
|
- except OSError:
|
|
- raise UpdateError(_("Permission denied to modify the "
|
|
+ except OSError as e:
|
|
+ raise UpdateError(_("Failed to modify the "
|
|
"{repname} repository").format(
|
|
- repname=repname))
|
|
+ repname=repname)+":"+str(e))
|
|
finally:
|
|
if path.exists(rpath_new):
|
|
removeDir(rpath_new)
|
|
@@ -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):
|