Class: Evesync::OS::Dpkg

Inherits:
Object
  • Object
show all
Includes:
BasePackageManager
Defined in:
lib/evesync/os/linux/deb/dpkg.rb

Instance Method Summary collapse

Methods included from BasePackageManager

#changes, #initialize

Instance Method Details

#make_pkg_snapshotObject

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



18
19
20
21
22
23
24
25
26
27
# 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