I am currently writing a Python script for use on Linux machines that will loop through a list of packages and update their rpm spec files on a repository to include a certain change. My difficulty is with actually getting the spec files (which are blobs?) from the git repository. Some guidance would be appreciated on how to do two things.
- Get an rpm spec file given a package name from a git repository.
- Put the updated spec file back (commit?)
Thanks
Assuming the name of the file is
A/b/foo.specfor packageA, you wouldImplement the change_file and run_command functions. The run_command functions should run their arugments inside the repository.