def get_mpkg_ids(mpkg):
 mpkg = _quote(mpkg)
 package_infos = []
 base_path = os.path.dirname(mpkg)
 cmd = 'find {0} -name *.pkg'.format(base_path)
 out = __salt__['cmd.run'](cmd, python_shell=True)
 pkg_files = out.split('\n')
 for p in pkg_files:
  package_infos.extend(get_pkg_id(p))
 return package_infos

def get_mpkg_ids ( mpkg ) : mpkg = _quote ( mpkg ) package_infos = [ ] base_path = os . path . dirname ( mpkg ) cmd = 'find {0} -name *.pkg' . format ( base_path ) out = __salt__ [ 'cmd.run' ] ( cmd , python_shell = True ) pkg_files = out . split ( '\n' ) for p in pkg_files : package_infos . extend ( get_pkg_id ( p ) ) return package_infos
attempt to get the package ids from a mounted .