Bug 463966 - kdesrc-build failed building Qt5 claiming init_repository doesn't exist
Summary: kdesrc-build failed building Qt5 claiming init_repository doesn't exist
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-07 13:43 UTC by Brent Mackey
Modified: 2024-04-20 00:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Mackey 2023-01-07 13:43:13 UTC
SUMMARY
When building qt5 with kdesrc-build, if the Qt5 directory did not exist in 


STEPS TO REPRODUCE
1. Delete or `mv Qt5 Qt5.bak` from kde src dir
2. kdesrc-build Qt5

OBSERVED RESULT
build fails and exits

EXPECTED RESULT
build succeeds

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.0.12-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 1700 Eight-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series

ADDITIONAL INFORMATION
- Have confirmed file exists and is executable
- Cloning from invent.k.o/qt/qt/qt5 using same options as kdesrc-build (git clone --recursive -b 'kde/5.15' https://invent.kde.org/qt/qt/qt5.git dir-to-kde-src/Qt5) then running kdesrc-build succeeds normally
- Fails here for some reason https://invent.kde.org/sdk/kdesrc-build/-/blob/master/modules/ksb/Updater/Qt5.pm#L32 -- !pretend()?
Comment 1 Andrew Shark 2024-04-20 00:38:58 UTC
Git commit 8826ab116f33e3ca6fd7907c42e176c148e0350c by Andrew Shark.
Committed on 20/04/2024 at 00:35.
Pushed by ashark into branch 'master'.

Wait until finished cloning of qt5 repo before checking init-repository script

M  +3    -1    ksblib/Updater/Qt5.py

https://invent.kde.org/sdk/kde-builder/-/commit/8826ab116f33e3ca6fd7907c42e176c148e0350c
Comment 2 Andrew Shark 2024-04-20 00:46:42 UTC
Thanks for the report. I can reproduce the issue in kdesrc-build.

This happens because the `_updateRepository()`, and therefore the check for the init-repository file existence and its executable permission
`(! -e "$srcdir/init-repository" || ! -x _)` is done before the function to clone/update existing clone was finished.

In python (kde-builder) the promise is starting to execute right when it is created (unlike in perl), so it was working correctly in kde-builder already. But just to make the logic proper and to be on a safe side, I have added the promise awaits in the commit linked above).

The similar change was needed for kdesrc-build, but it is now feature freeze, please switch to kde-builder.