lib/jah/act_pkg/pacman.rb
def info(pkg)
      ary = run("pacman -Qi #{pkg.name}").to_a
      return nil if ary[0] =~ /error/
      ary.map! do |i|
        val = i.split("\s:\s")[1]
        val.strip if val
      end #.reject(&:nil?)
      { :url => ary[2], :license => ary[3], :groups => ary[4], :provides => ary[5],
      :depends => ary[6], :required => ary[8], :size => ary[12], :arch => ary[13],
      :desc => ary[18]}
    end
# -Qi info about a pkg (only installed ones)
Qi info about a pkg (only installed ones)
Qi info about a pkg ( only installed ones )
def info(pkg)
      ary = run("pacman -Qi #{pkg.name}").to_a
      return nil if ary[0] =~ /error/
      ary.map! do |i|
        val = i.split("\s:\s")[1]
        val.strip if val
      end 
      { :url => ary[2], :license => ary[3], :groups => ary[4], :provides => ary[5],
      :depends => ary[6], :required => ary[8], :size => ary[12], :arch => ary[13],
      :desc => ary[18]}
    end
def info ( pkg ) ary = run ( "pacman -Qi #{pkg.name}" ) . to_a return nil if ary [ 0 ] =~ / error / ary . map! do | i | val = i . split ( "\s:\s" ) [ 1 ] val . strip if val end { :url => ary [ 2 ] , :license => ary [ 3 ] , :groups => ary [ 4 ] , :provides => ary [ 5 ] , :depends => ary [ 6 ] , :required => ary [ 8 ] , :size => ary [ 12 ] , :arch => ary [ 13 ] , :desc => ary [ 18 ] } end
Qi info about a pkg (only installed ones)
Qi info about a pkg ( only installed ones )
#.reject(&:nil?)
pkg