Issue #22577 has been reported by Alex Jurkiewicz.

----------------------------------------
Bug #22577: Puppet 3.3 dpkg Package provider seems to break with some packages 
set absent
https://projects.puppetlabs.com/issues/22577

* Author: Alex Jurkiewicz
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* Affected Puppet version: 3.3.0
* Keywords: 
* Branch: 
----------------------------------------
Given the following manifest:

    package { 'nfs-common': ensure => absent }
    package { 'rpcbind': ensure => absent }

Our Puppet runs return only one error:

    Warning: Failed to match dpkg-query line "No packages found matching 
rpcbind.\n"

This is because the 'rpcbind' package no longer exists, according to dpkg-query:

    $ dpkg-query -W --showformat '${Status} ${Package} ${Version} :DESC: 
${Description}\n:DESC:\n' nfs-common
    unknown ok not-installed nfs-common  :DESC:
    :DESC:

    $ dpkg-query -W --showformat '${Status} ${Package} ${Version} :DESC: 
${Description}\n:DESC:\n' rpcbind
    No packages found matching rpcbind.

However, apt-get still thinks the package name is valid:

    # apt-get remove fakepackage
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package fakepackage

    # apt-get remove rpcbind
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package rpcbind is not installed, so not removed

The older behaviour (succeed silently when asked to remove a nonexistent 
package) is what we prefer. It means our manifests work across a wider variety 
of OS versions without explicit `if $lsbmajorversion` conditionals clogging up 
readability. We'd like this older behaviour back.


-- 
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 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-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to