Commit 243e4636 authored by Lisa's avatar Lisa

Add the scriptlet operations to the correct package.

This is for replacements.
parent 0263e238
......@@ -297,6 +297,7 @@ void PlainReplaceOperation::validate()
upgrade = true;
continue;
}
// If it has a scriptlet, we need a new suboperation
if (package->hasScriptlet()) {
// Does it have a pre install function?
......@@ -304,14 +305,14 @@ void PlainReplaceOperation::validate()
// Ok, it has
QStringList args;
args << QStringLiteral("pre_remove");// << d->package->version().toByteArray();
setPreOperations(Operation::List() << new PlainScriptletOperation(d->package, args));//FIXME: Make this the polkitscriptletoperation
setPreOperations(Operation::List() << new PlainScriptletOperation(package, args));//FIXME: Make this the polkitscriptletoperation
}
// Does it have a post install function?
if (package->retrieveScriptlet().contains(QStringLiteral("post_remove"))) {
// Ok, it has
QStringList args;
args << QStringLiteral("post_remove");// << d->package->version().toByteArray();
setPostOperations(Operation::List() << new PlainScriptletOperation(d->package, args));
setPostOperations(Operation::List() << new PlainScriptletOperation(package, args));
}
}
}
......
......@@ -331,14 +331,14 @@ void PolkitReplaceOperation::validate()
// Ok, it has
QStringList args;
args << QStringLiteral("pre_remove");// << d->package->version().toByteArray();
setPreOperations(Operation::List() << new PlainScriptletOperation(d->package, args));//FIXME: Make this the polkitscriptletoperation
setPreOperations(Operation::List() << new PlainScriptletOperation(package, args));//FIXME: Make this the polkitscriptletoperation
}
// Does it have a post install function?
if (package->retrieveScriptlet().contains(QStringLiteral("post_remove"))) {
// Ok, it has
QStringList args;
args << QStringLiteral("post_remove");// << d->package->version().toByteArray();
setPostOperations(Operation::List() << new PlainScriptletOperation(d->package, args));
setPostOperations(Operation::List() << new PlainScriptletOperation(package, args));
}
}
}
......
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