handle .plasmoid upgrades in plasmapkg correctly
This commit is contained in:
parent
b14ab3f1b6
commit
bc80b88c66
@ -156,6 +156,7 @@ void PlasmaPkg::runMain()
|
|||||||
if (package.isValid()) {
|
if (package.isValid()) {
|
||||||
serviceType = package.metadata().property("X-Plasma-ServiceType").toString();
|
serviceType = package.metadata().property("X-Plasma-ServiceType").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!serviceType.isEmpty()) {
|
if (!serviceType.isEmpty()) {
|
||||||
if (serviceType.contains("Plasma/Applet") ||
|
if (serviceType.contains("Plasma/Applet") ||
|
||||||
serviceType.contains("Plasma/PopupApplet") ||
|
serviceType.contains("Plasma/PopupApplet") ||
|
||||||
@ -255,13 +256,14 @@ void PlasmaPkg::runMain()
|
|||||||
//d->packageRoot = d->installer->defaultPackageRoot();
|
//d->packageRoot = d->installer->defaultPackageRoot();
|
||||||
//pluginTypes << d->installer->type();
|
//pluginTypes << d->installer->type();
|
||||||
}
|
}
|
||||||
qDebug() << " 245 dp:" << d->package;
|
|
||||||
if (d->args->isSet("list")) {
|
if (d->args->isSet("list")) {
|
||||||
listPackages(d->pluginTypes);
|
listPackages(d->pluginTypes);
|
||||||
exit(0);
|
exit(0);
|
||||||
} else {
|
} else {
|
||||||
// install, remove or upgrade
|
// install, remove or upgrade
|
||||||
if (!d->installer) {
|
if (!d->installer) {
|
||||||
|
|
||||||
d->installer = new Plasma::Package(new Plasma::PackageStructure());
|
d->installer = new Plasma::Package(new Plasma::PackageStructure());
|
||||||
//d->installer->setServicePrefix(d->servicePrefix);
|
//d->installer->setServicePrefix(d->servicePrefix);
|
||||||
}
|
}
|
||||||
@ -281,7 +283,9 @@ void PlasmaPkg::runMain()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//d->installer->setPath(d->package);
|
if (d->args->isSet("upgrade")) {
|
||||||
|
d->installer->setPath(d->package);
|
||||||
|
}
|
||||||
QString _p = d->packageRoot;
|
QString _p = d->packageRoot;
|
||||||
if (!_p.endsWith('/')) {
|
if (!_p.endsWith('/')) {
|
||||||
_p.append('/');
|
_p.append('/');
|
||||||
@ -291,7 +295,7 @@ void PlasmaPkg::runMain()
|
|||||||
d->metadata = d->installer->metadata();
|
d->metadata = d->installer->metadata();
|
||||||
|
|
||||||
QString pluginName;
|
QString pluginName;
|
||||||
if (d->metadata.pluginName().isEmpty()) {
|
if (!d->metadata.isValid() && d->metadata.pluginName().isEmpty()) {
|
||||||
// plugin name given in command line
|
// plugin name given in command line
|
||||||
pluginName = d->package;
|
pluginName = d->package;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user