From 7bcaed5baae1dc3de5c4b44b3362dc11a507393d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ka=C5=88kovsk=C3=BD?= Date: Fri, 13 Sep 2024 13:23:20 +0200 Subject: [PATCH 1/2] Change device type label to blivet --- src/actions/storage-actions.js | 17 ----------------- src/components/storage/MountPointMapping.jsx | 2 +- src/components/storage/ReclaimSpaceModal.jsx | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/actions/storage-actions.js b/src/actions/storage-actions.js index ef0871aca..53b75a11e 100644 --- a/src/actions/storage-actions.js +++ b/src/actions/storage-actions.js @@ -64,23 +64,6 @@ export const getDevicesAction = () => { const formatData = await getFormatData({ diskName: device }); devData.formatData = formatData; - // FIXME: https://github.com/storaged-project/blivet/issues/1258 - // This is a workaround for the issue with missing partition label human readable strings in blivet - try { - const partName = await cockpit.script(`udevadm info --query=property --name=${devData.path.v} | grep PARTNAME= | cut -d= -f2`); - const fsLabel = await cockpit.script(`udevadm info --query=property --name=${devData.path.v} | grep ID_FS_LABEL= | cut -d= -f2`); - devData.misc = { - fsLabel: fsLabel.trim(), - partName: partName.trim(), - }; - } catch (e) { - console.warn("Failed to get partition label", e); - devData.misc = { - fsLabel: "", - partName: "", - }; - } - deviceData[device] = devData; } catch (error) { if (error.name === "org.fedoraproject.Anaconda.Modules.Storage.UnknownDeviceError") { diff --git a/src/components/storage/MountPointMapping.jsx b/src/components/storage/MountPointMapping.jsx index 5abd76745..cd2ea1ccf 100644 --- a/src/components/storage/MountPointMapping.jsx +++ b/src/components/storage/MountPointMapping.jsx @@ -267,7 +267,7 @@ const DeviceColumnSelect = ({ deviceData, devices, handleRequestChange, idPrefix const ancestors = getDeviceAncestors(deviceData, device); const parentPartition = [device, ...ancestors].find(ancestor => deviceData[ancestor].type.v === "partition"); - const typeLabel = deviceData[parentPartition]?.misc.fsLabel || deviceData[parentPartition]?.misc.partName; + const typeLabel = device[parentPartition]?.attrs?.v?.["partition-type-name"] || ""; const formatType = deviceData[device]?.formatData.type.v; const format = deviceData[device]?.formatData.description.v; diff --git a/src/components/storage/ReclaimSpaceModal.jsx b/src/components/storage/ReclaimSpaceModal.jsx index 6e15f51d6..5529d26f6 100644 --- a/src/components/storage/ReclaimSpaceModal.jsx +++ b/src/components/storage/ReclaimSpaceModal.jsx @@ -238,7 +238,7 @@ const getDeviceRow = (disk, devices, level = 0, unappliedActions, setUnappliedAc const device = devices[disk]; const isDisk = device["is-disk"].v; const isPartition = device.type.v === "partition"; - const typeLabel = isPartition ? (device.misc.fsLabel || device.misc.partName) : ""; + const typeLabel = device.attrs?.v["partition-type-name"] || ""; const diskDescription = ( From 9baead89df650291146eaf289fabcd4cc4064221 Mon Sep 17 00:00:00 2001 From: Adam Kankovsky Date: Tue, 1 Oct 2024 14:38:05 +0200 Subject: [PATCH 2/2] Change anacondacorever due to changes in the backend --- packaging/anaconda-webui.spec.in | 2 +- test/reference | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/anaconda-webui.spec.in b/packaging/anaconda-webui.spec.in index 9516e0689..4ec767477 100644 --- a/packaging/anaconda-webui.spec.in +++ b/packaging/anaconda-webui.spec.in @@ -18,7 +18,7 @@ BuildRequires: gettext %endif %if 0%{?fedora} >= 41 -%global anacondacorever 41.2 +%global anacondacorever 42.5 %endif %global cockpitver 275 diff --git a/test/reference b/test/reference index ef77e5673..c0084559b 160000 --- a/test/reference +++ b/test/reference @@ -1 +1 @@ -Subproject commit ef77e5673058f1f286eebb64bc4b1ccb00604132 +Subproject commit c0084559b8757d03b1c26493d38d204cbdca22d1