Issue #12052 has been updated by Thomas Nygreen.
Dominic Cleal wrote: > I think first that a bug should be filed against aptitude itself, I have filed a bug report against aptitude at [1], but it looks like aptitude is keen on returning 0, no matter what happens, so I don't think one should rely on that exit status code. > Perhaps also it should be addressed at a higher level in Puppet, either in > the type or elsewhere to ensure the 'ensure' property is now in-sync? The logical interpretation of 'ensure present' or 'ensure latest' is that puppet should actually ensure that the package is installed. So I think that checking with dpkg makes sense anyway. [1] https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/919216 ---------------------------------------- Bug #12052: No error message printed if package installation fails due to broken dependencies https://projects.puppetlabs.com/issues/12052 Author: Thomas Nygreen Status: Accepted Priority: Normal Assignee: Category: package Target version: Affected Puppet version: 2.7.9 Keywords: aptitude debian Branch: When using a package statement to install a package, and that package has broken dependencies, puppet continues without printing an error message. I found out that `aptitude -y install package-name` returns a 0 exit status code even if the package name does not exist, or the package has broken dependencies. Puppet already reads the output from aptitude to check for the first case, but misses the case with broken dependencies. Instead of searching for /Couldn't find any package/ in the output from aptitude, the install routine should check if the package was actually installed, using something like dpkg-query -W -f='${Status}' package-name -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
