Conversation
|
This is slow over ssh connections: Alternatives described in #4879 would require running as root or executing a command. |
This collects data about the present snap packages. It currently appllies to: - Ubuntu - Debian - Fedora Fixes: #4879 Signed-off-by: Christian Zunker <christian@mondoo.com>
| for _, file := range files { | ||
| manifest, err := afs.Open(file) | ||
| if err != nil { | ||
| log.Error().Err(err).Str("file", file).Msg("could not open manifest file") |
There was a problem hiding this comment.
should we not add continue here? otherwise manifest would be nil
There was a problem hiding this comment.
Good catch. Thank you.
There was a problem hiding this comment.
I opted not to defer but to explicitly close because of the loop.
| } | ||
| pkg, err := spm.parseSnapManifest(manifest) | ||
| if err != nil { | ||
| log.Error().Err(err).Str("file", file).Msg("could not parse manifest file") |
There was a problem hiding this comment.
Good catch. Thank you.
| } | ||
| log.Debug().Int("updates", len(available)).Msg("mql[packages]> available updates") | ||
| for k, v := range available { | ||
| availableList[k] = v |
There was a problem hiding this comment.
could it be that if two different package managers (e.g., apt and snap) both provide an update for the same package name (e.g., "firefox"), the entry would be overwritten?
Don't know if this could be a problem or not
There was a problem hiding this comment.
Currently not, because snap does not provide available at the moment.
|
fun fact, I was working in the team responsible for snaps at Canonical :) |
Signed-off-by: Christian Zunker <christian@mondoo.com>
We need to talk 😄 |
This collects data about the present snap packages. It currently appllies to:
Fixes: #4879