Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7280

Optimise pacman execution time by running fewer commands

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: PUP 4.8.2
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
    • Environment:

      Arch Linux

    • Template:
    • QA Risk Assessment:
      Needs Assessment

      Description

      For every package resource Puppet does the following:

      Debug: Executing: '/usr/bin/pacman -Sy'
      Debug: Executing: '/usr/bin/pacman -Sg package-name'
      Debug: Executing: '/usr/bin/pacman -Sp --print-format %v package-name'
      

      That is, refresh the package database, get the names of packages in a group (if the name is a group, otherwise return code 1):

      $ pacman -Sg i3
      i3 i3-wm
      i3 i3lock
      i3 i3status
      

      , and finally print the version number of a single package (presumably each package if a group was specified):

      $ /usr/bin/pacman -Sp --print-format %v bash
      4.4.012-2
      

      It would be simple to join the two latter commands into one, which works both for groups and individual packages:

      $ pacman -Sp --print-format '%n %v' i3
      libev 4.24-1
      yajl 2.1.0-1
      i3-wm 4.13-1
      i3lock 2.8-1
      wireless_tools 30.pre9-1
      confuse 3.0-1
      i3status 2.11-1
      $ pacman -Sp --print-format '%n %v' bash
      bash 4.4.012-2
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                l0b0 Victor Engmark
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: