Re: npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json from remote location


TRO <thomas.roos@...>
 

i did this:
addtask getsw after do_fetch before do_compile

python do_getsw() {
    import os
    bb.debug("downloading shrinkwrap file")
    os.system ("git archive --remote=ssh://git@... HEAD frontend/npm-shrinkwrap.json | tar -xO > /tmp/npm-shrinkwrap.json_dwnl")
    src_uri_sw = {'npmsw:///tmp/npm-shrinkwrap.json_dwnl;dev=True'}
    
    try:
        fetcher = bb.fetch2.Fetch(src_uri_sw, d)
        fetcher.download()
    except bb.fetch2.BBFetchException as e:
        bb.fatal(str(e))

    try:        
        fetcher.unpack(d.getVar('WORKDIR'))
    except bb.fetch2.BBFetchException as e:
        bb.fatal(str(e))
                
    bb.debug("src_uri: " + str(src_uri_sw))
}

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.