[yocto] [npm] duplicate code

Jean-marie Lemetayer jean-marie.lemetayer at savoirfairelinux.com
Thu Oct 3 08:37:28 PDT 2019


Hi all,

I am planning to do some work on npm and recipetool.

I have seen that there is some duplicate code between bitbake/lib/bb/fetch2/npm.py and scripts/lib/recipetool/create_npm.py but there is some inconsistencies.

Here is an example, the _parse_view() function which I patched recently has differ:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/fetch2/npm.py#n157
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/scripts/lib/recipetool/create_npm.py#n244

I think merging this "npm utility functions" is a good idea. But where ?

I think about creating a new file: bitbake/lib/bb/npm_utils.py

Or maybe use the existing bitbake/lib/bb/utils.py ?

What do you think ?


Jean-Marie LEMETAYER
Enthusiast embedded systems engineer
Savoir-faire Linux


More information about the yocto mailing list