summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/service/maintenance/abstractFileProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/abstractFileProcessor.h4
-rw-r--r--gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/categoryMetaProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp3
-rw-r--r--gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/masksProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/masksProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/newsProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/newsProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/packageMetaProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/updatesProcessor.cpp15
-rw-r--r--gentoobrowse-api/service/maintenance/updatesProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/useGlobalProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/useGroupProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/useGroupProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenance/useLocalProcessor.cpp5
-rw-r--r--gentoobrowse-api/service/maintenance/useLocalProcessor.h2
-rw-r--r--gentoobrowse-api/service/maintenanceGitOperations.cpp2
-rw-r--r--gentoobrowse-api/service/maintenancePackageTree.cpp4
-rw-r--r--gentoobrowse-api/service/maintenanceimpl.h4
23 files changed, 10 insertions, 80 deletions
diff --git a/gentoobrowse-api/service/maintenance/abstractFileProcessor.cpp b/gentoobrowse-api/service/maintenance/abstractFileProcessor.cpp
index 170839b..cf453b6 100644
--- a/gentoobrowse-api/service/maintenance/abstractFileProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/abstractFileProcessor.cpp
@@ -2,11 +2,6 @@
namespace Gentoo {
namespace Service {
- AbstractFileProcessor::AbstractFileProcessor(bool v) :
- vcsMode(v)
- {
- }
-
AbstractFileProcessor::~AbstractFileProcessor()
{
}
diff --git a/gentoobrowse-api/service/maintenance/abstractFileProcessor.h b/gentoobrowse-api/service/maintenance/abstractFileProcessor.h
index 3780cdd..3447d25 100644
--- a/gentoobrowse-api/service/maintenance/abstractFileProcessor.h
+++ b/gentoobrowse-api/service/maintenance/abstractFileProcessor.h
@@ -9,7 +9,6 @@ namespace Gentoo {
namespace Service {
class AbstractFileProcessor {
public:
- AbstractFileProcessor(bool vcsMode);
virtual ~AbstractFileProcessor() = 0;
virtual void prepare(DB::Connection *);
@@ -19,9 +18,6 @@ namespace Gentoo {
virtual void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) = 0;
virtual void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) = 0;
virtual void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) = 0;
-
- protected:
- const bool vcsMode;
};
typedef boost::shared_ptr<AbstractFileProcessor> FileProcessorPtr;
}
diff --git a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
index 68eee65..ad3fb0b 100644
--- a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
@@ -14,11 +14,6 @@ namespace Gentoo {
namespace Service {
const int CategoryMetaProcessor::FILETYPEID = 10;
- CategoryMetaProcessor::CategoryMetaProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
void
CategoryMetaProcessor::created(DB::Connection * dbc, int64_t r, const StringList & fn, const boost::filesystem::path & path)
{
diff --git a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
index 948d56b..46bb691 100644
--- a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
@@ -10,8 +10,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- CategoryMetaProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
index f36c73c..fad96b6 100644
--- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
@@ -37,8 +37,7 @@ namespace Gentoo {
const int EbuildMetaProcessor::FILETYPEID = 1;
- EbuildMetaProcessor::EbuildMetaProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode),
+ EbuildMetaProcessor::EbuildMetaProcessor() :
ebuildIds("ebuildId")
{
}
diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h
index ef3bbae..1feb3aa 100644
--- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h
@@ -15,7 +15,7 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- EbuildMetaProcessor(bool);
+ EbuildMetaProcessor();
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
diff --git a/gentoobrowse-api/service/maintenance/masksProcessor.cpp b/gentoobrowse-api/service/maintenance/masksProcessor.cpp
index 402184e..e56153e 100644
--- a/gentoobrowse-api/service/maintenance/masksProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/masksProcessor.cpp
@@ -24,11 +24,6 @@ namespace Gentoo {
namespace Service {
const int MasksProcessor::FILETYPEID = 3;
- MasksProcessor::MasksProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
void
MasksProcessor::created(DB::Connection * dbc, int64_t r, const StringList & fn, const boost::filesystem::path & path)
{
diff --git a/gentoobrowse-api/service/maintenance/masksProcessor.h b/gentoobrowse-api/service/maintenance/masksProcessor.h
index a569736..d076a26 100644
--- a/gentoobrowse-api/service/maintenance/masksProcessor.h
+++ b/gentoobrowse-api/service/maintenance/masksProcessor.h
@@ -12,8 +12,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- MasksProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenance/newsProcessor.cpp b/gentoobrowse-api/service/maintenance/newsProcessor.cpp
index 32b05f7..07230ba 100644
--- a/gentoobrowse-api/service/maintenance/newsProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/newsProcessor.cpp
@@ -11,11 +11,6 @@ namespace Gentoo {
namespace Service {
const int NewsProcessor::FILETYPEID = 11;
- NewsProcessor::NewsProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
void
NewsProcessor::created(DB::Connection * dbc, int64_t, const StringList &, const boost::filesystem::path & path)
{
diff --git a/gentoobrowse-api/service/maintenance/newsProcessor.h b/gentoobrowse-api/service/maintenance/newsProcessor.h
index 5da1019..0e2c956 100644
--- a/gentoobrowse-api/service/maintenance/newsProcessor.h
+++ b/gentoobrowse-api/service/maintenance/newsProcessor.h
@@ -12,8 +12,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- NewsProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
index f5e0ba2..653db7f 100644
--- a/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
@@ -14,11 +14,6 @@ namespace Gentoo {
namespace Service {
const int PackageMetaProcessor::FILETYPEID = 4;
- PackageMetaProcessor::PackageMetaProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
void
PackageMetaProcessor::created(DB::Connection * dbc, int64_t r, const StringList & fn, const boost::filesystem::path & path)
{
diff --git a/gentoobrowse-api/service/maintenance/packageMetaProcessor.h b/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
index af9455f..02b5f84 100644
--- a/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
@@ -11,8 +11,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- PackageMetaProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp
index 30e93c1..e9bdda2 100644
--- a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp
@@ -24,15 +24,9 @@ namespace Gentoo {
namespace Service {
const int UpdatesProcessor::FILETYPEID = 12;
- UpdatesProcessor::UpdatesProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
class UpdatesPatch : public DB::TablePatch, public DB::SqlWriter {
public:
- UpdatesPatch(DB::Connection * db, bool v) :
- vcsMode(v),
+ UpdatesPatch(DB::Connection * db) :
categoryInsert(sql::maintenance::categoryInsert.modify(db)),
findPackage(sql::portage::findPackage.select(db)),
movePackages(sql::maintenance::updatesMovePackages.modify(db)),
@@ -62,7 +56,6 @@ namespace Gentoo {
sql.append("SPLIT_PART(b.updatePack, '-', 2)::INT, SUBSTR(b.updatePack, 1, 1)::INT");
}
- const bool vcsMode;
DB::ModifyCommandPtr drop;
DB::ModifyCommandPtr categoryInsert;
DB::SelectCommandPtr findPackage;
@@ -109,7 +102,7 @@ namespace Gentoo {
void
UpdatesProcessor::prepare(DB::Connection * dbc)
{
- up = new UpdatesPatch(dbc, vcsMode);
+ up = new UpdatesPatch(dbc);
}
void
@@ -117,9 +110,7 @@ namespace Gentoo {
{
if (!up->updatePacks.entityIds.empty()) {
dbc->patchTable(up);
- if (vcsMode) {
- sql::maintenance::updatesMergeFilelistEntries.modify(dbc)->execute();
- }
+ sql::maintenance::updatesMergeFilelistEntries.modify(dbc)->execute();
}
}
diff --git a/gentoobrowse-api/service/maintenance/updatesProcessor.h b/gentoobrowse-api/service/maintenance/updatesProcessor.h
index 48c37a9..c69267c 100644
--- a/gentoobrowse-api/service/maintenance/updatesProcessor.h
+++ b/gentoobrowse-api/service/maintenance/updatesProcessor.h
@@ -13,8 +13,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- UpdatesProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp b/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp
index 5a89167..243d11b 100644
--- a/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp
@@ -13,11 +13,6 @@ namespace Gentoo {
namespace Service {
const int UseGlobalProcessor::FILETYPEID = 5;
- UseGlobalProcessor::UseGlobalProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
void
UseGlobalProcessor::created(DB::Connection * dbc, int64_t r, const StringList & fn, const boost::filesystem::path & path)
{
diff --git a/gentoobrowse-api/service/maintenance/useGlobalProcessor.h b/gentoobrowse-api/service/maintenance/useGlobalProcessor.h
index 1254bd2..2d2d6c7 100644
--- a/gentoobrowse-api/service/maintenance/useGlobalProcessor.h
+++ b/gentoobrowse-api/service/maintenance/useGlobalProcessor.h
@@ -12,8 +12,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- UseGlobalProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp b/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp
index 39d5498..b21a701 100644
--- a/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp
@@ -18,11 +18,6 @@ namespace Gentoo {
namespace Service {
const int UseGroupProcessor::FILETYPEID = 9;
- UseGroupProcessor::UseGroupProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
void
UseGroupProcessor::created(DB::Connection * dbc, int64_t, const StringList &, const boost::filesystem::path & path)
{
diff --git a/gentoobrowse-api/service/maintenance/useGroupProcessor.h b/gentoobrowse-api/service/maintenance/useGroupProcessor.h
index cfe514c..0e02947 100644
--- a/gentoobrowse-api/service/maintenance/useGroupProcessor.h
+++ b/gentoobrowse-api/service/maintenance/useGroupProcessor.h
@@ -12,8 +12,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- UseGroupProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp b/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp
index 0c65b0c..2b82616 100644
--- a/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp
@@ -15,11 +15,6 @@ namespace Gentoo {
namespace Service {
const int UseLocalProcessor::FILETYPEID = 6;
- UseLocalProcessor::UseLocalProcessor(bool vcsMode) :
- AbstractFileProcessor(vcsMode)
- {
- }
-
void
UseLocalProcessor::created(DB::Connection * dbc, int64_t r, const StringList & fn, const boost::filesystem::path & path)
{
diff --git a/gentoobrowse-api/service/maintenance/useLocalProcessor.h b/gentoobrowse-api/service/maintenance/useLocalProcessor.h
index c1b1470..d4fb59f 100644
--- a/gentoobrowse-api/service/maintenance/useLocalProcessor.h
+++ b/gentoobrowse-api/service/maintenance/useLocalProcessor.h
@@ -12,8 +12,6 @@ namespace Gentoo {
public:
static const int FILETYPEID;
- UseLocalProcessor(bool);
-
void created(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void modified(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn, const boost::filesystem::path & path) override;
void deleted(DB::Connection * dbc, int64_t repoid, const Gentoo::StringList & fn) override;
diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp
index 16c51d3..bf90116 100644
--- a/gentoobrowse-api/service/maintenanceGitOperations.cpp
+++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp
@@ -193,7 +193,7 @@ namespace Gentoo {
{
FileProcessors fps;
for (const auto & fpf : fpfs) {
- fps[fpf.first] = fpf.second(true);
+ fps[fpf.first] = fpf.second();
}
for (const auto & fp : fps) {
fp.second->prepare(dbc);
diff --git a/gentoobrowse-api/service/maintenancePackageTree.cpp b/gentoobrowse-api/service/maintenancePackageTree.cpp
index 9862f28..7201ac3 100644
--- a/gentoobrowse-api/service/maintenancePackageTree.cpp
+++ b/gentoobrowse-api/service/maintenancePackageTree.cpp
@@ -39,9 +39,9 @@ R"DATA( 10 category metadata 2 2 {"(2,metadata.xml)"}
namespace Service {
template<typename T>
FileProcessorPtr
- Maintenance::createFileProessor(bool vcsMode)
+ Maintenance::createFileProessor()
{
- return FileProcessorPtr(new T(vcsMode));
+ return FileProcessorPtr(new T());
}
void
diff --git a/gentoobrowse-api/service/maintenanceimpl.h b/gentoobrowse-api/service/maintenanceimpl.h
index ac74f39..3c43548 100644
--- a/gentoobrowse-api/service/maintenanceimpl.h
+++ b/gentoobrowse-api/service/maintenanceimpl.h
@@ -15,7 +15,7 @@ namespace Gentoo {
namespace Service {
class DLL_PUBLIC Maintenance : public Gentoo::Maintenance, public IceTray::AbstractDatabaseClient {
public:
- typedef std::map<int64_t, boost::function<FileProcessorPtr(bool)>> FileProcessorFactories;
+ typedef std::map<int64_t, boost::function<FileProcessorPtr()>> FileProcessorFactories;
typedef std::map<int64_t, FileProcessorPtr> FileProcessors;
typedef boost::function<void(FileProcessorPtr, int64_t, const Gentoo::StringList &, const boost::filesystem::path &)> FileHandleFunc;
typedef std::map<int64_t, std::string> RepoMap;
@@ -44,7 +44,7 @@ namespace Gentoo {
static Ice::PropertiesPtr properties(const Ice::Current &);
template <typename T>
- static FileProcessorPtr createFileProessor(bool vcsMode);
+ static FileProcessorPtr createFileProessor();
FileProcessorFactories fpfs;
IceUtil::TimerPtr taskRunner;
};