If we try to make a snap with ca-certificates-java as a build-package, it will fail with:
Could not find a required package in 'build-packages': "The cache has no package named 'openjdk-7-jre-headless'"
The problem here is that in order to record the dependencies of the packages, we are taking the first of the or dependencies. ca-certificates-java has the following dependencies:
openjdk-7-jre-headless doesn't exist in the archive, but java7-runtime-headless does. So we shouldn't blindly pick any of the dependencies, we should search for the first that's available on the archive.
If we try to make a snap with ca-certificates -java as a build-package, it will fail with:
Could not find a required package in 'build-packages': "The cache has no package named 'openjdk- 7-jre-headless' "
The problem here is that in order to record the dependencies of the packages, we are taking the first of the or dependencies. ca-certificates -java has the following dependencies:
Depends: ca-certificates (>= 20121114), openjdk- 7-jre-headless (>= 7~u3-2.1.1~pre1-1) | java7-runtime- headless, libnss3 (>= 3.12.9+ ckbi-1. 82-0ubuntu3~ )
openjdk- 7-jre-headless doesn't exist in the archive, but java7-runtime- headless does. So we shouldn't blindly pick any of the dependencies, we should search for the first that's available on the archive.
To reproduce:
$ snapcraft init s-java]
add build-packages: [ca-certificate
$ snapcraft