'devtool upgrade' only works with git:// and http/ftp tarballs. I am not
sure there can even be a reasonable upgrade path for something fetched over
ssh:// (it is *not* git over ssh, but rather plain file copy with scp).

Alex

On Sun, 12 Apr 2020 at 20:50, Bjarne Michelsen <[email protected]>
wrote:

> Actually I found out later today that it was cause because my recipe used
> something like ssh://[email protected]:1234/test/my-repo
> It should probably have been changed to git://[email protected]:1234/test
> /my-repo;protocol=ssh
> But anyway, it should not result in such an error.
> I had used `devtool add` to create a new recipe and it added the ssh URI
> directly. I did not notice that.
>
> This is the error I am seeing:
>
> Traceback (most recent call last):
>   File "/home/bjarne/repos/yocto/poky/scripts/devtool", line 334, in
> <module>
>     ret = main()
>   File "/home/bjarne/repos/yocto/poky/scripts/devtool", line 321, in main
>     ret = args.func(args, config, basepath, workspace)
>   File "/home/bjarne/repos/yocto/poky/scripts/lib/devtool/upgrade.py",
> line 558, in upgrade
>     tinfoil, rd)
>   File "/home/bjarne/repos/yocto/poky/scripts/lib/devtool/upgrade.py",
> line 219, in _extract_new_source
>     md5 = checksums['md5sum']
> KeyError: 'md5sum'
>
> /Bjarne
>
> ------------------------------
> *Fra:* Alexander Kanavin <[email protected]>
> *Sendt:* 12. april 2020 18:30
> *Til:* Bjarne Michelsen <[email protected]>
> *Cc:* OE-core <[email protected]>
> *Emne:* Re: [OE-core] [PATCH] devtool: fix error where no license
> checksum was found in recipe
>
> Wait, what error are you seeing exactly? For me this works just fine even
> if the recipe has only sha256sum: the checksummer calculates the values
> from the actual tarball, and not from the recipe:
>
> @@ -215,6 +215,7 @@ def _extract_new_source(newpv, srctree, no_patch,
> srcrev, srcbranch, branch, kee
>          if ftmpdir and keep_temp:
>              logger.info
> <https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flogger.info%2F&data=02%7C01%7C%7C61fcc38a816448e7f9f608d7defee1ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637223058597294667&sdata=hjyma6WD%2FUWu1I%2BSTciIeRVmw9ACBdyugLzbVBEP06U%3D&reserved=0>('Fetch
> temp directory is %s' % ftmpdir)
>
> +        logger.info
> <https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flogger.info%2F&data=02%7C01%7C%7C61fcc38a816448e7f9f608d7defee1ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637223058597304671&sdata=BGFsjxUJfzaHFw6HKwDZe%2BbDn8Sm%2FZyThOI11aXk0Kk%3D&reserved=0>
> (str(checksums))
>          md5 = checksums['md5sum']
>          sha256 = checksums['sha256sum']
>
> prints
>
> {'md5sum': '3f486f2f4435ef14b81814dbbc7b48bb', 'sha256sum':
> '186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35',
> 'sha1sum': '238e001ea1fbf19ede43e36209c37c1a636bb51f', 'sha384sum':
> '8985fc9f65c4c2fbbed1ec972bee339eeeb7362e96bdf85dc4652d20e517bdb03ffc222b51e34c15bd391c569caaf158',
> 'sha512sum':
> 'b00bd9b5ad5298fbceeec6bb19c1ab0c106ca5cfb31178497c58bf7e0e0cf30fcc19c20f84e23af31cc126bf2447d3e4f8461db97bafa7bd78f69561932f000c'}
>
> Alex
>
> On Sun, 12 Apr 2020 at 15:22, Bjarne Michelsen <
> [email protected]> wrote:
>
> devtool upgrade currently assumes that a md5 and sha256 sum is available
> in the recipe, no matter what is the value of LICENSE.
> This fix will just default to an empty checksum, if the parameter is not
> found in the recipe.
>
> Signed-off-by: Bjarne Michelsen <[email protected]>
> ---
>  scripts/lib/devtool/upgrade.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/lib/devtool/upgrade.py
> b/scripts/lib/devtool/upgrade.py
> index cb6dce378a..7066ddd51e 100644
> --- a/scripts/lib/devtool/upgrade.py
> +++ b/scripts/lib/devtool/upgrade.py
> @@ -215,8 +215,8 @@ def _extract_new_source(newpv, srctree, no_patch,
> srcrev, srcbranch, branch, kee
>          if ftmpdir and keep_temp:
>              logger.info
> <https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flogger.info%2F&data=02%7C01%7C%7C61fcc38a816448e7f9f608d7defee1ee%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637223058597314667&sdata=jmZ7oOkMCS8b%2F89vcPy%2BGyoIl%2BuF8hJTe8JUkmkF5dU%3D&reserved=0>('Fetch
> temp directory is %s' % ftmpdir)
>
> -        md5 = checksums['md5sum']
> -        sha256 = checksums['sha256sum']
> +        md5 = checksums.get('md5sum', '')
> +        sha256 = checksums.get('sha256sum', '')
>
>          tmpsrctree = _get_srctree(tmpdir)
>          srctree = os.path.abspath(srctree)
> --
> 2.17.1
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137189): 
https://lists.openembedded.org/g/openembedded-core/message/137189
Mute This Topic: https://lists.openembedded.org/mt/72965075/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to