mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-22 13:00:40 +08:00
fix repod bugs
This commit is contained in:
parent
f93e9cfebf
commit
fda13dd539
1 changed files with 14 additions and 12 deletions
26
repod.py
26
repod.py
|
@ -98,7 +98,7 @@ class pushFm:
|
||||||
else returns an error string
|
else returns an error string
|
||||||
'''
|
'''
|
||||||
if [f for f in fnames if not (f.endswith(PKG_SUFFIX) or f.endswith(PKG_SIG_SUFFIX))]:
|
if [f for f in fnames if not (f.endswith(PKG_SUFFIX) or f.endswith(PKG_SIG_SUFFIX))]:
|
||||||
return "file to upload are garbage"
|
return "files to upload are garbage"
|
||||||
filter_sig = lambda fnames:[fname for fname in fnames if not fname.endswith(PKG_SIG_SUFFIX)]
|
filter_sig = lambda fnames:[fname for fname in fnames if not fname.endswith(PKG_SIG_SUFFIX)]
|
||||||
if sorted(filter_sig(fnames)) == sorted(filter_sig(self.fnames)):
|
if sorted(filter_sig(fnames)) == sorted(filter_sig(self.fnames)):
|
||||||
try:
|
try:
|
||||||
|
@ -122,20 +122,22 @@ class pushFm:
|
||||||
print_exc_plus()
|
print_exc_plus()
|
||||||
return ret
|
return ret
|
||||||
else:
|
else:
|
||||||
try:
|
# gpg verify success
|
||||||
if update(overwrite=overwrite):
|
continue
|
||||||
continue
|
|
||||||
else:
|
|
||||||
raise RuntimeError('update return false')
|
|
||||||
except Exception:
|
|
||||||
print_exc_plus()
|
|
||||||
return f'{pkg_found} update error'
|
|
||||||
else:
|
else:
|
||||||
return f'file missing: pkg {pkg_found} sig {sig_found}'
|
return f'file missing: pkg {pkg_found} sig {sig_found}'
|
||||||
return "unexpected error"
|
raise RuntimeError("unexpected error")
|
||||||
else:
|
else:
|
||||||
# success
|
# gpg verified for all
|
||||||
return None
|
try:
|
||||||
|
if update(overwrite=overwrite):
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
raise RuntimeError('update return false')
|
||||||
|
except Exception:
|
||||||
|
print_exc_plus()
|
||||||
|
return f'{pkg_found} update error'
|
||||||
|
raise RuntimeError("unexpected error")
|
||||||
finally:
|
finally:
|
||||||
self.__init__()
|
self.__init__()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue