Обновился в понедельник и всё сломалось с ошибкой в cl-update:
* Syncing the Dsystem-overlay repository /Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/calculate/core/server/func.py", line 754, in run
res = method(*args)
File "/usr/lib/python3.10/site-packages/calculate/update/update.py", line 602, in syncOtherRepository
os.replace(os.path.join(rpath, d), os.path.join(rpath_old, f))
UnboundLocalError: local variable 'd' referenced before assignment
...
* UnboundLocalError:local variable 'd' referenced before assignment(calculate.update.update:602)
* Update failed
Сунулся я туда, а там классический прохлоп ушами.
Казалось бы, что в этом коде неправильно:
if Git.is_git(rpath):
self.addProgress()
p = PercentProgress(emerge, "--sync", repname, part=1, atty=True)
for perc in p.progress():
self.setProgress(perc)
else:
for root, dirs, files in os.walk(rpath):
for f in files:
os.replace(os.path.join(rpath, d), os.path.join(rpath_old, f))
for d in dirs:
shutil.move(os.path.join(rpath, d), os.path.join(rpath_old, d))
Да, фикс был, но я не мог до фикса обновиться, так что пришлось os.replace(os.path.join(rpath, d), os.path.join(rpath_old, f))
фиксить ручкам.
Однако после обновления кривой код в update.py
так и остался, только теперь не выполняется.