Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Every time I run puppet on my ubuntu server, I get this:

notice: /Stage[main]/MyCompany::Role::MyApp/Package[ncurses-dev]/ensure: ensure changed 'purged' to 'present'

Every. Single. Time. Why does it do this for this particular package, and not for others, that appear in the same code block?

Package { ensure => present }
package {
    [
    "openjdk-6-jre-headless", # for SOLR
    "ncurses-dev",  # for varnishstat built from buildout, used by munin
    "pkg-config",
    "nfs-common",
    "gettext", # for building PO @deployment
    "libpcre3", "libpcre3-dev", # for varnish build / to be removed
    "libevent-dev", # for beantalk buid / to be removed
    "ffmpeg", # for thumbnails
    "gpac", # contains MP4Box, for making mp4 pseudo-streamables
    ]:;
  }

EDIT: running puppet in verbose/debug mode show this:

debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n ncurses-dev'

debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ncurses-dev'

Executing the first command gives this:

n[DEMO]root@ucdb:~#

notice the n before the prompt

Let's admit this is a formatting problem of the debug option, here is what I get when running it with some fixes:

/usr/bin/dpkg-query -W --showformat='${Status} ${Package} ${Version}\n' ncurses-dev

unknown ok not-installed ncurses-dev

Here is what I get when running aptitude search ncurses-dev:

v ncurses-dev

The package is virtual...

share|improve this question
    
Is something else removing the package? Puppet changed it from purged to present... ie it thinks its not installed. What OS/Disto are you using? –  Sirch Apr 12 '13 at 10:41
    
I don't see puppet saying it removes the package before... I also get this notice for other packages, on other nodes. Can't figure out why puppet thinks it is purged. I edited my message to add my distro: Ubuntu –  greg0ire Apr 12 '13 at 10:45
    
it seems puppet doesnt think its installed, can you run puppet with --debug and post the relevant output? –  Sirch Apr 12 '13 at 10:52

1 Answer 1

up vote 2 down vote accepted

The error appears because ncurses-dev is a virtual package.


 # apt-cache show ncurses-dev
N: Can't select versions from package 'ncurses-dev' as it is purely virtual
N: No packages found

You either want one of this two instead:


libncurses5-dev - developer's libraries for ncurses
libncursesw5-dev - developer's libraries for ncursesw

To know which one you're using, you may do this:

apt-cache showpkg ncurses-dev | sed '/Reverse Provides/,$!d'
Reverse Provides: 
libncurses5-dev 5.9-4
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.