Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError during fdroid repo update #16

Open
tigre-bleu opened this issue Jan 5, 2017 · 2 comments
Open

ValueError during fdroid repo update #16

tigre-bleu opened this issue Jan 5, 2017 · 2 comments

Comments

@tigre-bleu
Copy link

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
Copy link
Owner

matlink commented Jan 5, 2017 via email

@tigre-bleu
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants