Bug 486333

Summary: bootstrapping with -localdev does not use the specified craft package
Product: [Unmaintained] Craft Reporter: Ralf Habacker <ralf.habacker>
Component: CoreAssignee: Hannah von Reth <vonreth>
Status: REPORTED ---    
Severity: normal CC: kde-windows
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ralf Habacker 2024-04-30 09:00:32 UTC
SUMMARY

In this case, the specified directory is not used for bootstrapping, but the craft git repo is cloned again.

STEPS TO REPRODUCE
1. run
    git clone git@invent.kde.org:packaging/craft.git
    run craft/setup/install_craft.ps1 -localdev $PWD/craft -root $PWD/CraftRoot
2. inspect log

OBSERVED RESULT
In the log there is printed
...
======================================================
*** Handling package: craft/craft-core, action: all **
*** Action: fetch-binary for craft/craft-core ***
*** craft/craft-core not found in cache ***
*** Action: fetch for craft/craft-core ***
craft trace: MultiSource fetch
craft trace: GitSource __init__
craft trace: VersionSystemSourceBase __init__
craft trace: SourceBase.__init__ called
craft trace: GitSource fetch
craft trace: MultiSource repositoryUrl
craft trace: VersionSystemSourceBase repositoryUrl
craft trace: VersionSystemSourceBase getUrl
craft trace: VersionSystemSourceBase splitUrl
fetching git@invent.kde.org:packaging/craft.git|master|

EXPECTED RESULT
In my opinion, craft should use the craft package provided by the -localdev parameter and not retrieve the package again

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Comment 1 Ralf Habacker 2024-04-30 09:53:11 UTC
(In reply to Ralf Habacker from comment #0)
> In this case, the specified directory is not used for bootstrapping, but the
> craft git repo is cloned again.

Since the url from which craft is cloned is permanently set to https://invent.kde.org/packaging/craft.git, this is particularly annoying if, for example, you want/need to use a local copy of craft in a corporate environment due to the corresponding framework conditions, which is currently not possible.