Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-29-2019, 12:31 PM   #16
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
No explicit reason was given in https://github.com/koreader/koreader-base/pull/212 but our current tar command is a far cry from anything supported by busybox in any case.

busybox tar should suffice for simpler stuff like dictionary/OCR download, but we need a way to handle tar on Android regardless.
Frenzie is offline   Reply With Quote
Old 04-29-2019, 01:22 PM   #17
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
busybox's tar doesn't support checkpoints, and/or isn't actually there on some target platforms, and/or doesn't support something else that I can't remember OTOH.
If its only the checkpoints this could suffice with some modification.
Code:
untar_progress(){
  local total=$(tar -ztf "$1" |wc -l)
  local step=$((total/100));[ $step -gt 1 ] || step=1
  tar -zxvf $@ | awk -v total=$total -v step=$step \
    'BEGIN {ORS="\n"} {if(NR%step==0) system("fbink -qe -y5 -P" int(NR*100/total))}'
}

untar_progress file.tar
I always forget its multiplatform
BloodRagg is offline   Reply With Quote
Old 04-29-2019, 02:02 PM   #18
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
IIRC, there are also some Kindle-specific concerns with the busybox tar version they ship.

Plus, I'd rather not touch the checkpoints code, it was already annoying enough to get right, and has ties to the OTA manager, which we really want to make sure behaves consistently across all supported platforms.

Also, compared to DIY approaches, it has the advantage of being actually linear, as it's based on data length, and not file amounts .

Last edited by NiLuJe; 04-29-2019 at 02:06 PM.
NiLuJe is offline   Reply With Quote
Old 04-29-2019, 02:39 PM   #19
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
IIRC, there are also some Kindle-specific concerns with the busybox tar version they ship.

Plus, I'd rather not touch the checkpoints code, it was already annoying enough to get right, and has ties to the OTA manager, which we really want to make sure behaves consistently across all supported platforms.

Also, compared to DIY approaches, it has the advantage of being actually linear, as it's based on data length, and not file amounts .
I'll bet, aren't you mixing compressed blocks with uncompressed ones here ?
I couldn't get that code working on something else I was working on.

To code or not to code , that is the question

Last edited by BloodRagg; 04-29-2019 at 02:41 PM.
BloodRagg is offline   Reply With Quote
Old 04-29-2019, 02:43 PM   #20
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by NiLuJe View Post
Also, compared to DIY approaches, it has the advantage of being actually linear, as it's based on data length, and not file amounts .
Which is much appreciated.
Frenzie is offline   Reply With Quote
Old 05-09-2019, 01:30 PM   #21
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
New version, yeee
So I was testing the update function today, but somehow it breaks down, any idea on how I can debug this ?
BloodRagg is offline   Reply With Quote
Old 05-09-2019, 02:26 PM   #22
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
"Breaks down" how?
Frenzie is offline   Reply With Quote
Old 05-09-2019, 04:14 PM   #23
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
You know my setup is custom, so I thought I'd do it myself before bothering anyone with it.

1. Select update from hamburger menu.
2. Popup do you want to update (installed 201904, avail 201905), cancel,>>update<<.
3. Downloading file, computing zsync delta.
4. Popup: Failed to update KOReader
Cancel, keeping temporary files.
>>Retry<< the update process with a full download.
Abort and cleanup all temporary files.
5. Popup: Error updating KORreader. Would you like to delete temporary files?
Cancel,
>>Ok<<

Is there something I can turn on, or do I have to monitor the scripts manually ?

Code:
root@kobo$ ls -la (during download)

-rwxr-xr-x    1 root     root           158 May  9 21:58 obtain-ip.sh
drwxr-xr-x    2 root     root          4096 May  9 22:07 ota
drwxr-xr-x   26 root     root          1024 May  7 09:41 plugins
>> -rw-------    1 root     root      63475712 May  9 22:07 rcksum-EuvN0D <<
-rwxr-xr-x    1 root     root          8743 May  9 21:58 reader.lua
-rwxr-xr-x    1 root     root           231 May  9 21:58 release-ip.sh
drwxr-xr-x    3 root     root          1024 May  7 09:41 resources


root@kobo$ ls -la (after download)
total 66369
drwxr-xr-x    2 root     root          4096 May  9 22:07 .
drwxr-xr-x   23 root     root          1024 May  9 22:07 ..
-rw-r--r--    1 root     root        410387 May  9 22:06 koreader-kobo-latest-stable.zsync
-rw-r--r--    1 root     root      67502080 May  9 22:07 koreader.installed.tar
-rw-r--r--    1 root     root         40545 May  9 21:58 package.index


[crash.log]
rename: Bad file descriptor

[crash.log] (after retry)
rename: Bad file descriptor
rm: can't remove './ota/koreader.updated.tar*': No such file or directory              
rename: No such file or directory
BloodRagg is offline   Reply With Quote
Old 05-09-2019, 04:38 PM   #24
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
You can run the program with the -d flag or turn on debug logging in the developer options, but I doubt that'd do much of anything for your "Bad file descriptor" issue. My guess would be you're doing something that breaks tar.
Frenzie is offline   Reply With Quote
Old 05-10-2019, 01:48 AM   #25
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Possibly something similar to how tar will SIGBUS when it tries to overwrite itself during the unpacking on Kindles because of the fuse layer?

Check the Kindle koreader.sh script, it has some extra ugly band-aid to make it behave (basically, copy tar somewhere safe like /tmp, and use that copy to do the unpacking).

Note that this only papers over the issue, if the startup script itself has been updated, it might also cause the restart to fail, and cause the usual post exit cleanup to be skipped.

Last edited by NiLuJe; 05-10-2019 at 01:51 AM.
NiLuJe is offline   Reply With Quote
Old 05-10-2019, 03:19 AM   #26
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by Frenzie View Post
You can run the program with the -d flag or turn on debug logging in the developer options, but I doubt that'd do much of anything for your "Bad file descriptor" issue. My guess would be you're doing something that breaks tar.
Quote:
Originally Posted by NiLuJe View Post
Possibly something similar to how tar will SIGBUS when it tries to overwrite itself during the unpacking on Kindles because of the fuse layer?

Check the Kindle koreader.sh script, it has some extra ugly band-aid to make it behave (basically, copy tar somewhere safe like /tmp, and use that copy to do the unpacking).

Note that this only papers over the issue, if the startup script itself has been updated, it might also cause the restart to fail, and cause the usual post exit cleanup to be skipped.
I got it to update, by renaming the tar file from installed to koreader.updated.tar and restarting koreader. All went just fine. Does the above still apply ?

(I assume the fbink version in koreader will be updated in the future, my log is swamped by the message:
[FBInk] Couldn't find a Kobo version tag (onboard unmounted or not running on a Kobo?)!

Last edited by BloodRagg; 05-10-2019 at 03:22 AM.
BloodRagg is offline   Reply With Quote
Old 05-10-2019, 05:37 AM   #27
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
If you overwrite the installed files with the installed files the end result is that you've done nothing.

Whatever you're doing is unrelated to koreader.sh because you're entirely in Lua. If it's not tar because you're getting a koreader.installed.tar, then logically it's either the download of the zsync file (which will show in debug output) or zsync itself instead.

Either way, you run the commands yourself.

./tar -whatever etc
./zsync -o ota/some-filename http://ota.koreader.rocks etc etc

You can just print the relevant string:

https://github.com/koreader/koreader....lua#L368-L387

Whichever fails, fails. But you already know it's because you mount ota to /opt/ram/koreader/ota.
Frenzie is offline   Reply With Quote
Old 05-10-2019, 05:54 AM   #28
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Should have been more clear I renamed the koreader.installed.tar to koreader.updated.tar which downloaded fine but did nothing in the update. Then restarted koreader, then the update proceeds

Unpacking files over a bind mount should not be a problem at all
This is substantiated by the fact that it works fine if I rename the tar file and restart koreader., the update process proceeds.

So all I have left is open files, but I will do some more testing when I have the time
BloodRagg is offline   Reply With Quote
Old 05-10-2019, 08:38 AM   #29
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by BloodRagg View Post
Should have been more clear I renamed the koreader.installed.tar to koreader.updated.tar which downloaded fine but did nothing in the update.
But it didn't. That's what the "Failed to update KOReader" message is telling you. It means zsync failed.
Frenzie is offline   Reply With Quote
Old 05-25-2019, 08:24 AM   #30
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Night mode isnt working when returning back from sleep, but sleep has to be at least 5 or 10 minutes.
Its in daymode, then after a couple of touches is reverts back to nightmode.
BloodRagg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to report bugs to Kobo? Lucas Malor Kobo Reader 9 10-29-2013 10:28 PM
Best place to report bugs? monk127 Kobo Tablets 1 11-24-2011 06:12 PM
Dingo Bugs - Report them here borisb enTourage Archive 102 11-04-2010 12:22 PM
Report Issues and Bugs with Delstar OpenBook here jswinden More E-Book Readers 13 03-18-2010 10:38 AM
How to report bugs in Adobe Digital Editions (ADE) pdurrant ePub 1 09-04-2009 12:03 PM


All times are GMT -4. The time now is 03:04 AM.


MobileRead.com is a privately owned, operated and funded community.