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

Problem when installing the same package with PECL and APT #473

Closed
wants to merge 7 commits into from
Closed

Problem when installing the same package with PECL and APT #473

wants to merge 7 commits into from

Conversation

leopoiroux
Copy link

Pull Request (PR) description

If you want to install a package with PECL and APT on the same node (ex: memcached), an error appears because Package["memcached"] is already defined. By prefixing the class name and specifying the "name" key, this problem is solved.

This Pull Request (PR) fixes the following issues

Fixes #320

If you want to install a package with PECL and APT on the same node (ex: memcached), an error appears because Package["memcached"] is already defined. By prefixing the class name and specifying the "name" key, this problem is solved.
@bastelfreak bastelfreak added bug Something isn't working needs-tests tests-fail labels Aug 31, 2018
@bastelfreak
Copy link
Member

Hi @leopoiroux , thanks for the fix. Can you please write a unit or acceptance test for this change?

@leopoiroux
Copy link
Author

Yes !!! All checks have passed ;)

@bastelfreak
Copy link
Member

Can you please add an acceptance test that installs a package via APT + one via PECL? The current tests are located at https://github.com/voxpupuli/puppet-php/tree/master/spec/acceptance. You can ping us always in our IRC channel #voxpupuli on freenode or at https://puppetcommunity.slack.com if you have any questions.

@leopoiroux
Copy link
Author

I don't know how to do that. I'm sorry.

@bastelfreak
Copy link
Member

Do you have an example for the php::extension defined resource that installs a PECL package and one for APT? If so, I can throw it together into an acceptance tests.

@bastelfreak
Copy link
Member

Hey @leopoiroux, any update on this?

@leopoiroux
Copy link
Author

Hello,
I'm sorry but I don't know how to do an acceptance test.

My example is the installation of the "memcached" extension via PECL and the installation of the "memcached" package via APT.

Without my patch the class Package['memcached'] is already used by your class.
With my patch, I prefix your class with "phpmod_" and so no more conflict problems.

Currently, I had to trick my APT installation like this. But I shouldn't have to bypass this conflict.

class { '::php':
      extensions => {
            memcached => {
                provider => 'pecl',
                header_packages => ['libmemcached-dev'],
            },
      }
}

package { 'apt_memcached':
        name => 'memcached',
        ensure => 'present';
}

Thank you for your help.

@jonhattan
Copy link
Contributor

Duplicate of #320

@Dan33l
Copy link
Member

Dan33l commented Nov 12, 2018

Hi @leopoiroux , to be able to produce acceptance tests, the first step is to consider your are writing puppet code with your PR embedded in used module. And so, what is the working puppet code to use when we want to install a same php extension by apt and PERC ? Can you provide this peace of puppet code ?

Fill free to join us on IRC or Slack #voxpupuli channel. We can provide some guidance.

@leopoiroux leopoiroux closed this Aug 28, 2019
@pccibot
Copy link
Member

pccibot commented Aug 28, 2019

Dear @leopoiroux, thanks for the PR!

This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@pccibot
Copy link
Member

pccibot commented Aug 28, 2019

Dear @leopoiroux, thanks for the PR!

This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@Dan33l
Copy link
Member

Dan33l commented Aug 28, 2019

@leopoiroux @jonhattan this PR is not a duplicate.
The pointed #320 is an issue.

Feel free to reopen the PR to be able to continue the fix of issue.

@SimonHoenscheid SimonHoenscheid added this to will be solved by rewrite in Cleanup Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-tests
Projects
Cleanup
will be solved by rewrite
Development

Successfully merging this pull request may close these issues.

Extension package title collides with OS packages
5 participants