Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt::source templates/sources.list.erb generates invalid source line when architecture is provided. #182

Merged
merged 2 commits into from Oct 23, 2013

Conversation

stefanvanwouw
Copy link

When trying to add the CDH4 repository to APT I ran into the following problem:

Using the following

    apt::source {'cdh4':                                                                                                                        
        location => 'http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh',          
        release  => 'precise-cdh4',                                                       
        repos => 'contrib',                                                               
        architecture => 'amd64',                                                          
        include_src => false,                                                             
        key => '02A818DD',                                                                
        key_server => 'keys.gnupg.net'                                                    
    }                                                                                              

Generates /etc/apt/sources.list.d/cdh4.list containing:

# cdh4
deb [arch=amd64]http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh precise-cdh4 contrib

Notice there is a missing space between [arch=amd64] and http:///...

The source of this bug is in the templates/sources.list.erb file which is not adding a space in the optional architecture statement.

We actually expect an extra space. The previous build failed because a test is issued for location='', which indeed results in 2 spaces between the architecture specification and the release. According to the sources.list man page a location is always required though (unlike the missing/empty location in the :default_params of the source_spec test).
apenney pushed a commit that referenced this pull request Oct 23, 2013
apt::source templates/sources.list.erb generates invalid source line when architecture is provided.
@apenney apenney merged commit a350da7 into puppetlabs:master Oct 23, 2013
@apenney
Copy link

apenney commented Oct 23, 2013

Thanks!

@LukasAud LukasAud added the bugfix label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants