def _pkg(jail=None, chroot=None, root=None):
 ret = ['pkg']
 if jail:
  ret.extend(['-j', jail])
 elif chroot:
  ret.extend(['-c', chroot])
 elif root:
  ret.extend(['-r', root])
 return ret

def _pkg ( jail = None , chroot = None , root = None ) : ret = [ 'pkg' ] if jail : ret . extend ( [ '-j' , jail ] ) elif chroot : ret . extend ( [ '-c' , chroot ] ) elif root : ret . extend ( [ '-r' , root ] ) return ret
returns the prefix for a pkg command .