mirror of
https://github.com/clearlinux/mixer-tools.git
synced 2026-08-19 03:57:28 +00:00
Fix generated warning for delta packs
While creating delta packs, only possible delta files are found. If delta file is not found, log the error in debug mode instead of generating warning, as delta might not have been created for valid reason. fixes #628 Signed-off-by: Ashlesha Atrey ashlesha.atrey@intel.com
This commit is contained in:
committed by
Reagan Lopez
parent
24abcb0551
commit
5ca50d0873
@@ -84,7 +84,7 @@ func createDeltaPacks(fromMoM *swupd.Manifest, toMoM *swupd.Manifest, printRepor
|
||||
|
||||
if len(info.Warnings) > 0 {
|
||||
for _, w := range info.Warnings {
|
||||
log.Warning(log.Mixer, " Bundle %s: %s", b.Name, w)
|
||||
log.Warning(log.Mixer, "Bundle %s: %s", b.Name, w)
|
||||
}
|
||||
}
|
||||
report := fmt.Sprintf(" Finished delta pack for bundle %q from %d to %d\n", b.Name, b.FromVersion, b.ToVersion)
|
||||
|
||||
+4
-1
@@ -294,7 +294,10 @@ func WritePack(w io.Writer, fromManifest, toManifest *Manifest, outputDir, chroo
|
||||
|
||||
func copyFromDelta(tw *tar.Writer, delta *Delta) (fallback bool, err error) {
|
||||
f, err := os.Open(delta.Path)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
log.Debug(log.Mixer, err.Error())
|
||||
return true, nil
|
||||
} else if err != nil {
|
||||
return true, err
|
||||
}
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user