voxpupuli/puppet-php

Howto solve package name conflict between apt and pecl

jkroepke opened this issue · 0 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.15.0
  • Ruby: bundled version of 6.15.0
  • Distribution: Ubuntu 20.04
  • Module version: 7.1.0

How to reproduce (e.g Puppet code you use)

# https://packages.ubuntu.com/focal/smbclient
package { 'smbclient':
  ensure => installed;
}

# https://pecl.php.net/package/smbclient
php::extension { 'smbclient':
  ensure => '1.0.0',
  provider => 'pecl',
  header_packages => ['libsmbclient-dev']
}

What are you seeing

apt smbclient installed, but no pecl one

Notice: pecl installation will fail silent, not duplicate package definition error.

What behaviour did you expect instead

I would like to install smbclient and pecl smbclient (both required for nextcloud)

Output log

Any additional information you'd like to impart

there the a parameter like real_package but if provider pecl is configure, it not used inside the code.

$real_package = $title

Since, changing the title of the package definition wont help here (duplicate resource conflict), it might be great if the name attribute of the package resource could be define, too.

See: https://puppet.com/docs/puppet/latest/types/package.html#package-attribute-name

Example:

package { 'pecl-smbclient':
  ensure   => '1.0.0',
  name     => 'smbclient',
  provider => 'pecl';
}

but I had to define this outside php::extension.