sous-chefs / packagecloud

Development repository for the packagecloud cookbook
https://supermarket.chef.io/cookbooks/packagecloud
Apache License 2.0
17 stars 48 forks source link

Ensure lsb-release is installed for Debian codename in install_deb #36

Closed chewi closed 7 years ago

chewi commented 8 years ago

lsb-release must be present for node['lsb']['codename'] to be populated. It is missing when the "standard system utilities" are not selected at install time. The lsb Ohai plugin must also be reloaded for this to take effect immediately.

chewi commented 8 years ago

Hmm I've rebased this but actually it doesn't seem effective any more. I will investigate tomorrow.

chewi commented 8 years ago

Figured it out. Please merge! :smile_cat:

ice799 commented 7 years ago

Hi @chewi! I'm open to merging this, but can you help me understand why lazy was added? Thanks!

chewi commented 7 years ago

The first one is because node['lsb']['codename'] is set when the Ohai plugin is reloaded at converge time. The second one… uh… it's been too long! I do remember working on this though and there definitely was a reason.

UPDATE: I see it! gpg_url calls construct_uri_with_options calls install_endpoint_params and that also refers to node['lsb']['codename'].

ice799 commented 7 years ago

No worries, I'm going to re-run the test suite now without the lazy added to the GPG stuff and see how it goes. If everything passes, I'll merge it without the GPG related changes. Is that OK?

ice799 commented 7 years ago

Ah, OK. Ummm. Yea, nothing is ever simple I guess ;) Looks like this adds the lsb stuff for deb only, but it is also used for RPMs. I guess this would need to be modified a bit to install lsb in both cases. Hm.

chewi commented 7 years ago

No need, install_endpoint_params is called for RPMs but only the Debian clause uses node['lsb']['codename']. RPM-based distros don't have code names like Debian does and the version number is used in the URLs instead.

ice799 commented 7 years ago

tests all passed, so i merged this. thanks for sending this PR @chewi!