PelionIoT / distro-pelion-edge

Scripts for generating pelion-edge deb (Ubuntu) installer
Apache License 2.0
1 stars 2 forks source link

dashes in PELION_DOCKER_PREFIX break the build #101

Closed ryannowarm closed 3 years ago

ryannowarm commented 3 years ago

If you set PELION_DOCKER_PREFIX to something that contains a dash, the build breaks with:

E: Failed to fetch file:/opt/apt-repo/pe-dependencies/Packages  File not found - /opt/apt-repo/pe-dependencies/Packages (2: No such file or directory)
E: Some index files failed to download. They have been ignored, or old ones used instead.
Caching golang-14 in local repository
/pelion-build
dpkg-buildpackage: info: source package golang-virtual
dpkg-buildpackage: info: source version 1.14-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Krzysztof Bembnista <krzysztof.bembnista@globallogic.com>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 9)
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
program finished with exit code 3

This is because we parse the docker image name looking for the distro name by assuming it's the second field separated by a dash

We should either document that you can't use dashes in PELION_DOCKER_PREFIX or fix it so you can.

kbgl commented 3 years ago

Yes, I had same issue; I had quick fix for it somewhere but it was not complete. Anyway I would like to switch to new scripts - I pushed initial environment setup in RHEL8 PR for Ubuntu Focal, so there the problem does not exists (environment setup file keeps all needed configuration data).

ryannowarm commented 3 years ago

Sounds like that's the long term fix then. Let's leave this open until RHEL8 is merged?

ryannowarm commented 3 years ago

Should be fixed in https://github.com/PelionIoT/distro-pelion-edge/pull/131

ryannowarm commented 3 years ago

@kbgl , this can be closed now, right?

kbgl commented 3 years ago

@ryannowarm yes, it is done