@@ -152,20 +152,20 @@ func (r *Syncer) StoreRepo() (err error) {
152
152
_ , checksumError := err .(* util.ChecksumError )
153
153
if checksumError {
154
154
log .Println (err .Error ())
155
- log .Printf ("Checksum did not match, presumably the repo was published while syncing, retrying...\n " )
155
+ log .Println ("Checksum did not match, presumably the repo was published while syncing, retrying..." )
156
156
continue
157
157
}
158
158
159
159
_ , signatureError := err .(* SignatureError )
160
160
if signatureError {
161
161
log .Println (err .Error ())
162
- log .Printf ("Signature not valid, presumably the repo was published while syncing, retrying...\n " )
162
+ log .Println ("Signature not valid, presumably the repo was published while syncing, retrying..." )
163
163
} else {
164
164
return err
165
165
}
166
166
}
167
167
168
- log .Printf ("Too many temporary errors, aborting...\n " )
168
+ log .Println ("Too many temporary errors, aborting..." )
169
169
return err
170
170
}
171
171
@@ -195,7 +195,7 @@ func (r *Syncer) storeRepo(checksumMap map[string]XMLChecksum) (err error) {
195
195
}
196
196
}
197
197
198
- log .Printf ("Committing changes...\n " )
198
+ log .Println ("Committing changes..." )
199
199
err = r .storage .Commit ()
200
200
if err != nil {
201
201
return
@@ -206,7 +206,7 @@ func (r *Syncer) storeRepo(checksumMap map[string]XMLChecksum) (err error) {
206
206
// downloadStoreApply downloads a repo-relative path into a file, while applying a ReaderConsumer
207
207
func (r * Syncer ) downloadStoreApply (relativePath string , checksum string , description string , hash crypto.Hash , f util.ReaderConsumer ) error {
208
208
log .Printf ("Downloading %v..." , description )
209
- //log.Printf("SYNCER: %v\n", r)
209
+
210
210
url := r .URL
211
211
url .Path = path .Join (r .URL .Path , relativePath )
212
212
body , err := ReadURL (url .String ())
@@ -237,20 +237,20 @@ func (r *Syncer) processMetadata(checksumMap map[string]XMLChecksum) (packagesTo
237
237
238
238
data := repomd .Data
239
239
for i := 0 ; i < len (data ); i ++ {
240
- log .Printf (data [i ].Location .Href )
240
+ log .Println (data [i ].Location .Href )
241
241
metadataLocation := data [i ].Location .Href
242
242
metadataChecksum := data [i ].Checksum
243
243
244
244
decision := r .decide (metadataLocation , metadataChecksum , checksumMap )
245
245
switch decision {
246
246
case Download :
247
- log .Printf ("...downloading" )
247
+ log .Println ("...downloading" )
248
248
err = r .downloadStoreApply (metadataLocation , metadataChecksum .Checksum , path .Base (metadataLocation ), hashMap [metadataChecksum .Type ], util .Nop )
249
249
if err != nil {
250
250
return
251
251
}
252
252
case Recycle :
253
- log .Printf ("...recycling" )
253
+ log .Println ("...recycling" )
254
254
r .storage .Recycle (metadataLocation )
255
255
}
256
256
@@ -267,7 +267,7 @@ func (r *Syncer) processMetadata(checksumMap map[string]XMLChecksum) (packagesTo
267
267
})
268
268
if err != nil {
269
269
log .Println (err .Error ())
270
- log .Printf ("Fallback to next repo type" )
270
+ log .Println ("Fallback to next repo type" )
271
271
// attempt to download Debian's Release file
272
272
err = r .downloadStoreApply (releasePath , "" , path .Base (releasePath ), 0 , func (reader io.ReadCloser ) (err error ) {
273
273
err = doProcessMetadata (reader , repoTypes ["deb" ])
@@ -298,7 +298,7 @@ func (r *Syncer) checkRepomdSignature(repomdReader io.Reader, repoType RepoType)
298
298
if err != nil {
299
299
uerr , unexpectedStatusCode := err .(* UnexpectedStatusCodeError )
300
300
if unexpectedStatusCode && uerr .StatusCode == 404 {
301
- log .Printf ("Got 404, ignoring..." )
301
+ log .Println ("Got 404, ignoring..." )
302
302
err = nil
303
303
}
304
304
}
@@ -307,7 +307,7 @@ func (r *Syncer) checkRepomdSignature(repomdReader io.Reader, repoType RepoType)
307
307
if err != nil {
308
308
uerr , unexpectedStatusCode := err .(* UnexpectedStatusCodeError )
309
309
if unexpectedStatusCode && uerr .StatusCode == 404 {
310
- log .Printf ("Got 404, ignoring..." )
310
+ log .Println ("Got 404, ignoring..." )
311
311
err = nil
312
312
}
313
313
}
0 commit comments