File 0001-Adjust-debianisms.patch of Package plymouth-kcm
From 7032f7d1a4ced90101f9925e9d2ad4f8e3a18cce Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Mon, 1 May 2017 13:34:39 +0200
Subject: [PATCH] Adjust debianisms
- We use mkinitrd. Also give it some more time
- We have update-alternatives, but don't use it for plymouth
- See also kde#379403
---
src/helper.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/helper.cpp b/src/helper.cpp
index ffcc9df..6605629 100644
--- a/src/helper.cpp
+++ b/src/helper.cpp
@@ -55,7 +55,7 @@ ActionReply PlymouthHelper::save(const QVariantMap &args)
configFile.setPermissions(QFileDevice::ReadOwner|QFileDevice::WriteOwner|QFileDevice::ReadGroup|QFileDevice::ReadOther);
//Special case: Ubuntu derivatives, which work different from everybody else
- if (QFile::exists("/usr/sbin/update-alternatives")) {
+ if (false) {
//find the .plymouth file in the theme
QDir dir(QStringLiteral(PLYMOUTH_THEMES_DIR) + theme);
QStringList themeFile = dir.entryList(QStringList() << "*.plymouth");
@@ -143,14 +143,14 @@ ActionReply PlymouthHelper::save(const QVariantMap &args)
int ret = 0;
QProcess process;
- qDebug() << "Running update-initramfs -u now";
- process.start("/usr/sbin/update-initramfs", QStringList() << "-u");
+ qDebug() << "Running mkinitrd now";
+ process.start("/sbin/mkinitrd", QStringList());
if (!process.waitForStarted()) {
reply = ActionReply::BackendError;
reply.setErrorDescription(i18n("Cannot start initramfs."));
return reply;
}
- if (!process.waitForFinished(60000)) {
+ if (!process.waitForFinished(60000*5)) {
reply = ActionReply::BackendError;
reply.setErrorDescription(i18n("Initramfs failed to run."));
return reply;
@@ -233,7 +233,7 @@ ActionReply PlymouthHelper::install(const QVariantMap &args)
archive->close();
//Special case: Ubuntu derivatives, which work different from everybody else
- if (QFile::exists("/usr/sbin/update-alternatives")) {
+ if (false) {
//find the .plymouth file in the theme
QDir dir(themePath);
QStringList themeFile = dir.entryList(QStringList() << "*.plymouth");
@@ -298,7 +298,7 @@ ActionReply PlymouthHelper::uninstall(const QVariantMap &args)
}
//Special case: Ubuntu derivatives, which work different from everybody else
- if (QFile::exists("/usr/sbin/update-alternatives")) {
+ if (false) {
//find the .plymouth file in the theme
QStringList themeFile = dir.entryList(QStringList() << "*.plymouth");
if (themeFile.count() != 1) {