Story #897

Updated by almost 9 years ago

An ostree repository can contain lots of branches.    The structure of the repository makes finding the branch names less than straight forward.   

 For exmaple: 

 [jortel@localhost el7]$ tree refs 
 ├── heads 
 │   └── rhel-atomic-host 
 │         └── 7 
 │             └── x86_64 
 │                 ├── pulp 
 │                 └── standard 
 └── remotes 

 5 directories, 2 files 

 The branch names are: 
 * rhel-atomic-host/7/x86_64/pulp 
 * rhel-atomic-host/7/x86_64/standard 

 When users are creating an ostree repository in Pulp, they need to specify the list of branches they want synced which is information that users don't necessarily know.    Recently, ostree has added support for _Summary Files_.    This is a file contained in the repo that lists the branches.    It would be very helpful if Pulp could grab the _Summary_ information and store it in Pulp repository notes or perhaps a more suitable place such as the importer scratchpad. notes. 

 Example (something like): 

   Available Branches: [ 

 The anticipated flow would be: 
 # User creates the Pulp repository and does NOT specify any branches. 
 # Sync the repository. 
 # Look at the updated information. notes 
 # Update the repository and specify the desired branches picked from the list. 
 # Sync the repository. 

 The libostree API needs to be augmented to support fetching the summary.    This has been communicated to the ostree team and can be tracked with this bug [1].    I would be good if the _Summary_ file also contains the branch HEAD (commit) metadata so that properties such as _version_ can be provided in additional to just the branch names.    Summary files are optional so, Pulp will need to indicates that the information is not available when the Summary does not exist.