diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-04-17 15:05:20 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-04-17 15:05:20 +0200 |
| commit | 79bdca04e2cc9e13bbfa1cac7619d5e4a56ff0bd (patch) | |
| tree | 1d267c727247c1b20dc113737ce356f3b7fa09a0 /src/sbo.h | |
| parent | 34b10f41aa285e423cccb161342b68ae7275da4b (diff) | |
| download | slackbuilder-79bdca04e2cc9e13bbfa1cac7619d5e4a56ff0bd.tar.gz | |
Remove SBo differ experiment
Diffstat (limited to 'src/sbo.h')
| -rw-r--r-- | src/sbo.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/sbo.h b/src/sbo.h deleted file mode 100644 index 95a1c53..0000000 --- a/src/sbo.h +++ /dev/null @@ -1,73 +0,0 @@ -#pragma once - -#include "package.h" -#include <boost/process.hpp> -#include <filesystem> -#include <map> -#include <boost/multi_index_container.hpp> -#include <boost/multi_index/ordered_index.hpp> -#include <boost/multi_index/sequenced_index.hpp> - -namespace katja -{ - struct info - { - std::string prgnam; - std::string version; - std::string homepage; - std::vector<std::string> download; - std::vector<std::string> md5sum; - std::vector<std::string> download_x86_64; - std::vector<std::string> md5sum_x86_64; - std::vector<std::string> requires; - std::string maintainer; - std::string email; - }; - - class sbo : public repository - { - using ordered_set = boost::multi_index_container< - std::string, - boost::multi_index::indexed_by< - boost::multi_index::ordered_unique<boost::multi_index::identity<std::string>>, - boost::multi_index::sequenced<> - > - >; - boost::filesystem::path git_binary; - std::filesystem::path cache_path; - - template<typename... Args> - void git(const std::string& command, const std::filesystem::path& cwd, const Args&... args) const - { - if (cwd.empty()) - { - boost::process::system(git_binary, command, args...); - } - else - { - boost::process::system(git_binary, "-C", cwd.native(), command, args...); - } - } - - info parse_info_file(const std::filesystem::path& package_directory) const; - - /** - * Returns the list of packages in the repository. - * - * @return A map containing package names as key, and its category - * directory name as value. - */ - std::unordered_map<std::string, std::filesystem::path> collect_packages() const; - - void resolve_dependencies(const std::string& package_name, - const std::unordered_map<std::string, std::filesystem::path>& package_categories, - ordered_set& resolved) const; - - public: - explicit sbo(); - - virtual std::unordered_map<std::string, package> list(const std::set<std::string>& package_names) override; - virtual void refresh() override; - virtual std::forward_list<std::string> check_dependencies(const std::string& package_name) override; - }; -} |
