sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
201 stars 266 forks source link

Cookbook creating malformed sources.list files #159

Closed ahrenstein closed 9 years ago

ahrenstein commented 9 years ago

I was running version 2.7.0 of the apt cookbook with this code in one of my cookbooks

#Add the Jenkins repo
      apt_repository 'jenkins' do
        uri 'http://pkg.jenkins-ci.org/debian binary/'
        key 'https://jenkins-ci.org/debian/jenkins-ci.org.key'
        notifies :run, 'execute[apt-refresh]', :immediately
      end

Now a berks update to apt 2.8.1 gives me malformed sources.list files such as the below output of my jenkins.list

deb     "http://pkg.jenkins-ci.org/debian binary/"

This results in a "Malformed line 1 in source list /etc/apt/sources.list.d/jenkins.list (dist parse)" error. This cookbook worked before the version update, and this repo already functioned on this server properly before the apt cookbook updated. What can be done to correct this? It overwrote a functioning repo and completely broke apt.

Edit: I'd like to add that the jenkins.list file used to look and work like this:

deb     http://pkg.jenkins-ci.org/debian binary/
ahrenstein commented 9 years ago

It appears this broke in v2.8.0 with the following changelog entry: "Quote repo URLs to deal with spaces"

Edit: Quoting part of the repo inside the resource appears to fix this.