Bug 417205

Summary: Mount point editing doesn't change fstab
Product: [Applications] partitionmanager Reporter: Alexey <esbodev>
Component: generalAssignee: Andrius Štikonas <andrius>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, nosewings
Priority: NOR    
Version: 4.0.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 4.2.0
Sentry Crash Report:

Description Alexey 2020-02-05 19:34:37 UTC
SUMMARY
/etc/fstab stays the same after adding / editing mount point.

STEPS TO REPRODUCE
1. Execute in terminal "sudo mkdir /mnt/partition"
2. Open KDE Partition Manager
3. Select partition with no mount point on it
4. Open context menu
5. Select "Edit Mount Point"
6. Set "Identify by" to "UUID"
7. Set "Path" to "/mnt/partition"
8. Click "OK"
9. "Really save changes?" dialog appeared. Click "Save changes".


OBSERVED RESULT
"Mount point" value on selected partition changes to the selected path.
Partition can be mounted.
/etc/fstab file stays untouched.

EXPECTED RESULT
"Mount point" value on selected partition changes to the selected path.
Partition can be mounted.
/etc/fstab file gets updated.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION
Comment 1 Andrius Štikonas 2020-02-05 20:24:34 UTC

*** This bug has been marked as a duplicate of bug 411841 ***
Comment 2 Andrius Štikonas 2020-09-11 19:25:09 UTC
Git commit 5b80c6045c5306e5e61f963d30c0a9b8773e5407 by Andrius Štikonas.
Committed on 10/09/2020 at 22:54.
Pushed by stikonas into branch 'fstab'.

Fix fstab editing functionality.

In the old code QByteArray fstabContents was actually empty.
Also, writeData function was opening file in append mode,
thus nothing was actually written.

Split writeData function into two:
  * one for block devices
  * another for writing fstab file

M  +2    -2    src/core/fstab.cpp
M  +40   -1    src/util/externalcommand.cpp
M  +1    -0    src/util/externalcommand.h
M  +35   -3    src/util/externalcommandhelper.cpp
M  +2    -0    src/util/externalcommandhelper.h

https://invent.kde.org/system/kpmcore/commit/5b80c6045c5306e5e61f963d30c0a9b8773e5407
Comment 3 Andrius Štikonas 2020-09-15 00:13:25 UTC
*** Bug 411841 has been marked as a duplicate of this bug. ***
Comment 4 Andrius Štikonas 2020-10-13 10:51:49 UTC
*** Bug 427623 has been marked as a duplicate of this bug. ***