WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: showapps bootcode produces warning  (Read 438 times)

Offline sodface

  • Jr. Member
  • **
  • Posts: 82
showapps bootcode produces warning
« on: December 26, 2017, 04:54:20 PM »
Not a huge deal and I'm not sure if it is piCore specific (I suspect it applies to TC generally) but adding "showapps" to cmdline.txt produces warning messages:

Code: [Select]
Mounting extensions
-------------------

alsa-modules-4.9.22-piCore alsa-utils alsa bzip2-lib ca-certificates firmware-rpi3-wireless flac gamin gcc_libs glib2 libasound libedit libelf libgcrypt libgpg-error libiw libmad libnl libogg libssh2 libvorbis mc ncurses openssh openssl pcre readline wifi wireless-4.9.22-piCore wireless_tools wpa_supplicant Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str


Adding extensions to file system
--------------------------------

alsa-modules-4.9.22-piCore alsa-utils alsa bzip2-lib ca-certificates firmware-rpi3-wireless flac gamin gcc_libs glib2 libasound libedit libelf libgcrypt libgpg-error libiw libmad libnl libogg libssh2 libvorbis mc ncurses openssh openssl pcre readline wifi wireless-4.9.22-piCore wireless_tools wpa_supplicant Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str

It seems to be an issue with micropython and is triggered in /usr/bin/tce-bootload by the os.listdir call in this section:
Code: [Select]
def waitforfinish():
    while len(os.listdir('/var/run/tcebootload')) != 0:
        pass

See this bug report:
https://github.com/micropython/micropython-lib/pull/149

Looks like it is fixed in micropython 1.9.3.  This is with piCore 9.0.3 with MicroPython v1.9.1-31-gc06aa5b-dirty on 2017-06-20; linux version.

Not my video, but you can see the warnings being printed here:
https://www.youtube.com/watch?v=YRHD_GQo0SU




Offline sodface

  • Jr. Member
  • **
  • Posts: 82
Re: showapps bootcode produces warning
« Reply #1 on: December 26, 2017, 05:06:09 PM »
The other kind of weird thing about that file is in the "Mounting extensions" section there's:

Code: [Select]
if showapps:
            print(p[:-4] + ' ', end="", flush=True)
            print('\033[1;33m', end="", flush=True)

and then following in the "Adding extensions to file system" section the code is repeated though minus the second print statement:

Code: [Select]
if showapps:
        print(p[:-4] + ' ', end="", flush=True)

Beyond it being a color code for yellow, I'm not sure what the second print statement is supposed to be doing?  You can see in that video above and in attached pic of my serial terminal, that the very first extension printed is not yellow and then the remainder of the extension related stuff is yellow even though the second section was missing the second print statement with the color code in it.  And obviously the first extension is not yellow because it's the first time through the loop and the color statement is after the statement to print the extension name.

« Last Edit: December 26, 2017, 05:07:46 PM by sodface »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6980
    • My Community Forum
Re: showapps bootcode produces warning
« Reply #2 on: December 27, 2017, 01:10:12 AM »
@sodface Thanks for reporting. It is mainly a cosmetic and not functional issue, I will take care in piCore 10

Regards... Béla
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sodface

  • Jr. Member
  • **
  • Posts: 82
Re: showapps bootcode produces warning
« Reply #3 on: December 27, 2017, 06:12:20 AM »
@bmarkus Thanks for your dedication to piCore!

Offline sodface

  • Jr. Member
  • **
  • Posts: 82
Re: showapps bootcode produces warning
« Reply #4 on: January 07, 2018, 01:25:56 PM »
There's another issue in /usr/bin/tce-bootload, it's more evident with the showapps bootcode enabled but there without it also I believe.  Issue was first described over a year ago in this thread:

http://forum.tinycorelinux.net/index.php/topic,20546.msg128098.html#msg128098

The issue is when using the copy2fs.flg this line in tce-bootload doesn't have the desired affect:

Code: [Select]
os.system('sudo busybox.suid rm -r -f ' + root + '/tmp/tcloop/' + p[:-4])
I believe this line is supposed to completely remove the tcz directory for each extension in /tmp/tcloop/ but in fact they are all left behind, empty, but still present.

With the showapps bootcode turned on and the copy2fs.flg set, this is what you see:

Code: [Select]
Mounting extensions
-------------------

alsa-modules-4.9.22-piCore alsa-utils alsa bzip2-lib ca-certificates firmware-rpi3-wireless flac gamin gcc_libs glib2 libasound libedit libelf libgcrypt libgpg-error libiw libmad libnl libogg libssh2 libvorbis mc ncurses openssh openssl pcre readline wifi wireless-4.9.22-piCore wireless_tools wpa_supplicant Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str


Adding extensions to file system
--------------------------------

alsa-modules-4.9.22-piCore rm: applet not found
alsa-utils rm: applet not found
alsa rm: applet not found
bzip2-lib rm: applet not found
ca-certificates rm: applet not found
firmware-rpi3-wireless rm: applet not found
flac rm: applet not found
gamin rm: applet not found
gcc_libs rm: applet not found
glib2 rm: applet not found
libasound rm: applet not found
libedit rm: applet not found
libelf rm: applet not found
libgcrypt rm: applet not found
libgpg-error rm: applet not found
libiw rm: applet not found
libmad rm: applet not found
libnl rm: applet not found
libogg rm: applet not found
libssh2 rm: applet not found
libvorbis rm: applet not found
mc rm: applet not found
ncurses rm: applet not found
openssh rm: applet not found
openssl rm: applet not found
pcre rm: applet not found
readline rm: applet not found
wifi rm: applet not found
wireless-4.9.22-piCore rm: applet not found
wireless_tools rm: applet not found
wpa_supplicant rm: applet not found
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str
Warning: Comparison between bytes and str

Note all the "applet not found" messages associated with the rm command (and the fact that the directory that's supposed to get removed, doesn't).

It's not immediately obvious to me why, looking at the script, but, with showapps turned off and copy2fs.flg still set, you don't see all the errors, but the rm command still must not be working as intended because the extension directories are still present under /tmp/tcloop/. 

As the poster noted in the link above, it has something to do with the "busybox.suid" syntax.  If you manually run the script line it produces the same error:

Code: [Select]
tc@squeezepi:/tmp/tcloop$ sudo busybox.suid rm -r -f /tmp/tcloop/alsa-utils
rm: applet not found

But remove the .suid suffix and it works as expected and the directory is removed.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6980
    • My Community Forum
Re: showapps bootcode produces warning
« Reply #5 on: January 08, 2018, 08:49:54 PM »
Thanks, will check it.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."