mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-12-04 18:36:26 +00:00
Fix metadata creation and simplify deduplication
This commit is contained in:
parent
0db0040f1d
commit
b699ae6dac
@ -220,11 +220,13 @@ func ProcessRPM(pd *ProcessData) {
|
||||
log.Fatalf("could not create metadata file: %v", err)
|
||||
}
|
||||
for _, source := range md.sourcesToIgnore {
|
||||
if source.expired {
|
||||
sourcePath := source.name
|
||||
|
||||
_, err := w.Filesystem.Stat(sourcePath)
|
||||
if source.expired || err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
sourcePath := source.name
|
||||
sourceFile, err := w.Filesystem.Open(sourcePath)
|
||||
if err != nil {
|
||||
log.Fatalf("could not open ignored source file %s: %v", sourcePath, err)
|
||||
@ -246,7 +248,7 @@ func ProcessRPM(pd *ProcessData) {
|
||||
log.Fatalf("could not write to metadata file: %v", err)
|
||||
}
|
||||
|
||||
path := fmt.Sprintf("%s", checksum)
|
||||
path := checksum
|
||||
if strContains(alreadyUploadedBlobs, path) {
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user