Class: Evesync::OS::Dpkg
- Inherits:
-
Object
- Object
- Evesync::OS::Dpkg
- Includes:
- BasePackageManager
- Defined in:
- lib/evesync/os/linux/deb/dpkg.rb
Instance Method Summary collapse
-
#make_pkg_snapshot ⇒ Object
Snapshot is a hash where key is a package name and value - it’s version.
Methods included from BasePackageManager
Instance Method Details
#make_pkg_snapshot ⇒ Object
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 |