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

[feat] Friendly filename #5268

Merged
merged 1 commit into from Aug 26, 2019

Conversation

@Frenzie
Copy link
Member

commented Aug 26, 2019

Changes Cervantes, Kindle, Kobo, Pocketbook, and Sony to the following format:

koreader-kobo-v2018.11.1.zip
koreader-kobo-debug-v2018.11.1.zip

Changes Android to the following format:

koreader-android-arm-v2019.09.apk
koreader-android-arm-debug-v2019.09.apk
koreader-android-x86-v2019.09.apk
koreader-android-x86-debug-v2019.09.apk

Fixes #4297.

[feat] Friendly filename
Changes Cervantes, Kindle, Kobo and Pocketbook to the following format:

```
koreader-kobo-v2018.11.1.zip
koreader-kobo-debug-v2018.11.1.zip
```

Changes Android to the following format:
```
koreader-android-arm-v2019.09.apk
koreader-android-arm-debug-v2019.09.apk
koreader-android-x86-v2019.09.apk
koreader-android-x86-debug-v2019.09.apk
```

Fixes <#4297>.

@Frenzie Frenzie added this to the 2019.09 milestone Aug 26, 2019

@NiLuJe

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

Does that work with zsync/OTAs?

@Frenzie

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2019

Yes, OTA determines whether a version is newer with Version:getNormalizedVersion(), which itself was abstracted away from its predecessor introduced in #1160.

tl;dr It's compatible with OTA updating from 2014.11.

(Except for the specific example of v2018.11.1 due to the point release, cf. #4308.)

@Frenzie

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2019

If anything this actually makes it more like the OTA. Because it checks these files, note their names:

koreader-android-fdroid-latest                     10-Aug-2019 07:13                  14
koreader-android-latest-nightly                    26-Aug-2019 06:36                  74
koreader-android-latest-stable                     10-Aug-2019 07:19                  51
koreader-android-x86-latest-nightly                26-Aug-2019 06:37                  71
koreader-android-x86-latest-stable                 10-Aug-2019 07:19                  48
koreader-appimage-latest-nightly                   26-Aug-2019 06:38                  75
koreader-appimage-latest-stable                    10-Aug-2019 07:21                  52
koreader-cervantes-latest-nightly.zsync            26-Aug-2019 06:37              410402
koreader-cervantes-latest-stable.zsync             10-Aug-2019 07:20              410369
koreader-kindle-latest-nightly.zsync               26-Aug-2019 06:37              415123
koreader-kindle-latest-stable.zsync                10-Aug-2019 07:19              415239
koreader-kindle-legacy-latest-nightly.zsync        26-Aug-2019 06:37              440843
koreader-kindle-legacy-latest-stable.zsync         10-Aug-2019 07:20              440544
koreader-kobo-latest-nightly.zsync                 26-Aug-2019 06:38              415085
koreader-kobo-latest-stable.zsync                  10-Aug-2019 07:20              415061
koreader-pocketbook-latest-nightly.zsync           26-Aug-2019 06:37              406406
koreader-pocketbook-latest-stable.zsync            10-Aug-2019 07:19              405891
koreader-sony-prstux-latest-nightly.zsync          26-Aug-2019 06:38              349511
koreader-sony-prstux-latest-stable.zsync           10-Aug-2019 07:21              351121

And then it reads the version (here v2019.08-51-gba8099f) from the first few lines to determine if it's newer:

zsync: 0.6.2
Filename: koreader-sony-prstux-arm-linux-gnueabihf-v2019.08-51-gba8099f_2019-08-25.targz
MTime: Mon, 26 Aug 2019 06:25:57 +0000
Blocksize: 2048
Length: 59740160
Hash-Lengths: 2,2,5
Z-URL: koreader-sony-prstux-arm-linux-gnueabihf-v2019.08-51-gba8099f_2019-08-25.targz
SHA-1: fa8ebe660671e64384943acf3a9bede5a806711e
Z-Map2: 36241

It doesn't care what else the filename says, as long as v2019.08-51 is higher than the currently installed version it'll be happy. And if it's lower we recently-ish introduced the "downgrade" functionality so even that wouldn't necessarily be a problem, but still one that's better to avoid.

@pazos
pazos approved these changes Aug 26, 2019
Copy link
Contributor

left a comment

Cool!

Can we merge this ASAP? If so I can use ANDROID_ARCH value to copy libraries into the expected folder under platform/android/luajit-launcher/libs/$(ANDROID_ARCH)

@Frenzie Frenzie merged commit 8e38b1c into koreader:master Aug 26, 2019

1 check passed

ci/circleci: build Your tests passed on CircleCI!
Details
@Frenzie

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2019

I was going to sleep on it for a night, but alright, we're still safely in "nightly can break a little" territory.

@Frenzie Frenzie deleted the Frenzie:friendly-filename branch Aug 26, 2019

@Frenzie

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2019

PS While the nightly on the device is fine, not all files will make it onto the server.

I just updated GitLab so it should get all the artifacts:
https://gitlab.com/koreader/nightly-builds/commit/ee35c82f21e3a96246f3930754ac15375331e6c7

But it won't happen on the nightly server. It's not looking for x86 and one of the - needs to be made optional.
https://github.com/koreader/koreader-misc/blob/cc6a7a0d81a4f59dba237e57be7b259c00f7799d/nightswatcher/nightswatcher.py#L48

Not sure if I'll get around to updating that today. But I will check in a half hour to see precisely how it failed.

Frenzie added a commit to Frenzie/koreader that referenced this pull request Aug 26, 2019
Frenzie added a commit that referenced this pull request Aug 26, 2019
Frenzie added a commit to Frenzie/koreader-misc that referenced this pull request Aug 26, 2019
Frenzie added a commit to koreader/koreader-misc that referenced this pull request Aug 26, 2019
Frenzie added a commit that referenced this pull request Aug 27, 2019
[chore] Makefile cleanups (#5273)
I overlooked the Kindle cleanup line in #5268, but that kind of thing is what variables are made for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.