Edd Grant
2011-Apr-18 20:06 UTC
[Puppet Users] Could not find dependency Package[] for Package
Hi All, I am running Puppet on Ubuntu 10.10. AMD64. I have defined a class (below) with which I wish to install basic audio and video packages. class audio-video { $packagelist = ["vlc", "amarok"] package { $packagelist: ensure => installed, # Require xine to be installed prior to the installation of amarok for mp3 playback. require => Package["libxine1-ffmpeg"] } } When I run the above class I get the following error: Could not find dependency Package[libxine1-ffmpeg] for Package[amarok] at /etc/puppet/ manifests/classes/audio-video.pp:8 However if I change the class as follows everything works fine: class audio-video { # In this example we are not being picky about ordering of installation of libxine1-ffmpeg $packagelist = ["vlc", "amarok", "libxine1-ffmpeg"] package { $packagelist: ensure => installed, } } Although it is not operationally important I prefer the style of the first example (using require => Package) since I believe it enforces ordering, which in some cases may be very important. Is there something wrong with the definition in the first example? Does anyone have any idea why it doesn''t work? Many thanks, Edd -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Denmat
2011-Apr-18 20:50 UTC
Re: [Puppet Users] Could not find dependency Package[] for Package
Hi, Where is> Package["libxine1-ffmpeg"]declared in the first example? You would need a package resource named libxine.. for puppet to reference. Cheers, Den On 19/04/2011, at 6:06, Edd Grant <edd@eddgrant.com> wrote:> Hi All, > > I am running Puppet on Ubuntu 10.10. AMD64. I have defined a class > (below) with which I wish to install basic audio and video packages. > > class audio-video { > $packagelist = ["vlc", "amarok"] > > package { $packagelist: > ensure => installed, > # Require xine to be installed prior to the installation of amarok > for mp3 playback. > require => Package["libxine1-ffmpeg"] > } > } > > When I run the above class I get the following error: Could not find > dependency Package[libxine1-ffmpeg] for Package[amarok] at /etc/puppet/ > manifests/classes/audio-video.pp:8 > > However if I change the class as follows everything works fine: > > class audio-video { > # In this example we are not being picky about ordering of > installation of libxine1-ffmpeg > $packagelist = ["vlc", "amarok", "libxine1-ffmpeg"] > > package { $packagelist: > ensure => installed, > } > } > > Although it is not operationally important I prefer the style of the > first example (using require => Package) since I believe it enforces > ordering, which in some cases may be very important. Is there > something wrong with the definition in the first example? Does anyone > have any idea why it doesn''t work? > > Many thanks, > > Edd > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Edd Grant
2011-Apr-18 21:18 UTC
[Puppet Users] Re: Could not find dependency Package[] for Package
Oh crap - I see what you mean. Somehow I''d convinced myself that Package["libxine1-ffmpeg"] should directly invoke my repository manager but of course that is not the case. Thanks. Edd On Apr 18, 9:50 pm, Denmat <tu2bg...@gmail.com> wrote:> Hi, > > Where is> Package["libxine1-ffmpeg"] > > declared in the first example? > > You would need a package resource named libxine.. for puppet to reference. > > Cheers, > Den > > On 19/04/2011, at 6:06, Edd Grant <e...@eddgrant.com> wrote: > > > Hi All, > > > I am running Puppet on Ubuntu 10.10. AMD64. I have defined a class > > (below) with which I wish to install basic audio and video packages. > > > class audio-video { > > $packagelist = ["vlc", "amarok"] > > > package { $packagelist: > > ensure => installed, > > # Require xine to be installed prior to the installation of amarok > > for mp3 playback. > > require => Package["libxine1-ffmpeg"] > > } > > } > > > When I run the above class I get the following error: Could not find > > dependency Package[libxine1-ffmpeg] for Package[amarok] at /etc/puppet/ > > manifests/classes/audio-video.pp:8 > > > However if I change the class as follows everything works fine: > > > class audio-video { > > # In this example we are not being picky about ordering of > > installation of libxine1-ffmpeg > > $packagelist = ["vlc", "amarok", "libxine1-ffmpeg"] > > > package { $packagelist: > > ensure => installed, > > } > > } > > > Although it is not operationally important I prefer the style of the > > first example (using require => Package) since I believe it enforces > > ordering, which in some cases may be very important. Is there > > something wrong with the definition in the first example? Does anyone > > have any idea why it doesn''t work? > > > Many thanks, > > > Edd > > > -- > > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Felix Frank
2011-Apr-19 09:32 UTC
Re: [Puppet Users] Could not find dependency Package[] for Package
> class audio-video { > # In this example we are not being picky about ordering of > installation of libxine1-ffmpeg > $packagelist = ["vlc", "amarok", "libxine1-ffmpeg"] > > package { $packagelist: > ensure => installed, > } > } > > Although it is not operationally important I prefer the style of the > first example (using require => Package) since I believe it enforces > ordering, which in some cases may be very important. Is there > something wrong with the definition in the first example? Does anyone > have any idea why it doesn''t work?That''s a very sound way of thinking as far as puppet is concerned, and as already mentioned in the thread, you should both declare the package and require it. However, this is not an example in which you should enforce ordering. The rule of thumb (for me) is to *only* enforce order if a resource will not work unless its dependencies are met (e.g., you cannot have puppet edit a config unless the owning package is already installed etc.). As far as packages are concerned, those have excellent dependency support of their own. If amarok doesn''t depend on a lib, it doesn''t make much sense to invent such a dependency. At the end of your run, all your packages *will* be present, so it shouldn''t make any difference (edge cases notwithstanding). HTH, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.