Project

General

Profile

« Previous | Next » 

Revision 74e2fc5f

Added by Amit Upadhye over 1 year ago

Fixes #35401 - self upgrade for Foreman and Katello (#637)

  • Fixes #35401 - self upgrade for Foreman and Katello

View differences:

lib/foreman_maintain/package_manager/apt.rb
require 'open3'
module ForemanMaintain::PackageManager
class Apt < Base
def installed?(packages)
......
apt_action('upgrade --dry-run', packages, :with_status => with_status)
end
def update_available?(package)
output, status = Open3.capture2("apt-get install #{package} --dry-run")
status.success? && output.include?("Inst #{package}")
end
def list_installed_packages(queryfm = '${binary:Package}-${VERSION}\n')
# The queryfm should only include valid tag(s) as per `dpkg-query` man page.
# If any special formatting is required with querytag then it should be provided with tag i.e,

Also available in: Unified diff