'sfdk tools list' hangs

Hi,

I thought I’d give sfdk a go, to see if I can automate some things. I’m looking at https://sailfishos.org/wiki/Tutorial_-Building_packages-_advanced_techniques, and I’m stuck at sfdk tools list. It doesn’t seem to be doing anything, just sits there giving no output. Also, when I use sfdk --debug tools list, no output. When I hit ctrl-c, something seems to be happening:

gmc@coltrane:~/src/sailfish/tasks/tasks$ ~/bin/SailfishOS/bin/sfdk --debug tools list
^Csfdk: [D] Signal handler: 2 Interrupt
sfdk: [D] TaskManager: Terminate requested
sfdk: [D] Not mapping shared target path: No target selected
sfdk: [D] Mapping "/home/gmc" as "/home/mersdk/share"
sfdk: [D] Mapping "/home/gmc" as "/home/src1"
sfdk: [D] Command after mapping engine paths: "sdk-manage" arguments: ("tooling", "list", "--long") CWD: "/home/mersdk/share/src/sailfish/tasks/tasks"
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffdc91ee020) transition: NotStarted --Started--> Running
sfdk: [D] Remote process ID: 3617 all data: "3617\n"
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffdc91ee020) posting Exited
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffdc91ee020) transition: Running --Exited--> NotStarted
sfdk: [D] Not mapping shared target path: No target selected
sfdk: [D] Mapping "/home/gmc" as "/home/mersdk/share"
sfdk: [D] Mapping "/home/gmc" as "/home/src1"
sfdk: [D] Command after mapping engine paths: "sdk-manage" arguments: ("target", "list", "--long") CWD: "/home/mersdk/share/src/sailfish/tasks/tasks"
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffdc91ee000) transition: NotStarted --Started--> Running
sfdk: [D] Remote process ID: 3644 all data: "3644\n"
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffdc91ee000) posting Exited
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffdc91ee000) transition: Running --Exited--> NotStarted
gmc@coltrane:~/src/sailfish/tasks/tasks$ 

The build vm seems to be up and running though:

gmc@coltrane:~/src/sailfish/tasks/tasks$ ~/bin/SailfishOS/bin/sfdk --debug engine exec ls
sfdk: [D] Not mapping shared target path: No target selected
sfdk: [D] Mapping "/home/gmc" as "/home/mersdk/share"
sfdk: [D] Mapping "/home/gmc" as "/home/src1"
sfdk: [D] Command after mapping engine paths: "ls" arguments: () CWD: "/home/mersdk/share/src/sailfish/tasks/tasks"
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffd527c1010) transition: NotStarted --Started--> Running
sfdk: [D] Remote process ID: 3712 all data: "3712\r\n"
                                                      LICENSE.md  README.md  harbour-tasks.desktop  harbour-tasks.pro  harbour-tasks.pro.user  harbour-tasks.qrc  icons  images  qml	rpm  src  translations
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffd527c1010) posting Exited
sfdk: [D] Task Sfdk::RemoteProcess(0x7ffd527c1010) transition: Running --Exited--> NotStarted
gmc@coltrane:~/src/sailfish/tasks/tasks$ 

I can succesfuly set a target with sfdk config target=.... though, and build also works.

What could be wrong?

Cheers,

Koen

sfdk tools list invokes the SDK Maintenance Tool to check some properties of the installed tools, and the maintenance tool implicitly refreshes its repositories, which is known to hang when executed without network connection available (fix scheduled for next SDK release).

When you start the SDK Maintenance Tool manually and let it check for updates, does it block or no?

Please also try with export QT_LOGGING_RULES=sfdk.*.debug=true, which will enable additional logs during early startup.

When I run SDKMaintenanceTool by hand, there is no problem it seems:

gmc@sunra:~/bin/SailfishOS$ ./SDKMaintenanceTool --checkupdates
<updates>
    <update name="SailfishOS-latest (3.4.0.24)" version="2020.10.20-1" size="1289779240"/>
    <update name="SailfishOS-latest (3.4.0.24)" version="2020.10.20-1" size="891289640"/>
    <update name="SailfishOS-latest-armv7hl (3.4.0.24)" version="2020.10.20-1" size="598825000"/>
    <update name="SailfishOS-latest-i486 (3.4.0.24)" version="2020.10.20-1" size="723609640"/>
    <update name="Common Sailfish OS Emulator Integration Bits for Sailfish IDE" version="2020.07.29-1-2020.04.29-1-4.12.2-1" size="0"/>
    <update name="GNU Debugger" version="7.6.2-5" size="114119632"/>
    <update name="Maintenance tool" version="2020.10.20-1" size="28034473"/>
    <update name="Qt QmlLive Integration for Sailfish IDE" version="2019.03.20-1-0.1.0-11-4.12.2-1" size="0"/>
    <update name="Qt SDK Documentation" version="5.6.2-7" size="89877544"/>
    <update name="Sailfish IDE" version="4.12.2-1" size="693670619"/>
    <update name="Sailfish OS Build Engine" version="2020.10.20-1" size="0"/>
    <update name="Sailfish OS Build Engine Image for VirtualBox" version="2020.10.20-1" size="3728033343"/>
    <update name="Sailfish OS Build Engine Integration for Sailfish IDE" version="2020.09.02-1-2020.10.20-1-4.12.2-1" size="0"/>
    <update name="Sailfish OS Build Target latest-armv7hl (3.4.0.24) Integration for Sailfish OS IDE" version="2020.10.20-1-4.12.2-1" size="0"/>
    <update name="Sailfish OS Build Target latest-i486 (3.4.0.24) Integration for Sailfish OS IDE" version="2020.10.20-1-4.12.2-1" size="0"/>
    <update name="Sailfish OS Emulator Integration for Sailfish IDE" version="2020.10.20-1-4.12.2-1" size="0"/>
    <update name="Sailfish SDK" version="2020.10.20-1" size="129"/>
    <update name="Sailfish Silica Project Templates" version="2020.10.20-1" size="789392"/>
</updates>

gmc@sunra:~/bin/SailfishOS$ 

In fact, yesterday, some updates started to pop-up, which I installed and now sfdk tools list is working correctly. So I guess it was a bug in the previous version of either the build vm or the sfdk tool or something in between, that is fixed in the new update.

It is quite possible then, that it hangs when updates are available, in which case the output from the maintenance tool may differ from the expected one. So the bug may reappear every time a new SDK version is released.

I forgot to add that both bugs are likely to be fixed in the next SDK release (3.4).

1 Like