calamares/calamares-3.2.17.1-dont-backup-dotfiles.patch
Silvan Calarco 2250c69620 update to 3.2.17.1
added a patch to remove making a backup of home dotfiles in case of partition reuse [release 3.2.17.1-1mamba;Sat Dec 21 2019]
2024-01-05 21:03:42 +01:00

25 lines
1016 B
Diff

--- calamares-3.2.17.1/src/modules/users/CreateUserJob.cpp.orig 2019-12-21 18:59:25.196000000 +0100
+++ calamares-3.2.17.1/src/modules/users/CreateUserJob.cpp 2019-12-21 18:59:51.859000000 +0100
@@ -130,21 +130,6 @@
}
}
- // If we're looking to reuse the contents of an existing /home
- if ( gs->value( "reuseHome" ).toBool() )
- {
- QString shellFriendlyHome = "/home/" + m_userName;
- QDir existingHome( destDir.absolutePath() + shellFriendlyHome );
- if ( existingHome.exists() )
- {
- QString backupDirName = "dotfiles_backup_" + QDateTime::currentDateTime().toString( "yyyy-MM-dd_HH-mm-ss" );
- existingHome.mkdir( backupDirName );
-
- CalamaresUtils::System::instance()->targetEnvCall(
- { "sh", "-c", "mv -f " + shellFriendlyHome + "/.* " + shellFriendlyHome + "/" + backupDirName } );
- }
- }
-
cDebug() << "[CREATEUSER]: creating user";
QStringList useradd { "useradd", "-m", "-U" };