Launchpad build fails with "Could not resolve ''"

Local build works fine, please help.

Build log:

Also available at Bug #1890885 “Snap build fails with “Could not resolve 'dl.bintr…” : Bugs : launchpad-buildd

Try losing the sudo calls. That would reset the environment for the subprocess, hiding http_proxy and https_proxy.

If you need to configure an extra apt source, it might be easier to use the package-repositories feature described here:

1 Like

That did the trick, thanks!

That’s cool, unfortunately the feature’s schema isn’t happy with the deb / source line :frowning: (the quirky SUITE part and the missing COMPONENT part)

Also I think the situation is not desirable and should be dealt with(like, keeping those environment variables as an exception).

The sources.list man page describes how to represent single line source specifications in the newer deb822 format. From there, it should be pretty easy to convert to the YAML format Snapcraft expects.

In this case, the suite is / and there are no components, so you would want something like this:

  - type: apt
    suites: [/]
    key-id: ...
    key-server: ...
1 Like