ValueError during fdroid repo update
Opened this issue · 2 comments
tigre-bleu commented
A failure is triggered when an apk is downloaded:
/usr/share/gplayweb/static
Download complete
Traceback (most recent call last):
File "/usr/local/bin/gplayweb", line 173, in updateFdroidRepo
self.fdroid_update.create_metadata_and_update()
File "/usr/local/lib/python2.7/dist-packages/fdroidserver-0.4.0-py2.7.egg/fdroidserver/update.py", line 1022, in create_metadata_and_update
main(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/fdroidserver-0.4.0-py2.7.egg/fdroidserver/update.py", line 1154, in main
apks, cachechanged = scan_apks(apps, apkcache, repodirs[0], knownapks)
File "/usr/local/lib/python2.7/dist-packages/fdroidserver-0.4.0-py2.7.egg/fdroidserver/update.py", line 552, in scan_apks
dt_obj = datetime(*info.date_time)
ValueError: month must be in 1..12
It's probably the same kind of reason as in #199
It seems fixed in fdroidserver 0.7 but the fork for gplayweb is 0.4.
Is fdroidserver 0.7 now compatible with gplayweb without needing a modification?
matlink commented
Well I don't know. The best way to figure it out is to try.
Sorry but don't expect me to maintain gplayweb very often as I lack time
to manage it.
However I'm open to discussion and pull requests.
tigre-bleu commented
No problem.
A dirty workaround is to comment line 552 to 557 of /usr/local/lib/python2.7/dist-packages/fdroidserver-0.4.0-py2.7.egg/fdroidserver/update.py
# if an APK has files newer than the system time, suggest updating
# the system clock. This is useful for offline systems, used for
# signing, which do not have another source of clock sync info. It
# has to be more than 24 hours newer because ZIP/APK files do not
# store timezone info
info = apk.getinfo('AndroidManifest.xml')
#dt_obj = datetime(*info.date_time)
#checkdt = dt_obj - timedelta(1)
#if datetime.today() < checkdt:
# logging.warn('System clock is older than manifest in: '
# + apkfilename + '\nSet clock to that time using:\n'
# + 'sudo date -s "' + str(dt_obj) + '"')
The commented part does not look vital to fdroidserver and the repo is correctly updated by gplayweb.