Skip to content

Commit 00269a4

Browse files
committed
Merge branch 'upstream/master' into bs-393
* upstream/master: Take packages nevra from build meta field (#566) Fix modular information display in build feed (#565)
2 parents 72bd644 + faee113 commit 00269a4

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

src/components/BuildFeedItem.vue

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
<q-card square class="shadow-1">
33
<q-card-section class="no-padding row">
44
<div style="overflow: auto" class="col-10">
5-
<div
6-
class="q-pt-sm q-pl-md"
7-
v-if="rpm_module && Object.keys(rpm_module).length !== 0"
8-
>
5+
<div class="q-pt-sm q-pl-md" v-if="rpm_module">
96
<span>
107
<b>Built modules:&nbsp;</b>
118
</span>
@@ -148,14 +145,13 @@
148145
return new Date(this.build.created_at).toLocaleString()
149146
},
150147
rpm_module() {
151-
let rpm_module = []
152-
this.build.tasks.forEach((task) => {
148+
for (const task of this.build.tasks) {
149+
if (task.arch === 'src') continue
153150
if (task.rpm_modules) {
154-
rpm_module = task.rpm_modules[0]
155-
return
151+
return task.rpm_modules[0]
156152
}
157-
})
158-
return rpm_module
153+
}
154+
return false
159155
},
160156
},
161157
methods: {

src/pages/CreateErrata.vue

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -577,21 +577,26 @@
577577
artifact.name.includes('debuginfo')
578578
)
579579
continue
580-
let newPkg = splitRpmFileName(artifact.name)
581-
let alreadyAdded = pkgs.find((pkg) => {
580+
let pkg = artifact.meta
581+
// TODO: Remove this fallback afte some time
582+
if (!pkg) {
583+
pkg = splitRpmFileName(artifact.name)
584+
pkg.epoch = 0
585+
}
586+
let alreadyAdded = pkgs.find((p) => {
582587
return (
583-
pkg.name === newPkg.name &&
584-
pkg.version === newPkg.version &&
585-
pkg.release === newPkg.release
588+
p.name === pkg.name &&
589+
p.version === pkg.version &&
590+
p.release === pkg.release
586591
)
587592
})
588593
if (alreadyAdded) continue
589594
pkgs.push({
590-
name: newPkg.name,
591-
epoch: 0,
592-
version: newPkg.version,
593-
release: newPkg.release,
594-
arch: newPkg.arch,
595+
name: pkg.name,
596+
epoch: pkg.epoch,
597+
version: pkg.version,
598+
release: pkg.release,
599+
arch: pkg.arch,
595600
reboot_suggested: false,
596601
build_id: build.id,
597602
})

0 commit comments

Comments
 (0)