Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1818

apt-get update is not invoked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Promise type: packages
    • Labels:
      None

      Description

      I have a promise that looks like this:

      <pre>
      packages:
      "cfengine-community"
      package_policy => "addupdate",
      package_select => ">=",
      package_version => "3.6.4-1",
      package_method => apt,
      classes => if_repaired("...");
      </pre>

      The problem is that both 3.6.3 and 3.6.4 do not update the packages index in case if the version constraint cannot fulfilled.

      That's how the corresponding logs look like:

      <pre>
      Looking for an installed package older than (cfengine-community,3.6.4-1,*) [name,version,arch]
      Found installed package (cfengine-community,3.6.3-1,default) [name,version,arch]
      Executing '/usr/bin/env DEBIAN_FRONTEND=noninteractive LC_ALL=C PATH=/bin:/sbin/:/usr/bin:/usr/sbin /usr/bin/dpkg --compare-versions '3.6.3-1' lt '3.6.4-1''
      CompareVersions: Checked whether package version 3.6.3-1 < 3.6.4-1: yes
      Installed package (cfengine-community,3.6.3-1,default) [name,version,arch] is older than latest available (cfengine-community,3.6.4-1,*) [name,version,arch] - updating
      Schedule package for update
      Looking for a package manager called '/usr/bin/env DEBIAN_FRONTEND=noninteractive LC_ALL=C PATH=/bin:/sbin/:/usr/bin:/usr/sbin /usr/bin/apt-get o Dpkg::Options::=force-confold -o Dpkg::Options::=-force-confdef --yes install'
      </pre>

      So cfengine has successfully detected that constraint is not satisfied and instead of `apt-get update` it run `apt-get install` once again.

      It worked well in at least 3.5.2 which I am currently migrating from

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              zerkms Ivan Kurnosov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel