Module: Evesync::OS::BasePackageManager

Included in:
Dpkg, Rpm
Defined in:
lib/evesync/os/linux/base_package_manager.rb

Instance Method Summary collapse

Instance Method Details

#changesObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/evesync/os/linux/base_package_manager.rb', line 11

def changes
  # make hash of all packages
  snapshot = make_pkg_snapshot
  # diff with last version
  diff = HashDiff.diff(@packages, snapshot)
  # parse changes into IPC::Data::Package array
  packages = parse_pkg_diff(diff)
  # use new hash as default
  # FIXME: wait if the changes were saved
  #        and properly handled
  @packages = snapshot
  packages
end

#initializeObject



7
8
9
# File 'lib/evesync/os/linux/base_package_manager.rb', line 7

def initialize
  @packages = make_pkg_snapshot
end