Venom1991 / refind-btrfs

Generate rEFInd manual boot stanzas from Btrfs snapshots
GNU General Public License v3.0
144 stars 8 forks source link

Remove duplicate partitions #51

Closed Sh3Rm4n closed 8 months ago

Sh3Rm4n commented 8 months ago

https://github.com/Venom1991/refind-btrfs/blob/8e0021a62d3d9446b8dcfdcdf0f97567dfdec232/src/refind_btrfs/system/fstab_command.py#L104

https://github.com/Venom1991/refind-btrfs/blob/8e0021a62d3d9446b8dcfdcdf0f97567dfdec232/src/refind_btrfs/system/fstab_command.py#L116

fstab files can reference partitions multiple times

Expand to see fstab example ```/etc/fstab # Static information about the filesystems. # See fstab(5) for details. # # /dev/sda2 UUID=e236ff63-85af-4097-a525-f37b7d182e2b / btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=256,subvol=/@ 0 0 # /dev/sda1 UUID=5D01-B29B /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2 # /dev/sda2 # UUID=e236ff63-85af-4097-a525-f37b7d182e2b /.snapshots btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=260,subvol=/@.snapshots 0 0 # /dev/sda2 UUID=e236ff63-85af-4097-a525-f37b7d182e2b /home btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=257,subvol=/@home 0 0 # /dev/sda2 UUID=e236ff63-85af-4097-a525-f37b7d182e2b /home/username/Projects btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=263,subvol=/@projects 0 0 # /dev/sdb2 UUID=01bfee92-10b9-42fd-88ba-a018abbe0086 /var/cache/pacman/pkg btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=260,subvol=/@pkg 0 0 # /dev/sda2 UUID=e236ff63-85af-4097-a525-f37b7d182e2b /var/log btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=258,subvol=/@log 0 0 # /dev/sdb2 UUID=01bfee92-10b9-42fd-88ba-a018abbe0086 /home/username/.cache btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=257,subvol=/@cache 0 0 # /dev/sdb2 UUID=01bfee92-10b9-42fd-88ba-a018abbe0086 /home/username/.conan/data btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=256,subvol=/@conan 0 0 # /dev/sdb2 UUID=01bfee92-10b9-42fd-88ba-a018abbe0086 /home/username/.cargo/ btrfs rw,relatime,ssd,compress=zstd,discard=async,space_cache=v2,subvolid=261,subvol=/@cargo 0 0 ```

thus returning a Partition multiple times.

https://github.com/Venom1991/refind-btrfs/blob/8e0021a62d3d9446b8dcfdcdf0f97567dfdec232/src/refind_btrfs/device/partition_table.py#L172 https://github.com/Venom1991/refind-btrfs/blob/8e0021a62d3d9446b8dcfdcdf0f97567dfdec232/src/refind_btrfs/device/partition_table.py#L183 https://github.com/Venom1991/refind-btrfs/blob/8e0021a62d3d9446b8dcfdcdf0f97567dfdec232/src/refind_btrfs/device/partition_table.py#L194

python backtrace ``` Nov 17 12:30:07 systemd[1]: Started Generate rEFInd manual boot stanzas from Btrfs snapshots. Nov 17 13:01:44 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: The '/.snapshots/1931' snapshot has been created. Nov 17 13:01:44 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the block devices using lsblk. Nov 17 13:01:44 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop0' using lsblk. Nov 17 13:01:44 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop0' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop1' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop1' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop2' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop2' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop3' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop3' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop4' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop4' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop5' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop5' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop6' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop6' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/loop7' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/loop7' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/sda' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/sda' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/sdb' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/sdb' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/sdc' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/sdc' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/sr0' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/sr0' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the physical partition table for device '/dev/zram0' using lsblk. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: Initializing the live partition table for device '/dev/zram0' using findmnt. Nov 17 13:01:45 /usr/lib/python3.11/site-packages/refind_btrfs/__main__.py[139597]: ERROR (refind_btrfs.service.snapshot_observer/snapshot_observer.py/run): An unexpected error happened, exiting... Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/refind_btrfs/service/snapshot_observer.py", line 45, in run self.dispatch_events(self.event_queue) File "/usr/lib/python3.11/site-packages/watchdog/observers/api.py", line 381, in dispatch_events handler.dispatch(event) File "/usr/lib/python3.11/site-packages/watchdog/events.py", line 283, in dispatch { File "/usr/lib/python3.11/site-packages/refind_btrfs/service/snapshot_event_handler.py", line 92, in on_created machine.run() File "/usr/lib/python3.11/site-packages/refind_btrfs/state_management/refind_btrfs_machine.py", line 102, in run while model.next_state(): ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/transitions/core.py", line 402, in trigger return self.machine._process(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/transitions/core.py", line 1211, in _process return trigger() ^^^^^^^^^ File "/usr/lib/python3.11/site-packages/transitions/core.py", line 416, in _trigger self._process(event_data) File "/usr/lib/python3.11/site-packages/transitions/core.py", line 439, in _process if trans.execute(event_data): ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/transitions/core.py", line 277, in execute self._change_state(event_data) File "/usr/lib/python3.11/site-packages/transitions/core.py", line 287, in _change_state event_data.machine.get_state(self.dest).enter(event_data) File "/usr/lib/python3.11/site-packages/transitions/core.py", line 129, in enter event_data.machine.callbacks(self.on_enter, event_data) File "/usr/lib/python3.11/site-packages/transitions/core.py", line 1146, in callbacks self.callback(func, event_data) File "/usr/lib/python3.11/site-packages/transitions/core.py", line 1167, in callback func(*event_data.args, **event_data.kwargs) File "/usr/lib/python3.11/site-packages/refind_btrfs/state_management/model.py", line 158, in initialize_block_devices block_device_filter(BlockDevice.has_boot), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/refind_btrfs/state_management/model.py", line 149, in block_device_filter return only( ^^^^^ File "/usr/lib/python3.11/site-packages/more_itertools/more.py", line 3273, in only first_value = next(it, default) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/refind_btrfs/state_management/model.py", line 152, in if filter_func(block_device) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/refind_btrfs/device/block_device.py", line 99, in has_boot return self.boot is not None ^^^^^^^^^ File "/usr/lib/python3.11/site-packages/refind_btrfs/device/block_device.py", line 159, in boot return none_throws(self.live_partition_table).boot ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/functools.py", line 1001, in __get__ val = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/refind_btrfs/device/partition_table.py", line 194, in boot return only( ^^^^^ File "/usr/lib/python3.11/site-packages/more_itertools/more.py", line 3284, in only raise too_long or ValueError(msg) ValueError: Expected exactly one item in iterable, but got , , and perhaps more. ``` Removing the duplicated partition objects via `set` resolves the issue.
Venom1991 commented 8 months ago

@Sh3Rm4n

Which partition in the supplied fstab file is a duplicate? Judging by the stack trace it's supposed to be /boot but it appears only once in the supplied fstab file.

Sh3Rm4n commented 8 months ago

Sorry, I think I'm mistaken. I think the error is not coming from FStabCommand but rather originates from the findmnt command:

`$ findmnt --json --mtab --real --nofsroot --output PARTUUID,PARTLABEL,UUID,SOURCE,FSTYPE,LABEL,TARGET,OPTIONS` ```json { "filesystems": [ { "partuuid": "146ac58d-7b05-471c-9b17-5c643b7dc2f2", "partlabel": "primary", "uuid": "e236ff63-85af-4097-a525-f37b7d182e2b", "source": "/dev/sda2", "fstype": "btrfs", "label": "p_root", "target": "/", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop2", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/core18/2790", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop1", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/clion/250", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop0", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/clion/249", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop3", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/core18/2796", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop5", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/pycharm-community/355", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop4", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/pycharm-community/352", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop6", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/snapd/20092", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "/dev/loop7", "fstype": "squashfs", "label": null, "target": "/var/lib/snapd/snap/snapd/20290", "options": "ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide,x-gvfs-hide" },{ "partuuid": "146ac58d-7b05-471c-9b17-5c643b7dc2f2", "partlabel": "primary", "uuid": "e236ff63-85af-4097-a525-f37b7d182e2b", "source": "/dev/sda2", "fstype": "btrfs", "label": "p_root", "target": "/home", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@home" },{ "partuuid": "146ac58d-7b05-471c-9b17-5c643b7dc2f2", "partlabel": "primary", "uuid": "e236ff63-85af-4097-a525-f37b7d182e2b", "source": "/dev/sda2", "fstype": "btrfs", "label": "p_root", "target": "/var/log", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=258,subvol=/@log" },{ "partuuid": "2de1e664-1124-4cd1-9381-10a6515803fc", "partlabel": null, "uuid": "01bfee92-10b9-42fd-88ba-a018abbe0086", "source": "/dev/sdb1", "fstype": "btrfs", "label": "p_cache_data", "target": "/var/cache/pacman/pkg", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=260,subvol=/@pkg" },{ "partuuid": "2de1e664-1124-4cd1-9381-10a6515803fc", "partlabel": null, "uuid": "01bfee92-10b9-42fd-88ba-a018abbe0086", "source": "/dev/sdb1", "fstype": "btrfs", "label": "p_cache_data", "target": "/home/e0006366/.cache", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@cache" },{ "partuuid": "2de1e664-1124-4cd1-9381-10a6515803fc", "partlabel": null, "uuid": "01bfee92-10b9-42fd-88ba-a018abbe0086", "source": "/dev/sdb1", "fstype": "btrfs", "label": "p_cache_data", "target": "/home/e0006366/.cargo", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=261,subvol=/@cargo" },{ "partuuid": "2de1e664-1124-4cd1-9381-10a6515803fc", "partlabel": null, "uuid": "01bfee92-10b9-42fd-88ba-a018abbe0086", "source": "/dev/sdb1", "fstype": "btrfs", "label": "p_cache_data", "target": "/home/e0006366/.conan/data", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@conan" },{ "partuuid": "146ac58d-7b05-471c-9b17-5c643b7dc2f2", "partlabel": "primary", "uuid": "e236ff63-85af-4097-a525-f37b7d182e2b", "source": "/dev/sda2", "fstype": "btrfs", "label": "p_root", "target": "/home/e0006366/Projects", "options": "rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=263,subvol=/@projects" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": null, "partlabel": null, "uuid": null, "source": "portal", "fstype": "fuse.portal", "label": null, "target": "/run/user/1000/doc", "options": "rw,nosuid,nodev,relatime,user_id=1000,group_id=1000" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" },{ "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b", "partlabel": "primary", "uuid": "5D01-B29B", "source": "/dev/sda1", "fstype": "vfat", "label": null, "target": "/boot", "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro" } ] } ```

The last three entries are duplicated as far as I can see.

Other than that, should the PartitionTable be the one deduplicating entries or the FstabCommand / FindmntCommand?

EDIT: findmnt has a --uniq flag, which is an alternative to fix the error.

diff --git a/src/refind_btrfs/system/findmnt_command.py b/src/refind_btrfs/system/findmnt_command.py
index d09471e..248f9d9 100644
--- a/src/refind_btrfs/system/findmnt_command.py
+++ b/src/refind_btrfs/system/findmnt_command.py
@@ -82,7 +82,7 @@ class FindmntCommand(DeviceCommand):
         output = constants.COLUMN_SEPARATOR.join(
             [findmnt_column_key.value.upper() for findmnt_column_key in findmnt_columns]
         )
-        findmnt_command = f"findmnt --json --mtab --real --nofsroot --output {output}"
+        findmnt_command = f"findmnt --json --mtab --real --nofsroot --uniq --output {output}"

         try:
             logger.info(
Venom1991 commented 8 months ago

Would it be possible for you to provide findmnt's complete output?

Sh3Rm4n commented 8 months ago

The collapsed part in my previous comment includes the complete findmnt output on my system (the json output).

Is that what you mean, or am I missing something?

Sh3Rm4n commented 8 months ago

findmnt --json --mtab --real --nofsroot --output PARTUUID,PARTLABEL,UUID,SOURCE,FSTYPE,LABEL,TARGET,OPTIONS > all.json

all.json

findmnt --uniq --json --mtab --real --nofsroot --output PARTUUID,PARTLABEL,UUID,SOURCE,FSTYPE,LABEL,TARGET,OPTIONS > uniq.json

uniq.json

diff all.json uniq.json

148,156d147
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
165,236d155
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
<       },{
<          "partuuid": "8de070f5-b0da-40d6-8d1e-6bfb5650803b",
<          "partlabel": "primary",
<          "uuid": "5D01-B29B",
<          "source": "/dev/sda1",
<          "fstype": "vfat",
<          "label": null,
<          "target": "/boot",
<          "options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro"
Venom1991 commented 8 months ago

So many /boot entries are pretty weird but I'd be perfectly fine with findmnt doing the deduplication since there's no need to reinvent the wheel here. Update you PR with the "uniq" option and I'll merge it. 👍🏼

Sh3Rm4n commented 8 months ago

So many /boot entries are pretty weird but I'd be perfectly fine with findmnt doing the deduplication since there's no need to reinvent the wheel here. Update you PR with the "uniq" option and I'll merge it. 👍🏼

I've updated the PR to only include the additional --uniq flag

Venom1991 commented 8 months ago

Alright, I'll release the new package later today or probably tomorrow.