backend.createrepo

backend.createrepo.run_cmd_unsafe(comm_str, lock_name, lock_path='/var/lock/copr-backend')[source]
backend.createrepo.createrepo_unsafe(path, dest_dir=None, base_url=None)[source]

Run createrepo_c on the given path

Warning! This function doesn’t check user preferences. In most cases use createrepo(…)

Parameters:
  • path (string) – target location to create repo
  • lock – [optional]
  • dest_dir (str) – [optional] relative to path location for repomd, in most cases you should also provide base_url.
  • base_url (str) – optional parameter for createrepo_c, “–baseurl”
Return tuple:

(return_code, stdout, stderr)

backend.createrepo.add_appdata(path, username, projectname, lock=None)[source]
backend.createrepo.add_modules(path)[source]
backend.createrepo.createrepo(path, username, projectname, devel=False, base_url=None)[source]

Creates repodata. Depending on the “auto_createrepo” parameter it either creates the repodata directory in path, or in path/devel.

Parameters:
  • path – directory with rpms
  • username – copr project owner username
  • projectname – copr project name
  • devel – create the repository in ‘devel’ subdirectory
  • base_url – base_url to access rpms independently of repomd location
Returns:

tuple(returncode, stdout, stderr) produced by createrepo_c