Launchpad build fails with "Could not resolve 'dl.bintray.com'"

Local build works fine, please help.

Build log: https://launchpad.net/~build.snapcraft.io/+snap/4d7bf10581a186526845c1c56fbef438/+build/1075069
Recipe: https://github.com/Lin-Buo-Ren/bfg-snap

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 https://dl.bintray.com/sbt/debian / 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:

package-repositories:
  - type: apt
    uri: https://dl.bintray.com/sbt/debian
    suites: [/]
    key-id: ...
    key-server: ...
1 Like