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

Request for a way to check if a package is installed

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Rejected
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I'd like to audit if a package is installed.

      I want to query the package manager to find out if package X version Y is installed.

      I do NOT want to install it, I just want to check.

      I would use this to gather information about the system (classify it).

      Perhaps a packageexists() function?

      examples:

      check if JDK is installed:

      {{{
      classes:
      "have_jdk"
      expression => packageexists("jdk");
      }}}

      Check if JDK-1.7.0_60 is installed:

      {{

      { classes: "have_jdk_7u60" expression => packageexists("jdk-1.7.0_60"); }}

      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              atsaloli Aleksey Tsalolikhin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: