Commit c6ce8356 authored by Philip Müller's avatar Philip Müller

[libmsm] update to new RT-kernel structure

parent 72419e60
......@@ -155,7 +155,7 @@ Kernel::isUnsupported() const
bool
Kernel::isRc() const
{
if ( m_version.contains( "rc" ) )
if ( m_version.contains( "rc" ) || m_version.contains( ".r" ) )
return true;
return false;
}
......
......@@ -51,15 +51,15 @@ KernelModel::update()
QStringList recommendedKernels = getRecommendedKernels();
QSet<QString> modulesToInstall;
foreach ( const QString& module, QStringList( installedKernelPackages.keys() ).filter( QRegularExpression( "^linux([0-9][0-9]?([0-9])|-rt-manjaro|-rt-lts-manjaro)-" ) ) )
foreach ( const QString& module, QStringList( installedKernelPackages.keys() ).filter( QRegularExpression( "^linux([0-9][0-9]?([0-9])|[0-9][0-9]-rt)-" ) ) )
{
QString aux = QString( module ).remove( QRegularExpression( "^linux([0-9][0-9]?([0-9])|-rt-manjaro|-rt-lts-manjaro)-" ) );
QString aux = QString( module ).remove( QRegularExpression( "^linux([0-9][0-9]?([0-9])|[0-9][0-9]-rt)-" ) );
modulesToInstall.insert( aux );
}
beginResetModel();
m_kernels.clear();
foreach ( const QString& kernel, QStringList( allKernelPackages.keys() ).filter( QRegularExpression( "^linux([0-9][0-9]?([0-9])|-rt-manjaro|-rt-lts-manjaro)$" ) ) )
foreach ( const QString& kernel, QStringList( allKernelPackages.keys() ).filter( QRegularExpression( "^linux([0-9][0-9]?([0-9])|[0-9][0-9]-rt)$" ) ) )
{
Kernel newKernel;
......@@ -211,7 +211,7 @@ KernelModel::getAvailablePackages() const
{
QProcess process;
process.setEnvironment( QStringList() << "LANG=C" << "LC_MESSAGES=C" );
process.start( "pacman", QStringList() << "-Ss" << "^linux([0-9][0-9]?([0-9])|-rt-manjaro|-rt-lts-manjaro)" );
process.start( "pacman", QStringList() << "-Ss" << "^linux([0-9][0-9]?([0-9])|[0-9][0-9]-rt)" );
if ( !process.waitForFinished( 15000 ) )
qDebug() << "error: failed to get installed kernels";
QString result = process.readAllStandardOutput();
......@@ -239,7 +239,7 @@ KernelModel::getInstalledPackages() const
{
QProcess process;
process.setEnvironment( QStringList() << "LANG=C" << "LC_MESSAGES=C" );
process.start( "pacman", QStringList() << "-Qs" << "^linux([0-9][0-9]?([0-9])|-rt-manjaro|-rt-lts-manjaro)" );
process.start( "pacman", QStringList() << "-Qs" << "^linux([0-9][0-9]?([0-9])|[0-9][0-9]-rt)" );
if ( !process.waitForFinished( 15000 ) )
qDebug() << "error: failed to get installed kernels";
QString result = process.readAll();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment