code: def get_pkg_list(self):
          
          if self.query_command:
              cmd = self.query_command
              pkg_list = shell_out(
                  cmd, timeout=0, chroot=self.chroot
              ).splitlines()
  
              for pkg in pkg_list:
                  if '|' not in pkg:
                      continue
                  elif pkg.count("|") == 1:
                      name, version = pkg.split("|")
                      release = None
                  elif pkg.count("|") == 2:
                      name, version, release = pkg.split("|")
                  self.packages[name] = {
                      'name': name,
                      'version': version.split(".")
                  }
                  release = release if release else None
                  self.packages[name]['release'] = release
  
          return self.packages
docs: Returns a dictionary of packages in the following
          format::
  
              {'package_name': {'name': 'package_name',
                                'version': 'major.minor.version'}}