upstream_sync icon indicating copy to clipboard operation
upstream_sync copied to clipboard

Group data (using comps.xml) should be used when showing the command with -c

Open rothgar opened this issue 9 years ago • 3 comments

If you run upstream_sync with --command it shows the command but the actual code will check if a comps.xml file exists and if it does it will append -g /repo/path/comps.xml The file should be checked for even when only viewing the reposync and createrepo command.

rothgar avatar May 16 '16 20:05 rothgar

I plan to make this change at some point but wanted to document it here to have something to work with.

rothgar avatar May 16 '16 20:05 rothgar

Generally I think this is a good idea. However, this could be a bit tricky to implement.

  • /repo/path/comps.xml won't exist before a sync
  • there is no way to know if the source (rsync, reposync) will have comps.xml
  • if comps.xml exists before sync, there is no guarantee it will exist after a sync (deleted from remote server)

What does createrepo do if comps.xmldoesn't exist? Does it fail?

pyther avatar May 24 '16 01:05 pyther

The code currently just looks for the file and uses it if it exists. I would use the same code block for showing the command too.

https://github.com/pyther/upstream_sync/blob/master/upstream_sync.py#L403-L406

rothgar avatar May 24 '16 03:05 rothgar