• Kirill Smelkov's avatar
    slapos.recipe.build:download* : Ignore urls that point to file coming from SR itself · b1742031
    Kirill Smelkov authored
    Without this fix SR files fetched via slapos.recipe.build:download and
    slapos.recipe.build:download-unpacked produce leat to error e.g. like
    
    urlpath = '/SR-BASE/stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in', kind = '', version = None
    
        def addbom(urlpath, kind, version=None):
            name, ver = namever(urlpath)
            if version is not None:
                assert ver is None
                ver = version
            ver = removeprefix(ver, name+'-')   # wendelin.core-2.0.alpha3-0-g6315384  -> 2.0.alpha3-0-g6315384
            if '//' in urlpath:
                url = urlpath
            else:
                if kind == 'egg':
                    # XXX not strictly correct -> better retrieve the actual URL, but buildout does not save it in installed.cfg
                    url = 'https://pypi.org/project/%s/%s/' % (name, ver)
                else:
    >               raise NotImplementedError('TODO url for kind %r  (urlpath: %r)' % (kind, urlpath))
    E               NotImplementedError: TODO url for kind ''  (urlpath: '/SR-BASE/stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in')
    
    nxdbom/__init__.py:64: NotImplementedError
    b1742031
nxdbom_test.py 7.66 KB