class Evesync::OS::Dpkg

Constants

PKG_QUERY

Public Instance Methods

make_pkg_snapshot() click to toggle source

Snapshot is a hash where key is a package name and value - it's version. This function returns a snapshot of a system package status for a moment

# File lib/evesync/os/linux/deb/dpkg.rb, line 18
def make_pkg_snapshot
  snapshot = {}
  query_output = `#{PKG_QUERY}`
  query_output.lines.each do |line|
    info = line.split
    snapshot[info[1]] = info[2]
  end

  snapshot
end