Commit 2d68961b authored by Lukas Appelhans's avatar Lukas Appelhans

AkabeiPlainReplaceOperation is now here, I hope it works

parent f7dd4035
......@@ -42,6 +42,7 @@ operations/akabeiplainupgradeoperation.cpp
operations/akabeipolkitupgradeoperation.cpp
operations/akabeipolkitinstalloperation.cpp
operations/akabeioperationutils.cpp
operations/akabeiplainreplaceoperation.cpp
)
set(AKABEI_CORE_HDRS
......
......@@ -100,6 +100,11 @@ QString packageDependencies(const QString& dependency, const QString& comparison
return QString("SELECT * FROM packages JOIN depends ON packages.id=depends.package WHERE depends.dependency %0 \"%1\";").arg(comparison, dependency);
}
QString globalReplaces()
{
return QString("SELECT * FROM replaces JOIN packages ON replaces.package = packages.id");
}
QString begin()
{
return QString("BEGIN;");
......
......@@ -143,6 +143,8 @@ QString AKABEICORESHARED_EXPORT requiredByPackages(const QString &);
*/
QString AKABEICORESHARED_EXPORT packageDependencies(const QString &, const QString &);
QString AKABEICORESHARED_EXPORT globalReplaces();
/**
* Query that begins a transaction.
*/
......
This diff is collapsed.
/* This file is part of the Chakra project
Copyright (C) 2015 Lukas Appelhans <l.appelhans@gmx.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
*/
#ifndef AKABEIPLAINREPLACEOPERATION_H
#define AKABEIPLAINREPLACEOPERATION_H
#include <akabeicore_global.h>
#include <akabeioperation.h>
#include <akabeipackage.h>
namespace Akabei {
class Package;
//TODO: We need error handling (existing files etc) and also custom InstallReasons
class AKABEICORESHARED_EXPORT PlainReplaceOperation : public Operation
{
Q_DISABLE_COPY(PlainReplaceOperation)
public:
explicit PlainReplaceOperation(Package *package, const QList<Package*> &replaces);
virtual ~PlainReplaceOperation();
protected:
void validate();
void run();
private:
class Private;
Private * const d;
};
}
#endif // AKABEIPLAININSTALLOPERATION_H
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