Jira (PUP-9975) Unable to install g++ package using dpkg provider

6 views
Skip to first unread message

Trey Dockendorf (JIRA)

unread,
Aug 24, 2019, 3:49:03 PM8/24/19
to puppe...@googlegroups.com
Trey Dockendorf created an issue
 
Puppet / Bug PUP-9975
Unable to install g++ package using dpkg provider
Issue Type: Bug Bug
Assignee: Unassigned
Components: Types and Providers
Created: 2019/08/24 12:48 PM
Priority: Major Major
Reporter: Trey Dockendorf

Puppet Version: 6.8.0
Puppet Server Version: NA
OS Name/Version: Ubuntu 16.04 and Ubuntu 18.04

Desired Behavior:

Install "g++" package using dpkg provider

Actual Behavior:

I get this message:

 

Info: Package g++ is virtual, defaulting to binutils

If I do simple "apt-get install g+", that works fine but unable to do that with changes made to dpkg provider in 6.8.0. I think the "" sign is breaking the parsing added here:

 

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/dpkg.rb#L126

 

The issue was introduced in PUP-9824 I think. If I run the dpkg command being used the first line that contains a "g" is "binutils" so I think what's getting matched is just "g" and not "g++".

 

Reproduce:

Install Puppet on Ubuntu 16.04 or Ubuntu 18.04 and try to install g++

 

puppet resource package g++ ensure=installed

 

 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Trey Dockendorf (JIRA)

unread,
Aug 25, 2019, 6:02:02 PM8/25/19
to puppe...@googlegroups.com
Trey Dockendorf updated an issue
Change By: Trey Dockendorf
*Puppet Version: 6.8.0*
*Puppet Server Version: NA*
*OS Name/Version: Ubuntu 16.04 and Ubuntu 18.04*

*Desired Behavior:*


Install "g++" package using dpkg provider

*Actual Behavior:*

I get this message:

 
{noformat}

Info: Package g++ is virtual, defaulting to binutils
{noformat}
If I do simple "apt-get install g++", that works fine but unable to do that with changes made to dpkg provider in 6.8.0. I think the "+
+ " sign is breaking the parsing added here:


 

[https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/dpkg.rb#L126]

 

The issue was introduced in PUP-9824 I think. If I run the dpkg command being used the first line that contains a "g" is "binutils" so I think what's getting matched is just "g" and not "g++".

 

Reproduce:

Install Puppet on Ubuntu 16.04 or Ubuntu 18.04 and try to install g++



 
{noformat}

puppet resource package g++ ensure=installed
{noformat}
 

 

garrett honeycutt (JIRA)

unread,
Aug 25, 2019, 9:29:02 PM8/25/19
to puppe...@googlegroups.com

Trey Dockendorf (JIRA)

unread,
Aug 26, 2019, 9:02:03 AM8/26/19
to puppe...@googlegroups.com

This issue is also occurring for non-regex issues.

Info: Package make is virtual, defaulting to automake

The package make is not virtual. I think simply Regexp.escape isn't sufficient to address this issue.

Reply all
Reply to author
Forward
0 new messages