Hi,
Got an interesting case when patch stage failed.
And I would like to ask if it is a known issue and it makes sense to improve
logic (maybe I'm missing something).
```
ERROR: nativesdk-yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0
do_patch: >>> url
git://github.com/pkg/diff;name=diff;destsuffix=build/vendor/src/github.com/pkg/diff;branch=main;protocol=https
local '<sdk-dir>/build/downloads/git2/github.com.pkg.diff' all False
ERROR: nativesdk-yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0
do_patch: >>> url file://run-ptest local None all False
ERROR: nativesdk-yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0
do_patch: Importing patch 'github.com.pkg.diff' with striplevel '1'
FileNotFoundError(2, 'No such file or directory')
ERROR: Logfile of failure stored in:
<sdk-dir>/build/tmp/work/x86_64-nativesdk-xesdk-linux/nativesdk-yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1/temp/log.do_patch.3930851
ERROR: Task
(virtual:nativesdk:<sdk-dir>/distro/openembedded-core/../meta-virtualization/recipes-devtools/yq/yq_git.bb:do_patch)
failed with exit code '1'
```
Custom yocto scarthgap version.
In my scenario I used mirror for downloads and states and build offline
(BB_NO_NETWORK = "1"), so I have files
<sdk-dir>/build/downloads/gitshallow_github.com.pkg.diff_20ebb0f-1_main.tar.gz[.done]
before fetch
and after fetch I have no
<sdk-dir>/build/downloads/git2/github.com.pkg.diff directory
check for directory failed
openembedded-core/meta/lib/oe/patch.py
```
890 local = fetch.localpath(url)
891 if os.path.isdir(local):
892 return
```
...
```
base, ext = os.path.splitext(os.path.basename(local))
```
gives us 'github.com.pkg', '.diff'
and this check also failed
openembedded-core/meta/lib/oe/patch.py
```
904 elif ext not in (".diff", ".patch"):
905 return
```
Hence, return local from function and this is treated as local patch should be
applied.
In works in cases when we have no mirrors and after fetch I got file
<sdk-dir>/build/downloads/git2/github.com.pkg.diff
Regards,
Oleksiy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#228044):
https://lists.openembedded.org/g/openembedded-core/message/228044
Mute This Topic: https://lists.openembedded.org/mt/116825995/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-