Conversation
smira
left a comment
There was a problem hiding this comment.
Thanks, I feel positive overall about this change.
Several things in addition to comments:
- Looks like PR should be rebased
- We need some sorted of system (functional) tests which would cover this new feature
- We need some docs
| gom 'github.com/golang/snappy', :commit => '723cc1e459b8eea2dea4583200fd60757d40097a' | ||
| gom 'github.com/syndtr/goleveldb/leveldb', :commit => '917f41c560270110ceb73c5b38be2a9127387071' | ||
| gom 'github.com/ugorji/go/codec', :commit => '71c2886f5a673a35f909803f38ece5810165097b' | ||
| gom 'github.com/ulikunitz/xz', :commit => 'f852725cf3ed4e7dca9bd458fe881ff02b27eae4' |
There was a problem hiding this comment.
This library says it's "alpha quality", at the same time we have xz decompression via github.com/smira/go-xz (which is using external process).
Can we keep one or another, or completely skip .xz for now? (until Go support becomes more mature?)
| compressable bool | ||
| onlyGzip bool | ||
| ignoreFlat bool | ||
| compressOnly bool |
There was a problem hiding this comment.
what's the difference between ignoreFlat and compressOnly ?
| } | ||
|
|
||
| for _, ext := range exts { | ||
| if file.compressOnly && !(ext == ".gz" || ext == ".bz2" || ext == ".xz") { |
There was a problem hiding this comment.
if ignoreFlat removes empty ext, what does this check do?
|
|
||
| // GetAppStream returns full path list of appstream files | ||
| func (p *PublishedRepo) GetAppStream(component string) ([]string, error) { | ||
| if utils.Config.AppStreamDir == "" { |
There was a problem hiding this comment.
The way aptly is implemented, it is supposed that Config object is not accessed from this level.
I would suggest two changes:
- push
AppStreamDirtoContext - pass
AppStreamDirto this method as parameter (same below inpublish.go).
There was a problem hiding this comment.
The Publish function below will call the GetAddonFiles method. Should I pass the AppStreamDir all the way down from the API and CLI calls?
|
Closing in favor of #473 |
So this is a basic implementation for appstream support #384
This is my first golang code so please forgive any bad practices.
This expects you to have a file path similar to the setup repository with uncompressed appstream files like such:
/var/appstream/stable/dists/xenial/main/Components-amd64.yml. You would then set theappStreamDirfield in the aptly configuration file to/var/appstream. On publish aptly would then compress the files as needed, and use them in Release file.More improvements: