Skip to content

Fix config.packages.dpkg_deb_path setting

Ash McKenzie requested to merge ashmckenzie/fix-dpkg_deb_path-default into main

What does this Merge Request do and why?

!1925 (merged) introduced the config.packages.dpkg_deb_path setting which needed a little rework because on my macOS system with dpkg installed, I get:

$ make test
--snip--
Checking gdk.example.yml: diff --git a/gdk.example.yml b/gdk.example.yml
index 68eb01ae..e1c53b85 100644
--- a/gdk.example.yml
+++ b/gdk.example.yml
@@ -179,7 +179,7 @@ omnibus_gitlab:
 openldap:
   enabled: false
 packages:
-  dpkg_deb_path: "/usr/bin/dpkg-deb"
+  dpkg_deb_path: "/usr/local/bin/dpkg-deb"
 port: 3000
 postgresql:
   bin: "/usr/local/bin/postgres"

ERROR: There are gdk.example.yml changes that need to be checked in.  Run 'rake gdk.example.yml' to generate.
make: *** [verify-gdk-example-yml] Error 1

This MR addresses by:

  • Making config.packages.dpkg_deb_path 'private', by renaming to config.packages.__dpkg_deb_path which means it can't be set (because it's actually a computed setting) and also isn't written out to gdk.example.yml as a result.
  • Added new config.__platform_macos? setting that we use instead.
  • Added missing specs.

cc @sathieu, @10io

Merge Request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise Issue to follow-up.
  • Documentation added/updated, if needed.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Ash McKenzie

Merge request reports