rpmget.utils module

Utility functions.

rpmget.utils.check_for_rpm(pgm='rpm')[source]

Make sure we can find the rpm binary in the user environment and return a path string.

Returns:

program path string

Parameters:

pgm (str)

Return type:

str

rpmget.utils.download_progress_bin(url, dst, layout, timeout=10.0)[source]

Download a single binary with progress meter and default timeout. Create arch dir or top_dir depending on layout setting

Parameters:
  • url (str) – URL to download

  • dst (str) – top-level destination directory

  • timeout (float) – httpx client timeout

  • layout (str)

Returns:

name of downloaded file

Return type:

str

rpmget.utils.get_filelist(dirname, filepattern='*.rpm')[source]

Get path objects matching filepattern starting at dirname and return a list of matching paths for any files found.

Parameters:
  • dirname (str) – directory name to search in

  • filepattern (str) – extension of the form *.<ext>

Returns:

file path strings

Return type:

List[str]