# File lib/puppet/provider/package/aptitude.rb, line 11 11: def aptget(*args) 12: args.flatten! 13: # Apparently aptitude hasn't always supported a -q flag. 14: if args.include?("-q") 15: args.delete("-q") 16: end 17: output = aptitude(*args) 18: 19: # Yay, stupid aptitude doesn't throw an error when the package is missing. 20: if args.include?(:install) and output =~ /Couldn't find any package/ 21: raise Puppet::Error.new( 22: "Could not find package %s" % self.name 23: ) 24: end 25: end