Hi All,

I'm trying to install packages using the dpkg provider on Ubuntu that leave 
the package unconfigured because of missing dependencies. After installing 
all packages, I need to run "apt-get -f install -y" to fix the 
dependencies. Now with puppet I did not find a way to do so yet. 

I'm trying to do the following:
......
package { "mypackage":
    provider => dpkg,
    ensure => installed,
    source => "/tmp/mypkg/mypackage.deb",
    before => Exec['apt-get fix'],
  }
  exec { "apt-get fix":
    command => "/usr/bin/apt-get -f install -y",
  }
......

But dpkg exits with a failure, and therefore the exec of "apt-get -f 
install -y" is skipped because of failed (puppet) dependencies.

Error: /Stage[main]/mymodule::mypkg/Package[mypackage]/ensure: change from 
absent to present failed: Execution of '/usr/bin/dpkg --force-confold -i 
/tmp/mypkg/mypackage.deb' returned 1: (Reading database ... 84559 files and 
directories currently installed.)
Preparing to replace ..... (using .../mypackage.deb) ...
Unpacking replacement mypackage ...
dpkg: dependency problems prevent configuration of ....: etc

.....
Warning: /Stage[main]/Vswitch::Mypkg/Exec[apt-get fix]: Skipping because of 
failed dependencies

Any ideas on how I can make this work? can I somehow ignore the return 
code? Is there an great elegant way to work around this?

Many thanks! Any help is really appreciated.
Yves


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to