From 20a8b222c60375100444b4da51f025a21149d221 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 27 Feb 2015 20:31:17 +0100 Subject: [PATCH] Verbose debug output. --- src/modules/partition/jobs/ClearTempMountsJob.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/jobs/ClearTempMountsJob.cpp b/src/modules/partition/jobs/ClearTempMountsJob.cpp index 2fef32d16..0000f7720 100644 --- a/src/modules/partition/jobs/ClearTempMountsJob.cpp +++ b/src/modules/partition/jobs/ClearTempMountsJob.cpp @@ -48,30 +48,37 @@ ClearTempMountsJob::exec() if ( !mtab.open( QFile::ReadOnly | QFile::Text ) ) return Calamares::JobResult::error( tr( "Cannot get list of temporary mounts." ) ); + cDebug() << "Opened mtab. Lines:"; while ( !mtab.atEnd() ) { QStringList line = QString::fromLocal8Bit( mtab.readLine() ) .split( ' ', QString::SkipEmptyParts ); + cDebug() << line.join( ' ' ); QString device = line.at( 0 ); QString mountPoint = line.at( 1 ); if ( mountPoint.startsWith( "/tmp/calamares-" ) ) + { + cDebug() << "INSERTING pair (device, mountPoint)" << device << mountPoint; lst.insert( device, mountPoint ); + } } QStringList keys = lst.keys(); keys.sort(); + cDebug() << "Sorted keys:\n" << keys; + QStringList goodNews; QProcess process; for ( int i = keys.length() - 1; i >= 0; --i ) { QString partPath = lst.value( keys[ i ] ); + cDebug() << "Will try to umount path" << partPath; process.start( "umount", { "-lv", partPath } ); process.waitForFinished(); if ( process.exitCode() == 0 ) goodNews.append( QString( "Successfully unmounted %1." ).arg( partPath ) ); - } Calamares::JobResult ok = Calamares::JobResult::ok();