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

apt_get package module fails to install packages promised as the path to a package file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: To Do
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: 3.18.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      Unable to install local packages using local file as the promiser:

               "$(my_packages)"
                 policy => "present",
                 package_module => apt_get,
                 classes => results( "bundle", "$(this.promiser)" ),
                 if => isgreaterthan(length("my_packages"),"0"),
                 comment => "Install packages from local repository";
      

      Where my_packages is an slist of absolute paths of packages

      Output of the particular packages promise from the verbose log:

         
         verbose: P: .........................................................
         verbose: P: BEGIN promise 'promise_local_cf_60' of type "packages" (pass 2)
         verbose: P:    Promiser/affected object: '/opt/my/staging/helloworld-0.0.1.de'
         verbose: P:    Part of bundle: local
         verbose: P:    Base context class: Uploads_repaired
         verbose: P:    "if" class condition: any
         verbose: P:    Stack path: /default/local/packages/'/opt/my/staging/helloworld-0.0.1.deb'[2]
         verbose: P:
         verbose: P:    Comment:  Install packages from local repository
         verbose: Skipping installed packages package cache update.
         verbose: Command '/var/cfengine/bin/cfengine-selected-python /var/cfengine/modules/packages/apt_get file-install' returned with non zero return code: 2
             info: Some error occurred while communicating with package module while installing package.
            error: Error installing package '/opt/my/staging/helloworld-0.0.1.deb'
         verbose: C:    + promise outcome class '_opt_my_staging_helloworld_0_0_1_deb_reached'
         verbose: C:    + promise outcome class '_opt_my_staging_helloworld_0_0_1_deb_error'
         verbose: C:    + promise outcome class '_opt_my_staging_helloworld_0_0_1_deb_not_kept'
         verbose: C:    + promise outcome class '_opt_my_staging_helloworld_0_0_1_deb_failed'
         verbose: A: Promise NOT KEPT!
         verbose: P: END packages promise (/opt/my/staging/helloworl...)
      

      stderr:

         root@host:/var/cfengine/masterfiles# cf-agent -vK > output
         dpkg: warning: 'ldconfig' not found in PATH or not executable
         dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
         dpkg: error: 2 expected programs not found in PATH or not executable
         Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
         dpkg: warning: 'ldconfig' not found in PATH or not executable
         dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
         dpkg: error: 2 expected programs not found in PATH or not executable
         Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
       

      This is because we use dpkg to install local files instead of apt-get.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            a10042 Nick Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: