Package: cfengine2 Version: 2.1.20-1 Severity: normal The code for the "package" action does only look at a package's version when comparing an installed version against what the user supplies, but totally ignores the version when actually running apt-get. this becomes a problem whenever apt-get's default choice needs to be overruled.
as an example consider this scenario: i have the fuse-utils package from sarge but need the one from backports. but as i don't want anything else from backports, i can not use "apt-get -t sarge-backports" as DPKGInstallCommand (and it is not possible to set the command specifically for particular packages, one can only choose from the 3 families rpm/dpkg/sun). --- control: DefaultPkgMgr = ( dpkg ) pkgmgr = ( dpkg ) DPKGInstallCommand = ( "/usr/bin/apt-get -y install %s") actionsequence = ( packages ) packages: fuse-utils version="2.5.3-1bpo1" action=install --- the result of running cfagent -v: --- Package: fuse-utils Comparison result: lt Package install list for dpkg is: fuse-utils cfengine:cluon: Installing package(s) fuse-utils using /usr/bin/apt-get -y install fuse-utils cfengine:cluon: cfengine:cluon:package install: Reading Package Lists... cfengine:cluon: cfengine:cluon:package install: Building Dependency Tree... cfengine:cluon: cfengine:cluon:package install: fuse-utils is already the newest version. --- clearly this means that the version stuff doesn't work when one has to mix different sources. at the least, the docs should be updated to spell out that the version attribute only covers the comparison operation and that the package manager will have to guess from the name only. a proper fix would involve some extension of the installation logic (src/do.c, line 2713++): some kind of "desired_version" attribute may be needed, if the "version" attribute is used with a "cmp" other than "eq". furthermore, a translation into the package manager's way of specifying the version to install would be required. an alternative fix might be to support multiple installer programs, so that one can set up a dpkg-stable and a dpkg-backports installer which are selected in the per-package stanza. as a workaround for now one can use packagenames with the versions embedded, ie. "fuse-utils/sarge-backports" or "fuse-utils=2.5.3-1bpo1", and ignore the cfengine version comparison mechanism. this results in apt-get being run unconditionally, but as apt-get is idempotent this is not a problem beyond cluttering up cfengine's diagnostic output. regards az -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]