]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Drop PakfireCache
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 19 Jan 2018 13:32:32 +0000 (14:32 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 19 Jan 2018 13:32:32 +0000 (14:32 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/libpakfire/cache.c [deleted file]
src/libpakfire/include/pakfire/cache.h [deleted file]
src/libpakfire/include/pakfire/pool.h
src/libpakfire/include/pakfire/types.h
src/libpakfire/package.c
src/libpakfire/pakfire.c
src/libpakfire/pool.c
src/libpakfire/step.c

index cfe38bf9358182dcb756469026577009cd43dd4c..dda193540bfe8620b387dfbbdc936ef1c6cfb2ee 100644 (file)
@@ -246,7 +246,6 @@ lib_LTLIBRARIES += \
 
 libpakfire_la_SOURCES = \
        src/libpakfire/archive.c \
-       src/libpakfire/cache.c \
        src/libpakfire/errno.c \
        src/libpakfire/file.c \
        src/libpakfire/filter.c \
@@ -270,7 +269,6 @@ libpakfire_la_SOURCES = \
 
 pkginclude_HEADERS += \
        src/libpakfire/include/pakfire/archive.h \
-       src/libpakfire/include/pakfire/cache.h \
        src/libpakfire/include/pakfire/constants.h \
        src/libpakfire/include/pakfire/errno.h \
        src/libpakfire/include/pakfire/file.h \
diff --git a/src/libpakfire/cache.c b/src/libpakfire/cache.c
deleted file mode 100644 (file)
index 3ae7791..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*#############################################################################
-#                                                                             #
-# Pakfire - The IPFire package management system                              #
-# Copyright (C) 2013 Pakfire development team                                 #
-#                                                                             #
-# 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 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program is distributed in the hope that it will be useful,             #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-# GNU General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-#############################################################################*/
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <pakfire/cache.h>
-#include <pakfire/constants.h>
-#include <pakfire/package.h>
-#include <pakfire/private.h>
-#include <pakfire/types.h>
-#include <pakfire/util.h>
-
-PAKFIRE_EXPORT PakfireCache pakfire_cache_create(PakfirePool pool, const char* path) {
-       PakfireCache cache = pakfire_calloc(1, sizeof(*cache));
-
-       cache->pool = pool;
-       cache->path = pakfire_strdup(path);
-
-       return cache;
-}
-
-PAKFIRE_EXPORT void pakfire_cache_free(PakfireCache cache) {
-       pakfire_free(cache->path);
-       pakfire_free(cache);
-}
-
-PAKFIRE_EXPORT const char* pakfire_cache_get_path(PakfireCache cache) {
-       return cache->path;
-}
-
-PAKFIRE_EXPORT char* pakfire_cache_get_full_path(PakfireCache cache, const char* path) {
-       const char* cache_path = pakfire_cache_get_path(cache);
-
-       return pakfire_path_join(cache_path, path);
-}
diff --git a/src/libpakfire/include/pakfire/cache.h b/src/libpakfire/include/pakfire/cache.h
deleted file mode 100644 (file)
index b616da9..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*#############################################################################
-#                                                                             #
-# Pakfire - The IPFire package management system                              #
-# Copyright (C) 2013 Pakfire development team                                 #
-#                                                                             #
-# 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 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program is distributed in the hope that it will be useful,             #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-# GNU General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-#############################################################################*/
-
-#ifndef PAKFIRE_CACHE_H
-#define PAKFIRE_CACHE_H
-
-#include <stdio.h>
-
-#include <pakfire/types.h>
-
-PakfireCache pakfire_cache_create(PakfirePool pool, const char* path);
-void pakfire_cache_free(PakfireCache cache);
-
-const char* pakfire_cache_get_path(PakfireCache cache);
-char* pakfire_cache_get_full_path(PakfireCache cache, const char* path);
-
-#ifdef PAKFIRE_PRIVATE
-
-struct _PakfireCache {
-       PakfirePool pool;
-       char* path;
-};
-
-#endif
-
-#endif /* PAKFIRE_CACHE_H */
index b864d2397a245e50baa2435b902ad1fbd908adb9..24d64ab71a6adf83c4788d38212243712711f044 100644 (file)
@@ -28,8 +28,6 @@ PakfirePool pakfire_pool_create(Pakfire pakfire);
 PakfirePool pakfire_pool_ref(PakfirePool pool);
 PakfirePool pakfire_pool_unref(PakfirePool pool);
 
-PakfireCache pakfire_pool_get_cache(PakfirePool pool);
-
 #ifdef PAKFIRE_PRIVATE
 
 #include <solv/pool.h>
index 86e92a74c2fa61138d56def7f6b20d639809a82c..2ac08149a86d6d0d1e694c1a79e531da0891bd2e 100644 (file)
 typedef struct _Pakfire* Pakfire;
 typedef struct _PakfireArchive* PakfireArchive;
 typedef struct _PakfireArchiveSignature* PakfireArchiveSignature;
-typedef struct _PakfireCache* PakfireCache;
 typedef struct _PakfireFile* PakfireFile;
 typedef struct _PakfireFilter* PakfireFilter;
 typedef struct _PakfireKey* PakfireKey;
 typedef struct _PakfirePackage* PakfirePackage;
-typedef struct _PakfirePackageCache* PakfirePackageCache;
 typedef struct _PakfirePackageList* PakfirePackageList;
 typedef struct _PakfirePool* PakfirePool;
 typedef struct _PakfireProblem* PakfireProblem;
 typedef struct _PakfireRelation* PakfireRelation;
 typedef struct _PakfireRelationList* PakfireRelationList;
 typedef struct _PakfireRepo* PakfireRepo;
-typedef struct _PakfireRepoCache* PakfireRepoCache;
 typedef struct _PakfireRequest* PakfireRequest;
 typedef struct _PakfireSelector* PakfireSelector;
 typedef struct _PakfireSolution* PakfireSolution;
index 19a4ad9269485a723c134cfdf7be88136d052ace..c7b31baf065fc4fedfe052ddc6ee91cc6588e6ef 100644 (file)
 #include <solv/solvable.h>
 
 #include <pakfire/archive.h>
-#include <pakfire/cache.h>
 #include <pakfire/constants.h>
 #include <pakfire/file.h>
 #include <pakfire/i18n.h>
 #include <pakfire/logging.h>
 #include <pakfire/package.h>
-#include <pakfire/packagecache.h>
 #include <pakfire/pakfire.h>
 #include <pakfire/pool.h>
 #include <pakfire/private.h>
index 00948d8eb39dbbd5e2074787e79d014bf5d9d240..a7cb55927a6c3036511949e358787251c88e5517 100644 (file)
@@ -57,9 +57,6 @@ struct _Pakfire {
        pakfire_log_function_t log_function;
        int log_priority;
 
-       // Cache
-       PakfireCache cache;
-
        int nrefs;
 };
 
index aae9920cfab6962957447d22b5a24d3a924d3d53..a86212d36fbd081cd771519253229f7824840e34 100644 (file)
@@ -24,7 +24,6 @@
 #include <solv/queue.h>
 #include <solv/repo.h>
 
-#include <pakfire/cache.h>
 #include <pakfire/logging.h>
 #include <pakfire/package.h>
 #include <pakfire/packagelist.h>
@@ -39,7 +38,6 @@
 // This is just being left here for compatibility
 struct _PakfirePool {
        Pakfire pakfire;
-       PakfireCache cache;
        int nrefs;
 };
 
@@ -82,10 +80,3 @@ PAKFIRE_EXPORT PakfirePool pakfire_pool_unref(PakfirePool pool) {
 Pool* pakfire_pool_get_solv_pool(PakfirePool pool) {
        return pakfire_get_solv_pool(pool->pakfire);
 }
-
-PAKFIRE_EXPORT PakfireCache pakfire_pool_get_cache(PakfirePool pool) {
-       if (pool->cache)
-               return pool->cache;
-
-       return NULL;
-}
index f86e597e7dab9c6701d58ba1f3102d863201a102..1aa7a0579950b05d0cb6d2ded8acbae3c9e0f08e 100644 (file)
@@ -23,7 +23,6 @@
 #include <solv/pooltypes.h>
 #include <solv/transaction.h>
 
-#include <pakfire/cache.h>
 #include <pakfire/constants.h>
 #include <pakfire/logging.h>
 #include <pakfire/package.h>