-d \
-Wno-yacc
-PAKFIRE_CPPFLAGS = -I$(top_srcdir)/src/libpakfire/include
-PAKFIRE_LIBS = libpakfire.la
-
bin_PROGRAMS =
check_PROGRAMS =
lib_LTLIBRARIES =
pakfire_la_CPPFLAGS = \
-include $(top_builddir)/config.h \
- $(PAKFIRE_CPPFLAGS)
+ -I$(top_srcdir)/src
pakfire_la_CFLAGS = \
$(AM_CFLAGS) \
pakfire_la_LIBADD = \
$(PYTHON_DEVEL_LIBS) \
- $(PAKFIRE_LIBS)
+ libpakfire.la
# ------------------------------------------------------------------------------
CLEANFILES += \
- src/libpakfire/parser/grammar.c \
- src/libpakfire/parser/grammar.h \
- src/libpakfire/parser/scanner.c
+ src/pakfire/parser/grammar.c \
+ src/pakfire/parser/grammar.h \
+ src/pakfire/parser/scanner.c
noinst_LTLIBRARIES += \
libpakfire-parser.la
libpakfire_parser_la_SOURCES = \
- src/libpakfire/parser/grammar.h \
- src/libpakfire/parser/grammar.y \
- src/libpakfire/parser/scanner.l
+ src/pakfire/parser/grammar.h \
+ src/pakfire/parser/grammar.y \
+ src/pakfire/parser/scanner.l
libpakfire_parser_la_CFLAGS = \
$(AM_CFLAGS) \
libpakfire_parser_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(top_srcdir)/src/libpakfire/include \
+ -I$(top_srcdir)/src \
-include $(top_builddir)/config.h \
-DPAKFIRE_PRIVATE
BUILT_SOURCES += \
- src/libpakfire/parser/grammar.h
+ src/pakfire/parser/grammar.h
-lib_LTLIBRARIES += \
+noinst_LTLIBRARIES += \
libpakfire.la
libpakfire_la_SOURCES = \
- src/libpakfire/arch.c \
- src/libpakfire/archive.c \
- src/libpakfire/base64.c \
- src/libpakfire/build.c \
- src/libpakfire/buildservice.c \
- src/libpakfire/cgroup.c \
- src/libpakfire/compress.c \
- src/libpakfire/config.c \
- src/libpakfire/ctx.c \
- src/libpakfire/daemon.c \
- src/libpakfire/db.c \
- src/libpakfire/deps.c \
- src/libpakfire/digest.c \
- src/libpakfire/dist.c \
- src/libpakfire/elf.c \
- src/libpakfire/env.c \
- src/libpakfire/fhs.c \
- src/libpakfire/file.c \
- src/libpakfire/filelist.c \
- src/libpakfire/hex.c \
- src/libpakfire/httpclient.c \
- src/libpakfire/jail.c \
- src/libpakfire/job.c \
- src/libpakfire/key.c \
- src/libpakfire/linter.c \
- src/libpakfire/linter-file.c \
- src/libpakfire/log_buffer.c \
- src/libpakfire/log_stream.c \
- src/libpakfire/logging.c \
- src/libpakfire/mirror.c \
- src/libpakfire/mirrorlist.c \
- src/libpakfire/mount.c \
- src/libpakfire/os.c \
- src/libpakfire/package.c \
- src/libpakfire/packager.c \
- src/libpakfire/packagelist.c \
- src/libpakfire/pakfire.c \
- src/libpakfire/parse.c \
- src/libpakfire/parser.c \
- src/libpakfire/path.c \
- src/libpakfire/problem.c \
- src/libpakfire/progress.c \
- src/libpakfire/pty.c \
- src/libpakfire/pwd.c \
- src/libpakfire/repo.c \
- src/libpakfire/repolist.c \
- src/libpakfire/scriptlet.c \
- src/libpakfire/snapshot.c \
- src/libpakfire/solution.c \
- src/libpakfire/string.c \
- src/libpakfire/stripper.c \
- src/libpakfire/transaction.c \
- src/libpakfire/util.c \
- src/libpakfire/xfer.c
-
-pkginclude_HEADERS += \
- src/libpakfire/include/pakfire/arch.h \
- src/libpakfire/include/pakfire/archive.h \
- src/libpakfire/include/pakfire/base64.h \
- src/libpakfire/include/pakfire/build.h \
- src/libpakfire/include/pakfire/buildservice.h \
- src/libpakfire/include/pakfire/cgroup.h \
- src/libpakfire/include/pakfire/compress.h \
- src/libpakfire/include/pakfire/config.h \
- src/libpakfire/include/pakfire/constants.h \
- src/libpakfire/include/pakfire/ctx.h \
- src/libpakfire/include/pakfire/daemon.h \
- src/libpakfire/include/pakfire/db.h \
- src/libpakfire/include/pakfire/deps.h \
- src/libpakfire/include/pakfire/digest.h \
- src/libpakfire/include/pakfire/dist.h \
- src/libpakfire/include/pakfire/elf.h \
- src/libpakfire/include/pakfire/env.h \
- src/libpakfire/include/pakfire/fhs.h \
- src/libpakfire/include/pakfire/file.h \
- src/libpakfire/include/pakfire/filelist.h \
- src/libpakfire/include/pakfire/hex.h \
- src/libpakfire/include/pakfire/httpclient.h \
- src/libpakfire/include/pakfire/i18n.h \
- src/libpakfire/include/pakfire/jail.h \
- src/libpakfire/include/pakfire/job.h \
- src/libpakfire/include/pakfire/key.h \
- src/libpakfire/include/pakfire/linter.h \
- src/libpakfire/include/pakfire/linter-file.h \
- src/libpakfire/include/pakfire/log_buffer.h \
- src/libpakfire/include/pakfire/log_stream.h \
- src/libpakfire/include/pakfire/logging.h \
- src/libpakfire/include/pakfire/mirror.h \
- src/libpakfire/include/pakfire/mirrorlist.h \
- src/libpakfire/include/pakfire/mount.h \
- src/libpakfire/include/pakfire/os.h \
- src/libpakfire/include/pakfire/package.h \
- src/libpakfire/include/pakfire/packager.h \
- src/libpakfire/include/pakfire/packagelist.h \
- src/libpakfire/include/pakfire/pakfire.h \
- src/libpakfire/include/pakfire/parse.h \
- src/libpakfire/include/pakfire/parser.h \
- src/libpakfire/include/pakfire/path.h \
- src/libpakfire/include/pakfire/private.h \
- src/libpakfire/include/pakfire/problem.h \
- src/libpakfire/include/pakfire/progress.h \
- src/libpakfire/include/pakfire/pty.h \
- src/libpakfire/include/pakfire/pwd.h \
- src/libpakfire/include/pakfire/repo.h \
- src/libpakfire/include/pakfire/repolist.h \
- src/libpakfire/include/pakfire/scriptlet.h \
- src/libpakfire/include/pakfire/snapshot.h \
- src/libpakfire/include/pakfire/solution.h \
- src/libpakfire/include/pakfire/string.h \
- src/libpakfire/include/pakfire/stripper.h \
- src/libpakfire/include/pakfire/syscalls.h \
- src/libpakfire/include/pakfire/transaction.h \
- src/libpakfire/include/pakfire/util.h \
- src/libpakfire/include/pakfire/xfer.h
+ src/pakfire/arch.c \
+ src/pakfire/arch.h \
+ src/pakfire/archive.c \
+ src/pakfire/archive.h \
+ src/pakfire/base64.c \
+ src/pakfire/base64.h \
+ src/pakfire/build.c \
+ src/pakfire/build.h \
+ src/pakfire/buildservice.c \
+ src/pakfire/buildservice.h \
+ src/pakfire/cgroup.c \
+ src/pakfire/cgroup.h \
+ src/pakfire/compress.c \
+ src/pakfire/compress.h \
+ src/pakfire/config.c \
+ src/pakfire/config.h \
+ src/pakfire/constants.h \
+ src/pakfire/ctx.c \
+ src/pakfire/ctx.h \
+ src/pakfire/daemon.c \
+ src/pakfire/daemon.h \
+ src/pakfire/db.c \
+ src/pakfire/db.h \
+ src/pakfire/deps.c \
+ src/pakfire/deps.h \
+ src/pakfire/digest.c \
+ src/pakfire/digest.h \
+ src/pakfire/dist.c \
+ src/pakfire/dist.h \
+ src/pakfire/elf.c \
+ src/pakfire/elf.h \
+ src/pakfire/env.c \
+ src/pakfire/env.h \
+ src/pakfire/fhs.c \
+ src/pakfire/fhs.h \
+ src/pakfire/file.c \
+ src/pakfire/file.h \
+ src/pakfire/filelist.c \
+ src/pakfire/filelist.h \
+ src/pakfire/hex.c \
+ src/pakfire/hex.h \
+ src/pakfire/httpclient.c \
+ src/pakfire/httpclient.h \
+ src/pakfire/jail.c \
+ src/pakfire/jail.h \
+ src/pakfire/job.c \
+ src/pakfire/job.h \
+ src/pakfire/key.c \
+ src/pakfire/key.h \
+ src/pakfire/linter.c \
+ src/pakfire/linter.h \
+ src/pakfire/linter-file.c \
+ src/pakfire/linter-file.h \
+ src/pakfire/log_buffer.c \
+ src/pakfire/log_buffer.h \
+ src/pakfire/log_stream.c \
+ src/pakfire/log_stream.h \
+ src/pakfire/logging.c \
+ src/pakfire/logging.h \
+ src/pakfire/mirror.c \
+ src/pakfire/mirror.h \
+ src/pakfire/mirrorlist.c \
+ src/pakfire/mirrorlist.h \
+ src/pakfire/mount.c \
+ src/pakfire/mount.h \
+ src/pakfire/os.c \
+ src/pakfire/os.h \
+ src/pakfire/package.c \
+ src/pakfire/package.h \
+ src/pakfire/packager.c \
+ src/pakfire/packager.h \
+ src/pakfire/packagelist.c \
+ src/pakfire/packagelist.h \
+ src/pakfire/pakfire.c \
+ src/pakfire/pakfire.h \
+ src/pakfire/parse.c \
+ src/pakfire/parse.h \
+ src/pakfire/parser.c \
+ src/pakfire/parser.h \
+ src/pakfire/path.c \
+ src/pakfire/path.h \
+ src/pakfire/problem.c \
+ src/pakfire/problem.h \
+ src/pakfire/progress.c \
+ src/pakfire/progress.h \
+ src/pakfire/pty.c \
+ src/pakfire/pty.h \
+ src/pakfire/pwd.c \
+ src/pakfire/pwd.h \
+ src/pakfire/repo.c \
+ src/pakfire/repo.h \
+ src/pakfire/repolist.c \
+ src/pakfire/repolist.h \
+ src/pakfire/scriptlet.c \
+ src/pakfire/scriptlet.h \
+ src/pakfire/snapshot.c \
+ src/pakfire/snapshot.h \
+ src/pakfire/solution.c \
+ src/pakfire/solution.h \
+ src/pakfire/string.c \
+ src/pakfire/string.h \
+ src/pakfire/stripper.c \
+ src/pakfire/stripper.h \
+ src/pakfire/syscalls.h \
+ src/pakfire/transaction.c \
+ src/pakfire/transaction.h \
+ src/pakfire/util.c \
+ src/pakfire/util.h \
+ src/pakfire/xfer.c \
+ src/pakfire/xfer.h
libpakfire_la_CFLAGS = \
$(AM_CFLAGS) \
libpakfire_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(top_srcdir)/src/libpakfire/include \
+ -I$(top_srcdir)/src \
-include $(top_builddir)/config.h \
-DPAKFIRE_PRIVATE
libpakfire_la_LDFLAGS = \
$(AM_LDFLAGS) \
- $(COVERAGE_LDFLAGS) \
- -version-info $(LIBPAKFIRE_CURRENT):$(LIBPAKFIRE_REVISION):$(LIBPAKFIRE_AGE) \
- -Wl,--version-script=$(top_srcdir)/src/libpakfire/libpakfire.sym
+ $(COVERAGE_LDFLAGS)
libpakfire_la_LIBADD = \
libpakfire-parser.la \
$(ZSTD_LIBS)
libpakfire_la_DEPENDENCIES = \
- src/libpakfire/libpakfire.sym \
libpakfire-parser.la
-EXTRA_DIST += \
- src/libpakfire/libpakfire.sym
-
-# ------------------------------------------------------------------------------
-
-noinst_LTLIBRARIES += \
- libpakfire-internal.la
-
-libpakfire_internal_la_SOURCES = \
- $(libpakfire_la_SOURCES)
-
-libpakfire_internal_la_CPPFLAGS = \
- $(libpakfire_la_CPPFLAGS)
-
-libpakfire_internal_la_CFLAGS = \
- $(libpakfire_la_CFLAGS)
-
-libpakfire_internal_la_LDFLAGS = \
- $(AM_LDFLAGS) \
- $(COVERAGE_LDFLAGS) \
- -Wl,--version-script=$(top_srcdir)/src/libpakfire/libpakfire.sym
-
-libpakfire_internal_la_LIBADD = \
- $(libpakfire_la_LIBADD)
-
-libpakfire_internal_la_DEPENDENCIES = \
- $(libpakfire_la_DEPENDENCIES)
-
# ------------------------------------------------------------------------------
bin_PROGRAMS += \
pakfire_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(top_srcdir)/src/libpakfire/include
+ -I$(top_srcdir)/src
pakfire_CFLAGS = \
$(AM_CFLAGS) \
pakfire_builder_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(top_srcdir)/src/libpakfire/include
+ -I$(top_srcdir)/src
pakfire_builder_CFLAGS = \
$(AM_CFLAGS) \
pakfire_client_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(top_srcdir)/src/libpakfire/include
+ -I$(top_srcdir)/src
pakfire_client_CFLAGS = \
$(AM_CFLAGS) \
pakfire_daemon_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(top_srcdir)/src/libpakfire/include
+ -I$(top_srcdir)/src
pakfire_daemon_CFLAGS = \
$(AM_CFLAGS) \
libcli_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DPAKFIRE_PRIVATE \
- -I$(top_srcdir)/src/libpakfire/include
+ -I$(top_srcdir)/src
libcli_la_CFLAGS = \
$(AM_CFLAGS) \
$(JSON_C_LIBS)
libcli_la_LIBADD = \
- libpakfire.la \
- libpakfire-internal.la
+ libpakfire.la
# ------------------------------------------------------------------------------
tests_parser_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
- $(PAKFIRE_CPPFLAGS) \
+ -I$(top_srcdir)/src \
-DPAKFIRE_PRIVATE
tests_parser_test_CFLAGS = \
$(TESTSUITE_LDFLAGS)
tests_parser_test_LDADD = \
- libpakfire.la \
- libpakfire-internal.la
+ libpakfire.la
# ------------------------------------------------------------------------------
TESTSUITE_CPPFLAGS = \
$(AM_CPPFLAGS) \
- $(PAKFIRE_CPPFLAGS) \
+ -I$(top_srcdir)/src \
-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\" \
-DTEST_CONFIG_FILE=\"$(abs_top_srcdir)/contrib/config/pakfire.conf\" \
-DTEST_DATA_DIR=\"$(abs_top_srcdir)/tests/data\" \
TESTSUITE_LDADD = \
tests/libtestsuite.la \
- libpakfire.la \
- libpakfire-internal.la
+ libpakfire.la
TESTS_ENVIRONMENT = \
TEST_CONFIG_FILE="$(abs_top_srcdir)/tests/pakfire.conf" \
# Test the Python modules we just built
TESTS_ENVIRONMENT += \
- PYTHONPATH=$(top_srcdir)/.libs:$(PYTHONPATH)
+ PYTHONPATH=$(top_builddir)/.libs:$(PYTHONPATH)
dist_check_SCRIPTS = \
tests/python/archive.py \
Description: ${source:Synopsis} (CLI utilities)
${source:Extended-Description}
-Package: libpakfire0
-Architecture: any
-Section: libs
-Depends:
- ${shlibs:Depends},
- ${misc:Depends},
-Multi-Arch: same
-Description: ${source:Synopsis}
- ${source:Extended-Description}
- .
- This package provides the shared library.
-
-Package: libpakfire-dev
-Architecture: any
-Section: libdevel
-Depends:
- libpakfire0 (= ${binary:Version}),
- ${misc:Depends},
-Multi-Arch: same
-Description: ${source:Synopsis} (development files)
- ${source:Extended-Description}
- .
- This package provides the headers and development files needed to use
- libpakfire in your own programs.
-
Package: python3-pakfire
Architecture: any
Section: python
Description: ${source:Synopsis} (Python 3 bindings)
${source:Extended-Description}
.
- This package provides the Python 3 bindings for libpakfire.
+ This package provides the Python 3 bindings for Pakfire.
+++ /dev/null
-usr/include/pakfire
-usr/lib/*/libpakfire.so
-usr/share/doc/pakfire
-usr/share/man/man5
+++ /dev/null
-usr/lib/*/libpakfire.so.*
-usr/share/locale/*/LC_MESSAGES/pakfire.mo
-usr/lib/*/libpakfire.la
usr/lib/python3/dist-packages/pakfire/pakfire.la
+++ /dev/null
-/*#############################################################################
-# #
-# 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_PRIVATE_H
-#define PAKFIRE_PRIVATE_H
-
-#ifdef PAKFIRE_PRIVATE
-#define PAKFIRE_EXPORT __attribute__ ((visibility("default")))
-#endif
-
-/*
- Buffer size that is used whenever we read any files into
- something like a hash function.
-*/
-#define PAKFIRE_BUFFER_SIZE 65536
-
-#endif /* PAKFIRE_PRIVATE_H */
+++ /dev/null
-/*#############################################################################
-# #
-# 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/>. #
-# #
-#############################################################################*/
-
-LIBPAKFIRE_0 {
-global:
- # pakfire ctx
- pakfire_ctx_create;
- pakfire_ctx_ref;
- pakfire_ctx_unref;
- pakfire_ctx_get_log_level;
- pakfire_ctx_set_log_level;
- pakfire_ctx_set_log_callback;
- pakfire_ctx_set_confirm_callback;
- pakfire_ctx_set_progress_callback;
- pakfire_ctx_set_pick_solution_callback;
- pakfire_ctx_has_flag;
- pakfire_ctx_set_flag;
- pakfire_ctx_get_cache_path;
- pakfire_ctx_set_cache_path;
-
- # pakfire
- pakfire_check;
- pakfire_clean;
- pakfire_create;
- pakfire_get_arch;
- pakfire_get_path;
- pakfire_get_repo;
- pakfire_get_repos;
- pakfire_has_flag;
- pakfire_ref;
- pakfire_refresh;
- pakfire_search;
- pakfire_set_confirm_callback;
- pakfire_set_pick_solution_callback;
- pakfire_set_setup_progress_callback;
- pakfire_unref;
- pakfire_update_snapshot;
- pakfire_version_compare;
- pakfire_whatprovides;
- pakfire_whatrequires;
-
- # arch
- pakfire_arch_native;
- pakfire_arch_supported;
- pakfire_supported_arches;
- pakfire_arch_is_supported_by_host;
-
- # archive
- pakfire_archive_extract;
- pakfire_archive_get_filelist;
- pakfire_archive_get_format;
- pakfire_archive_get_path;
- pakfire_archive_get_size;
- pakfire_archive_lint;
- pakfire_archive_make_package;
- pakfire_archive_open;
- pakfire_archive_read;
- pakfire_archive_ref;
- pakfire_archive_unref;
- pakfire_archive_verify;
-
- # build
- pakfire_build_create;
- pakfire_build_exec;
- pakfire_build_install;
- pakfire_build_mkimage;
- pakfire_build_ref;
- pakfire_build_shell;
- pakfire_build_set_ccache_path;
- pakfire_build_set_target;
- pakfire_build_unref;
-
- # buildservice
- pakfire_buildservice_create;
- pakfire_buildservice_ref;
- pakfire_buildservice_unref;
- pakfire_buildservice_list_uploads;
- pakfire_buildservice_upload;
- pakfire_buildservice_delete_upload;
- pakfire_buildservice_list_repos;
- pakfire_buildservice_get_repo;
- pakfire_buildservice_create_repo;
- pakfire_buildservice_delete_repo;
- pakfire_buildservice_get_url;
- pakfire_buildservice_job_finished;
-
- # dependencies
- pakfire_static_version_compare;
-
- # digest
- pakfire_digest_get_by_name;
- pakfire_digest_name;
-
- # dist
- pakfire_dist;
-
- # file
- pakfire_file_cmp;
- pakfire_file_create;
- pakfire_file_get_caps;
- pakfire_file_get_ctime;
- pakfire_file_get_dev;
- pakfire_file_get_digest;
- pakfire_file_get_gname;
- pakfire_file_get_inode;
- pakfire_file_get_mimetype;
- pakfire_file_get_mode;
- pakfire_file_get_mtime;
- pakfire_file_get_nlink;
- pakfire_file_get_path;
- pakfire_file_get_perms;
- pakfire_file_get_size;
- pakfire_file_get_time;
- pakfire_file_get_type;
- pakfire_file_get_uname;
- pakfire_file_has_caps;
- pakfire_file_matches;
- pakfire_file_set_ctime;
- pakfire_file_set_dev;
- pakfire_file_set_digest;
- pakfire_file_set_gname;
- pakfire_file_set_inode;
- pakfire_file_set_mimetype;
- pakfire_file_set_mode;
- pakfire_file_set_mtime;
- pakfire_file_set_nlink;
- pakfire_file_set_path;
- pakfire_file_set_perms;
- pakfire_file_set_size;
- pakfire_file_set_time;
- pakfire_file_set_uname;
- pakfire_file_ref;
- pakfire_file_unref;
-
- # filelist
- pakfire_filelist_add;
- pakfire_filelist_clear;
- pakfire_filelist_create;
- pakfire_filelist_get;
- pakfire_filelist_is_empty;
- pakfire_filelist_length;
- pakfire_filelist_ref;
- pakfire_filelist_unref;
-
- # key
- pakfire_key_dump;
- pakfire_key_export;
- pakfire_key_generate;
- pakfire_key_get;
- pakfire_key_get_algo;
- pakfire_key_get_comment;
- pakfire_key_get_id;
- pakfire_key_import;
- pakfire_key_ref;
- pakfire_key_sign;
- pakfire_key_unref;
- pakfire_key_verify;
-
- # log
- pakfire_log_stderr;
- pakfire_log_syslog;
-
- # package
- pakfire_package_cmp;
- pakfire_package_create;
- pakfire_package_dump;
- pakfire_package_eq;
- pakfire_package_get_cache_path;
- pakfire_package_get_deps;
- pakfire_package_get_digest;
- pakfire_package_get_filelist;
- pakfire_package_get_num;
- pakfire_package_get_pakfire;
- pakfire_package_get_path;
- pakfire_package_get_repo;
- pakfire_package_get_reverse_requires;
- pakfire_package_get_size;
- pakfire_package_get_string;
- pakfire_package_get_strings;
- pakfire_package_get_uuid;
- pakfire_package_id;
- pakfire_package_installcheck;
- pakfire_package_ref;
- pakfire_package_set_checksum;
- pakfire_package_set_filelist;
- pakfire_package_set_num;
- pakfire_package_set_path;
- pakfire_package_set_string;
- pakfire_package_set_strings;
- pakfire_package_set_uuid;
- pakfire_package_unref;
-
- # packagelist
- pakfire_packagelist_create;
- pakfire_packagelist_get;
- pakfire_packagelist_length;
- pakfire_packagelist_push;
- pakfire_packagelist_ref;
- pakfire_packagelist_sort;
- pakfire_packagelist_unref;
- pakfire_packagelist_walk;
-
- # problem
- pakfire_problem_get_solutions;
- pakfire_problem_ref;
- pakfire_problem_to_string;
- pakfire_problem_unref;
-
- # progress
- pakfire_progress_get_elapsed_time;
- pakfire_progress_get_eta;
- pakfire_progress_get_max_value;
- pakfire_progress_get_percentage;
- pakfire_progress_get_title;
- pakfire_progress_get_transfer_speed;
- pakfire_progress_get_value;
- pakfire_progress_has_flag;
- pakfire_progress_set_callback_data;
- pakfire_progress_set_finish_callback;
- pakfire_progress_set_free_callback;
- pakfire_progress_set_start_callback;
- pakfire_progress_set_update_callback;
-
- # repo
- pakfire_repo_cmp;
- pakfire_repo_compose;
- pakfire_repo_count;
- pakfire_repo_clean;
- pakfire_repo_create;
- pakfire_repo_get_baseurl;
- pakfire_repo_get_description;
- pakfire_repo_get_name;
- pakfire_repo_get_enabled;
- pakfire_repo_get_key;
- pakfire_repo_get_mirrorlist_url;
- pakfire_repo_get_pakfire;
- pakfire_repo_get_pool;
- pakfire_repo_get_priority;
- pakfire_repo_identical;
- pakfire_repo_is_installed_repo;
- pakfire_repo_read_solv;
- pakfire_repo_ref;
- pakfire_repo_refresh;
- pakfire_repo_scan;
- pakfire_repo_set_baseurl;
- pakfire_repo_set_description;
- pakfire_repo_set_enabled;
- pakfire_repo_set_mirrorlist_url;
- pakfire_repo_set_priority;
- pakfire_repo_write_config;
- pakfire_repo_write_solv;
- pakfire_repo_unref;
-
- # repolist
- pakfire_repolist_append;
- pakfire_repolist_clear;
- pakfire_repolist_create;
- pakfire_repolist_empty;
- pakfire_repolist_get;
- pakfire_repolist_size;
- pakfire_repolist_ref;
- pakfire_repolist_unref;
-
- # solution
- pakfire_solution_ref;
- pakfire_solution_to_string;
- pakfire_solution_unref;
-
- # transaction
- pakfire_transaction_count;
- pakfire_transaction_create;
- pakfire_transaction_download;
- pakfire_transaction_dump;
- pakfire_transaction_get_problems;
- pakfire_transaction_ref;
- pakfire_transaction_request;
- pakfire_transaction_request_package;
- pakfire_transaction_run;
- pakfire_transaction_set_pick_solution_callback;
- pakfire_transaction_solve;
- pakfire_transaction_take_solution;
- pakfire_transaction_unref;
-
-local:
- *;
-};
#include <pakfire/arch.h>
#include <pakfire/constants.h>
-#include <pakfire/private.h>
#include <pakfire/string.h>
#include <pakfire/util.h>
return NULL;
}
-PAKFIRE_EXPORT int pakfire_arch_supported(const char* name) {
+int pakfire_arch_supported(const char* name) {
const struct pakfire_arch* arch = pakfire_arch_find(name);
if (arch)
return i;
}
-PAKFIRE_EXPORT const char** pakfire_supported_arches(void) {
+const char** pakfire_supported_arches(void) {
const struct pakfire_arch* arch = NULL;
static const char** arches = NULL;
return 0;
}
-PAKFIRE_EXPORT const char* pakfire_arch_native(void) {
+const char* pakfire_arch_native(void) {
struct utsname buf;
static __thread const char* arch_native = NULL;
return NULL;
}
-PAKFIRE_EXPORT const char* pakfire_arch_is_supported_by_host(const char* name) {
+const char* pakfire_arch_is_supported_by_host(const char* name) {
const char* arch = NULL;
// Check if we natively support this architecture
#include <pakfire/package.h>
#include <pakfire/pakfire.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/repo.h>
#include <pakfire/scriptlet.h>
#include <pakfire/string.h>
free(archive);
}
-PAKFIRE_EXPORT struct pakfire_archive* pakfire_archive_ref(struct pakfire_archive* archive) {
+struct pakfire_archive* pakfire_archive_ref(struct pakfire_archive* archive) {
++archive->nrefs;
return archive;
}
-PAKFIRE_EXPORT struct pakfire_archive* pakfire_archive_unref(struct pakfire_archive* archive) {
+struct pakfire_archive* pakfire_archive_unref(struct pakfire_archive* archive) {
if (--archive->nrefs > 0)
return archive;
return 0;
}
-PAKFIRE_EXPORT int pakfire_archive_open(struct pakfire_archive** archive,
+int pakfire_archive_open(struct pakfire_archive** archive,
struct pakfire* pakfire, const char* path) {
struct pakfire_archive* a = NULL;
int r;
return PAKFIRE_WALK_DONE;
}
-PAKFIRE_EXPORT FILE* pakfire_archive_read(struct pakfire_archive* archive, const char* path, int flags) {
+FILE* pakfire_archive_read(struct pakfire_archive* archive, const char* path, int flags) {
struct pakfire_archive_read_cookie* cookie = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_archive_extract(struct pakfire_archive* archive,
+int pakfire_archive_extract(struct pakfire_archive* archive,
const char* path, const int flags) {
return __pakfire_archive_extract(archive, path, flags);
}
-PAKFIRE_EXPORT const char* pakfire_archive_get_path(struct pakfire_archive* archive) {
+const char* pakfire_archive_get_path(struct pakfire_archive* archive) {
return archive->path;
}
-PAKFIRE_EXPORT unsigned int pakfire_archive_get_format(struct pakfire_archive* archive) {
+unsigned int pakfire_archive_get_format(struct pakfire_archive* archive) {
return archive->format;
}
PAKFIRE_EXTRACT_DRY_RUN|PAKFIRE_EXTRACT_NO_PROGRESS);
}
-PAKFIRE_EXPORT struct pakfire_filelist* pakfire_archive_get_filelist(struct pakfire_archive* archive) {
+struct pakfire_filelist* pakfire_archive_get_filelist(struct pakfire_archive* archive) {
if (!archive->filelist) {
int r = pakfire_archive_load_filelist(archive);
if (r)
return pakfire_filelist_ref(archive->filelist);
}
-PAKFIRE_EXPORT int pakfire_archive_verify(struct pakfire_archive* archive, int* status) {
+int pakfire_archive_verify(struct pakfire_archive* archive, int* status) {
// XXX currently not implemented
return 0;
}
-PAKFIRE_EXPORT ssize_t pakfire_archive_get_size(struct pakfire_archive* archive) {
+ssize_t pakfire_archive_get_size(struct pakfire_archive* archive) {
return archive->stat.st_size;
}
/*
Copy all metadata from this archive to the package object
*/
-PAKFIRE_EXPORT int pakfire_archive_make_package(struct pakfire_archive* archive,
+int pakfire_archive_make_package(struct pakfire_archive* archive,
struct pakfire_repo* repo, struct pakfire_package** package) {
struct pakfire_repo* dummy = NULL;
int r;
return 0;
}
-PAKFIRE_EXPORT int pakfire_archive_lint(struct pakfire_archive* archive,
+int pakfire_archive_lint(struct pakfire_archive* archive,
pakfire_linter_result_callback callback, void* data) {
struct pakfire_linter* linter = NULL;
int r;
#include <pakfire/packager.h>
#include <pakfire/parser.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/problem.h>
#include <pakfire/repo.h>
#include <pakfire/scriptlet.h>
return r;
}
-PAKFIRE_EXPORT int pakfire_build_create(struct pakfire_build** build,
+int pakfire_build_create(struct pakfire_build** build,
struct pakfire* pakfire, const char* id, int flags) {
int r;
return r;
}
-PAKFIRE_EXPORT struct pakfire_build* pakfire_build_ref(struct pakfire_build* build) {
+struct pakfire_build* pakfire_build_ref(struct pakfire_build* build) {
++build->nrefs;
return build;
}
-PAKFIRE_EXPORT struct pakfire_build* pakfire_build_unref(struct pakfire_build* build) {
+struct pakfire_build* pakfire_build_unref(struct pakfire_build* build) {
if (--build->nrefs > 0)
return build;
return NULL;
}
-PAKFIRE_EXPORT int pakfire_build_set_ccache_path(
+int pakfire_build_set_ccache_path(
struct pakfire_build* build, const char* path) {
// Check if this can be called
if (pakfire_build_has_flag(build, PAKFIRE_BUILD_DISABLE_CCACHE))
return pakfire_string_set(build->ccache_path, path);
}
-PAKFIRE_EXPORT int pakfire_build_set_target(
+int pakfire_build_set_target(
struct pakfire_build* build, const char* target) {
return pakfire_string_set(build->target, target);
}
return r;
}
-PAKFIRE_EXPORT int pakfire_build_exec(struct pakfire_build* build, const char* path) {
+int pakfire_build_exec(struct pakfire_build* build, const char* path) {
struct pakfire_package* package = NULL;
struct pakfire_parser* makefile = NULL;
char* buildroot = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_build_mkimage(struct pakfire_build* build,
+int pakfire_build_mkimage(struct pakfire_build* build,
const char* type, FILE* f) {
FILE* t = NULL;
char packagesdir[PATH_MAX];
return r;
}
-PAKFIRE_EXPORT int pakfire_build_install(struct pakfire_build* build, const char** packages) {
+int pakfire_build_install(struct pakfire_build* build, const char** packages) {
struct pakfire_transaction* transaction = NULL;
char* problems = NULL;
int r;
/*
Drops the user into a shell
*/
-PAKFIRE_EXPORT int pakfire_build_shell(struct pakfire_build* build, const char* argv[]) {
+int pakfire_build_shell(struct pakfire_build* build, const char* argv[]) {
int r;
// Initialize the build environment
#include <pakfire/logging.h>
#include <pakfire/os.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/string.h>
#include <pakfire/xfer.h>
free(service);
}
-PAKFIRE_EXPORT int pakfire_buildservice_create(
+int pakfire_buildservice_create(
struct pakfire_buildservice** service, struct pakfire_ctx* ctx) {
struct pakfire_buildservice* s = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT struct pakfire_buildservice* pakfire_buildservice_ref(
+struct pakfire_buildservice* pakfire_buildservice_ref(
struct pakfire_buildservice* service) {
++service->nrefs;
return service;
}
-PAKFIRE_EXPORT struct pakfire_buildservice* pakfire_buildservice_unref(
+struct pakfire_buildservice* pakfire_buildservice_unref(
struct pakfire_buildservice* service) {
if (--service->nrefs > 0)
return service;
return NULL;
}
-PAKFIRE_EXPORT const char* pakfire_buildservice_get_url(struct pakfire_buildservice* service) {
+const char* pakfire_buildservice_get_url(struct pakfire_buildservice* service) {
return service->url;
}
return r;
}
-PAKFIRE_EXPORT int pakfire_buildservice_upload(struct pakfire_buildservice* service,
+int pakfire_buildservice_upload(struct pakfire_buildservice* service,
const char* path, const char* filename, char** uuid) {
char basename[NAME_MAX];
FILE* f = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_buildservice_list_uploads(
+int pakfire_buildservice_list_uploads(
struct pakfire_buildservice* service, struct json_object** p) {
struct pakfire_xfer* xfer = NULL;
struct json_object* response = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_buildservice_delete_upload(
+int pakfire_buildservice_delete_upload(
struct pakfire_buildservice* service, const char* uuid) {
struct pakfire_xfer* xfer = NULL;
struct json_object* response = NULL;
// Repositories
-PAKFIRE_EXPORT int pakfire_buildservice_list_repos(struct pakfire_buildservice* service,
+int pakfire_buildservice_list_repos(struct pakfire_buildservice* service,
const char* distro, struct json_object** p) {
struct pakfire_xfer* xfer = NULL;
struct json_object* response = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_buildservice_get_repo(struct pakfire_buildservice* service,
+int pakfire_buildservice_get_repo(struct pakfire_buildservice* service,
const char* distro, const char* name, struct json_object** p) {
struct pakfire_xfer* xfer = NULL;
struct json_object* response = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_buildservice_create_repo(struct pakfire_buildservice* service,
+int pakfire_buildservice_create_repo(struct pakfire_buildservice* service,
const char* distro, const char* name, const char* description, struct json_object** p) {
struct pakfire_xfer* xfer = NULL;
struct json_object* response = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_buildservice_delete_repo(struct pakfire_buildservice* service,
+int pakfire_buildservice_delete_repo(struct pakfire_buildservice* service,
const char* distro, const char* name) {
struct pakfire_xfer* xfer = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_buildservice_job_finished(struct pakfire_buildservice* service,
+int pakfire_buildservice_job_finished(struct pakfire_buildservice* service,
const char* uuid, int success, const char* logfile, const char** packages) {
struct pakfire_xfer* xfer = NULL;
int r;
#include <pakfire/ctx.h>
#include <pakfire/logging.h>
#include <pakfire/os.h>
-#include <pakfire/private.h>
#include <pakfire/string.h>
struct pakfire_ctx {
free(ctx);
}
-PAKFIRE_EXPORT int pakfire_ctx_create(struct pakfire_ctx** ctx, const char* path) {
+int pakfire_ctx_create(struct pakfire_ctx** ctx, const char* path) {
struct pakfire_ctx* c = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT struct pakfire_ctx* pakfire_ctx_ref(struct pakfire_ctx* ctx) {
+struct pakfire_ctx* pakfire_ctx_ref(struct pakfire_ctx* ctx) {
ctx->nrefs++;
return ctx;
}
-PAKFIRE_EXPORT struct pakfire_ctx* pakfire_ctx_unref(struct pakfire_ctx* ctx) {
+struct pakfire_ctx* pakfire_ctx_unref(struct pakfire_ctx* ctx) {
if (--ctx->nrefs > 0)
return ctx;
// Flags
-PAKFIRE_EXPORT int pakfire_ctx_has_flag(struct pakfire_ctx* ctx, int flag) {
+int pakfire_ctx_has_flag(struct pakfire_ctx* ctx, int flag) {
return ctx->flags & flag;
}
-PAKFIRE_EXPORT int pakfire_ctx_set_flag(struct pakfire_ctx* ctx, int flag) {
+int pakfire_ctx_set_flag(struct pakfire_ctx* ctx, int flag) {
ctx->flags |= flag;
return 0;
// Logging
-PAKFIRE_EXPORT int pakfire_ctx_get_log_level(struct pakfire_ctx* ctx) {
+int pakfire_ctx_get_log_level(struct pakfire_ctx* ctx) {
return ctx->log.level;
}
-PAKFIRE_EXPORT void pakfire_ctx_set_log_level(struct pakfire_ctx* ctx, int level) {
+void pakfire_ctx_set_log_level(struct pakfire_ctx* ctx, int level) {
ctx->log.level = level;
}
-PAKFIRE_EXPORT void pakfire_ctx_set_log_callback(struct pakfire_ctx* ctx,
+void pakfire_ctx_set_log_callback(struct pakfire_ctx* ctx,
pakfire_log_callback callback, void* data) {
ctx->log.callback = callback;
ctx->log.data = data;
// Paths
-PAKFIRE_EXPORT const char* pakfire_ctx_get_cache_path(struct pakfire_ctx* ctx) {
+const char* pakfire_ctx_get_cache_path(struct pakfire_ctx* ctx) {
return ctx->paths.cache;
}
-PAKFIRE_EXPORT int pakfire_ctx_set_cache_path(struct pakfire_ctx* ctx, const char* path) {
+int pakfire_ctx_set_cache_path(struct pakfire_ctx* ctx, const char* path) {
wordexp_t result = {};
int r;
// Confirm
-PAKFIRE_EXPORT void pakfire_ctx_set_confirm_callback(struct pakfire_ctx* ctx,
+void pakfire_ctx_set_confirm_callback(struct pakfire_ctx* ctx,
pakfire_confirm_callback callback, void* data) {
ctx->confirm.callback = callback;
ctx->confirm.data = data;
// Progress
-PAKFIRE_EXPORT void pakfire_ctx_set_progress_callback(struct pakfire_ctx* ctx,
+void pakfire_ctx_set_progress_callback(struct pakfire_ctx* ctx,
pakfire_progress_callback callback, void* data) {
ctx->progress.callback = callback;
ctx->progress.data = data;
// Pick Solution
-PAKFIRE_EXPORT void pakfire_ctx_set_pick_solution_callback(struct pakfire_ctx* ctx,
+void pakfire_ctx_set_pick_solution_callback(struct pakfire_ctx* ctx,
pakfire_pick_solution_callback callback, void* data) {
ctx->pick_solution.callback = callback;
ctx->pick_solution.data = data;
#include <pakfire/logging.h>
#include <pakfire/package.h>
#include <pakfire/pakfire.h>
-#include <pakfire/private.h>
#include <pakfire/string.h>
#include <pakfire/util.h>
/*
This function can compare package versions without a Pakfire instance initialized.
*/
-PAKFIRE_EXPORT int pakfire_static_version_compare(const char* evr1, const char* evr2) {
+int pakfire_static_version_compare(const char* evr1, const char* evr2) {
Pool* pool = NULL;
int r;
#include <pakfire/hex.h>
#include <pakfire/logging.h>
#include <pakfire/pakfire.h>
-#include <pakfire/private.h>
#include <pakfire/util.h>
static const struct _pakfire_digest_name {
{ NULL, PAKFIRE_DIGEST_UNDEFINED, },
};
-PAKFIRE_EXPORT const char* pakfire_digest_name(const enum pakfire_digest_types type) {
+const char* pakfire_digest_name(const enum pakfire_digest_types type) {
for (const struct _pakfire_digest_name* n = PAKFIRE_DIGEST_NAMES; n->name; n++) {
if (n->type == type)
return n->name;
return NULL;
}
-PAKFIRE_EXPORT int pakfire_digest_get_by_name(const char* name) {
+int pakfire_digest_get_by_name(const char* name) {
// Check that name is not NULL
if (!name) {
errno = EINVAL;
EVP_MD_CTX* blake2s256_ctx = NULL;
EVP_MD_CTX* sha2_512_ctx = NULL;
EVP_MD_CTX* sha2_256_ctx = NULL;
- char buffer[PAKFIRE_BUFFER_SIZE];
+ char buffer[65536];
int r = 1;
// Check if any digests have been computed before and select only those that we need
#include <pakfire/pakfire.h>
#include <pakfire/parser.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/repo.h>
#include <pakfire/string.h>
#include <pakfire/util.h>
return r;
}
-PAKFIRE_EXPORT int pakfire_dist(struct pakfire* pakfire, const char* path,
+int pakfire_dist(struct pakfire* pakfire, const char* path,
const char* target, char** result) {
struct pakfire_parser* makefile;
struct pakfire_parser_error* error = NULL;
#include <pakfire/logging.h>
#include <pakfire/pakfire.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/string.h>
#include <pakfire/util.h>
return r;
}
-PAKFIRE_EXPORT int pakfire_file_create(struct pakfire_file** file,
+int pakfire_file_create(struct pakfire_file** file,
struct pakfire* pakfire, const char* path) {
struct pakfire_file* f = NULL;
int r = 0;
free(file);
}
-PAKFIRE_EXPORT struct pakfire_file* pakfire_file_ref(struct pakfire_file* file) {
+struct pakfire_file* pakfire_file_ref(struct pakfire_file* file) {
file->nrefs++;
return file;
}
-PAKFIRE_EXPORT struct pakfire_file* pakfire_file_unref(struct pakfire_file* file) {
+struct pakfire_file* pakfire_file_unref(struct pakfire_file* file) {
if (--file->nrefs > 0)
return file;
return NULL;
}
-PAKFIRE_EXPORT int pakfire_file_cmp(struct pakfire_file* file1, struct pakfire_file* file2) {
+int pakfire_file_cmp(struct pakfire_file* file1, struct pakfire_file* file2) {
const char* path1 = pakfire_file_get_path(file1);
const char* path2 = pakfire_file_get_path(file2);
return archive_entry_sourcepath(file->entry);
}
-PAKFIRE_EXPORT const char* pakfire_file_get_path(struct pakfire_file* file) {
+const char* pakfire_file_get_path(struct pakfire_file* file) {
return archive_entry_pathname(file->entry);
}
-PAKFIRE_EXPORT int pakfire_file_set_path(struct pakfire_file* file, const char* path) {
+int pakfire_file_set_path(struct pakfire_file* file, const char* path) {
char buffer[PATH_MAX];
int r = 0;
return 0;
}
-PAKFIRE_EXPORT const char* pakfire_file_get_hardlink(struct pakfire_file* file) {
+const char* pakfire_file_get_hardlink(struct pakfire_file* file) {
return archive_entry_hardlink(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_hardlink(struct pakfire_file* file, const char* link) {
+void pakfire_file_set_hardlink(struct pakfire_file* file, const char* link) {
archive_entry_set_hardlink(file->entry, link);
}
-PAKFIRE_EXPORT const char* pakfire_file_get_symlink(struct pakfire_file* file) {
+const char* pakfire_file_get_symlink(struct pakfire_file* file) {
return archive_entry_symlink(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_symlink(struct pakfire_file* file, const char* link) {
+void pakfire_file_set_symlink(struct pakfire_file* file, const char* link) {
archive_entry_set_symlink(file->entry, link);
}
-PAKFIRE_EXPORT nlink_t pakfire_file_get_nlink(struct pakfire_file* file) {
+nlink_t pakfire_file_get_nlink(struct pakfire_file* file) {
return archive_entry_nlink(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_nlink(struct pakfire_file* file, const nlink_t nlink) {
+void pakfire_file_set_nlink(struct pakfire_file* file, const nlink_t nlink) {
archive_entry_set_nlink(file->entry, nlink);
}
-PAKFIRE_EXPORT ino_t pakfire_file_get_inode(struct pakfire_file* file) {
+ino_t pakfire_file_get_inode(struct pakfire_file* file) {
return archive_entry_ino64(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_inode(struct pakfire_file* file, const ino_t ino) {
+void pakfire_file_set_inode(struct pakfire_file* file, const ino_t ino) {
archive_entry_set_ino64(file->entry, ino);
}
-PAKFIRE_EXPORT dev_t pakfire_file_get_dev(struct pakfire_file* file) {
+dev_t pakfire_file_get_dev(struct pakfire_file* file) {
return archive_entry_dev(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_dev(struct pakfire_file* file, const dev_t dev) {
+void pakfire_file_set_dev(struct pakfire_file* file, const dev_t dev) {
archive_entry_set_dev(file->entry, dev);
}
-PAKFIRE_EXPORT int pakfire_file_get_type(struct pakfire_file* file) {
+int pakfire_file_get_type(struct pakfire_file* file) {
return archive_entry_filetype(file->entry);
}
-PAKFIRE_EXPORT off_t pakfire_file_get_size(struct pakfire_file* file) {
+off_t pakfire_file_get_size(struct pakfire_file* file) {
return archive_entry_size(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_size(struct pakfire_file* file, off_t size) {
+void pakfire_file_set_size(struct pakfire_file* file, off_t size) {
archive_entry_set_size(file->entry, size);
}
-PAKFIRE_EXPORT const char* pakfire_file_get_uname(struct pakfire_file* file) {
+const char* pakfire_file_get_uname(struct pakfire_file* file) {
return archive_entry_uname(file->entry);
}
-PAKFIRE_EXPORT int pakfire_file_set_uname(struct pakfire_file* file, const char* uname) {
+int pakfire_file_set_uname(struct pakfire_file* file, const char* uname) {
archive_entry_set_uname(file->entry, uname);
return 0;
}
-PAKFIRE_EXPORT const char* pakfire_file_get_gname(struct pakfire_file* file) {
+const char* pakfire_file_get_gname(struct pakfire_file* file) {
return archive_entry_gname(file->entry);
}
-PAKFIRE_EXPORT int pakfire_file_set_gname(struct pakfire_file* file, const char* gname) {
+int pakfire_file_set_gname(struct pakfire_file* file, const char* gname) {
archive_entry_set_gname(file->entry, gname);
return 0;
}
-PAKFIRE_EXPORT mode_t pakfire_file_get_mode(struct pakfire_file* file) {
+mode_t pakfire_file_get_mode(struct pakfire_file* file) {
return archive_entry_mode(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_mode(struct pakfire_file* file, mode_t mode) {
+void pakfire_file_set_mode(struct pakfire_file* file, mode_t mode) {
archive_entry_set_mode(file->entry, mode);
}
-PAKFIRE_EXPORT mode_t pakfire_file_get_perms(struct pakfire_file* file) {
+mode_t pakfire_file_get_perms(struct pakfire_file* file) {
return archive_entry_perm(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_perms(struct pakfire_file* file, const mode_t perms) {
+void pakfire_file_set_perms(struct pakfire_file* file, const mode_t perms) {
archive_entry_set_mode(file->entry, pakfire_file_get_type(file) | perms);
}
return pakfire_file_get_mode(file) & (S_IXUSR|S_IXGRP|S_IXOTH);
}
-PAKFIRE_EXPORT time_t pakfire_file_get_ctime(struct pakfire_file* file) {
+time_t pakfire_file_get_ctime(struct pakfire_file* file) {
return archive_entry_ctime(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_ctime(struct pakfire_file* file, time_t time) {
+void pakfire_file_set_ctime(struct pakfire_file* file, time_t time) {
archive_entry_set_ctime(file->entry, time, 0);
}
-PAKFIRE_EXPORT time_t pakfire_file_get_mtime(struct pakfire_file* file) {
+time_t pakfire_file_get_mtime(struct pakfire_file* file) {
return archive_entry_mtime(file->entry);
}
-PAKFIRE_EXPORT void pakfire_file_set_mtime(struct pakfire_file* file, time_t time) {
+void pakfire_file_set_mtime(struct pakfire_file* file, time_t time) {
archive_entry_set_mtime(file->entry, time, 0);
}
return pakfire_file_get_size(file) > 0;
}
-PAKFIRE_EXPORT const unsigned char* pakfire_file_get_digest(
+const unsigned char* pakfire_file_get_digest(
struct pakfire_file* file, const enum pakfire_digest_types type, size_t* length) {
switch (type) {
return NULL;
}
-PAKFIRE_EXPORT int pakfire_file_set_digest(struct pakfire_file* file,
+int pakfire_file_set_digest(struct pakfire_file* file,
const enum pakfire_digest_types type, const unsigned char* digest, const size_t length) {
if (!digest)
return -EINVAL;
return 0;
}
-PAKFIRE_EXPORT int pakfire_file_has_caps(struct pakfire_file* file) {
+int pakfire_file_has_caps(struct pakfire_file* file) {
if (file->caps)
return 1;
return 0;
}
-PAKFIRE_EXPORT char* pakfire_file_get_caps(struct pakfire_file* file) {
+char* pakfire_file_get_caps(struct pakfire_file* file) {
char* copy = NULL;
char* text = NULL;
ssize_t length = 0;
return pakfire_file_set_mimetype(file, mimetype);
}
-PAKFIRE_EXPORT const char* pakfire_file_get_mimetype(struct pakfire_file* file) {
+const char* pakfire_file_get_mimetype(struct pakfire_file* file) {
// Return nothing on an empty mimetype
if (!*file->mimetype)
return NULL;
return file->mimetype;
}
-PAKFIRE_EXPORT int pakfire_file_set_mimetype(
+int pakfire_file_set_mimetype(
struct pakfire_file* file, const char* mimetype) {
// Store the value
return pakfire_string_set(file->mimetype, mimetype);
return 0;
}
-PAKFIRE_EXPORT int pakfire_file_matches(struct pakfire_file* file, const char* pattern) {
+int pakfire_file_matches(struct pakfire_file* file, const char* pattern) {
// Don't match on no pattern
if (!pattern)
return 0;
#include <pakfire/logging.h>
#include <pakfire/pakfire.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/progress.h>
#include <pakfire/string.h>
#include <pakfire/util.h>
unsigned int num_files;
};
-PAKFIRE_EXPORT int pakfire_filelist_create(struct pakfire_filelist** list, struct pakfire* pakfire) {
+int pakfire_filelist_create(struct pakfire_filelist** list, struct pakfire* pakfire) {
struct pakfire_filelist* l = NULL;
// Allocate a new object
free(list);
}
-PAKFIRE_EXPORT struct pakfire_filelist* pakfire_filelist_ref(struct pakfire_filelist* list) {
+struct pakfire_filelist* pakfire_filelist_ref(struct pakfire_filelist* list) {
list->nrefs++;
return list;
}
-PAKFIRE_EXPORT struct pakfire_filelist* pakfire_filelist_unref(struct pakfire_filelist* list) {
+struct pakfire_filelist* pakfire_filelist_unref(struct pakfire_filelist* list) {
if (--list->nrefs > 0)
return list;
return NULL;
}
-PAKFIRE_EXPORT size_t pakfire_filelist_length(struct pakfire_filelist* list) {
+size_t pakfire_filelist_length(struct pakfire_filelist* list) {
return list->num_files;
}
return size;
}
-PAKFIRE_EXPORT int pakfire_filelist_is_empty(struct pakfire_filelist* list) {
+int pakfire_filelist_is_empty(struct pakfire_filelist* list) {
return list->num_files == 0;
}
-PAKFIRE_EXPORT void pakfire_filelist_clear(struct pakfire_filelist* list) {
+void pakfire_filelist_clear(struct pakfire_filelist* list) {
if (list->files) {
for (unsigned int i = 0; i < list->num_files; i++)
pakfire_file_unref(list->files[i]);
}
}
-PAKFIRE_EXPORT struct pakfire_file* pakfire_filelist_get(struct pakfire_filelist* list, size_t index) {
+struct pakfire_file* pakfire_filelist_get(struct pakfire_filelist* list, size_t index) {
// Check that index is in range
if (index >= list->num_files) {
errno = ERANGE;
return lo;
}
-PAKFIRE_EXPORT int pakfire_filelist_add(struct pakfire_filelist* list, struct pakfire_file* file) {
+int pakfire_filelist_add(struct pakfire_filelist* list, struct pakfire_file* file) {
// Do not do anything if the file is already on the list
if (pakfire_filelist_has_file(list, file) >= 0)
return 0;
#include <pakfire/key.h>
#include <pakfire/logging.h>
#include <pakfire/pakfire.h>
-#include <pakfire/private.h>
#include <pakfire/string.h>
#include <pakfire/util.h>
free(key);
}
-PAKFIRE_EXPORT struct pakfire_key* pakfire_key_ref(struct pakfire_key* key) {
+struct pakfire_key* pakfire_key_ref(struct pakfire_key* key) {
++key->nrefs;
return key;
}
-PAKFIRE_EXPORT struct pakfire_key* pakfire_key_unref(struct pakfire_key* key) {
+struct pakfire_key* pakfire_key_unref(struct pakfire_key* key) {
if (--key->nrefs > 0)
return key;
return NULL;
}
-PAKFIRE_EXPORT pakfire_key_id* pakfire_key_get_id(struct pakfire_key* key) {
+pakfire_key_id* pakfire_key_get_id(struct pakfire_key* key) {
return &key->id;
}
-PAKFIRE_EXPORT const char* pakfire_key_get_algo(struct pakfire_key* key) {
+const char* pakfire_key_get_algo(struct pakfire_key* key) {
switch (key->algo) {
case PAKFIRE_KEY_ALGO_ED25519:
return "Ed255919";
return NULL;
}
-PAKFIRE_EXPORT const char* pakfire_key_get_comment(struct pakfire_key* key) {
+const char* pakfire_key_get_comment(struct pakfire_key* key) {
return key->comment;
}
-PAKFIRE_EXPORT int pakfire_key_generate(struct pakfire_key** key, struct pakfire_ctx* ctx,
+int pakfire_key_generate(struct pakfire_key** key, struct pakfire_ctx* ctx,
const pakfire_key_algo_t algo, const char* comment) {
EVP_PKEY* pkey = NULL;
EVP_PKEY_CTX* pctx = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_key_import(struct pakfire_key** key,
+int pakfire_key_import(struct pakfire_key** key,
struct pakfire_ctx* ctx, FILE* f) {
void* buffer = NULL;
size_t buffer_length = 0;
return 0;
}
-PAKFIRE_EXPORT int pakfire_key_export(struct pakfire_key* key, FILE* f,
+int pakfire_key_export(struct pakfire_key* key, FILE* f,
const pakfire_key_export_mode_t mode) {
struct pakfire_key_public_key public_key = { 0 };
struct pakfire_key_private_key private_key = { 0 };
return r;
}
-PAKFIRE_EXPORT char* pakfire_key_dump(struct pakfire_key* key) {
+char* pakfire_key_dump(struct pakfire_key* key) {
char* buffer = NULL;
FILE* f = NULL;
int fd = -EBADF;
return r;
}
-PAKFIRE_EXPORT int pakfire_key_sign(struct pakfire_key* key,
+int pakfire_key_sign(struct pakfire_key* key,
FILE* f, const void* data, const size_t length, const char* comment) {
struct pakfire_key_signature signature = { 0 };
char* s = NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_key_verify(struct pakfire_key* key, FILE* f,
+int pakfire_key_verify(struct pakfire_key* key, FILE* f,
const void* data, const size_t length) {
struct pakfire_key_signature signature = { 0 };
int r;
#include <systemd/sd-journal.h>
#include <pakfire/logging.h>
-#include <pakfire/private.h>
-PAKFIRE_EXPORT void pakfire_log_stderr(void* data, int priority, const char* file,
+void pakfire_log_stderr(void* data, int priority, const char* file,
int line, const char* fn, const char* format, va_list args) {
fprintf(stderr, "pakfire: ");
vfprintf(stderr, format, args);
}
-PAKFIRE_EXPORT void pakfire_log_syslog(void* data, int priority, const char* file,
+void pakfire_log_syslog(void* data, int priority, const char* file,
int line, const char* fn, const char* format, va_list args) {
char* buffer = NULL;
int r;
#include <pakfire/package.h>
#include <pakfire/pakfire.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/repo.h>
#include <pakfire/string.h>
#include <pakfire/transaction.h>
return 0;
}
-PAKFIRE_EXPORT int pakfire_package_create(struct pakfire_package** package,
+int pakfire_package_create(struct pakfire_package** package,
struct pakfire* pakfire, struct pakfire_repo* repo,
const char* name, const char* evr, const char* arch) {
struct pakfire_repo* dummy = NULL;
free(pkg);
}
-PAKFIRE_EXPORT struct pakfire_package* pakfire_package_ref(struct pakfire_package* pkg) {
+struct pakfire_package* pakfire_package_ref(struct pakfire_package* pkg) {
pkg->nrefs++;
return pkg;
}
-PAKFIRE_EXPORT struct pakfire_package* pakfire_package_unref(struct pakfire_package* pkg) {
+struct pakfire_package* pakfire_package_unref(struct pakfire_package* pkg) {
if (--pkg->nrefs > 0)
return pkg;
return NULL;
}
-PAKFIRE_EXPORT struct pakfire* pakfire_package_get_pakfire(struct pakfire_package* pkg) {
+struct pakfire* pakfire_package_get_pakfire(struct pakfire_package* pkg) {
return pakfire_ref(pkg->pakfire);
}
-PAKFIRE_EXPORT int pakfire_package_eq(struct pakfire_package* pkg1, struct pakfire_package* pkg2) {
+int pakfire_package_eq(struct pakfire_package* pkg1, struct pakfire_package* pkg2) {
return pkg1->id == pkg2->id;
}
-PAKFIRE_EXPORT int pakfire_package_cmp(struct pakfire_package* pkg1, struct pakfire_package* pkg2) {
+int pakfire_package_cmp(struct pakfire_package* pkg1, struct pakfire_package* pkg2) {
Pool* pool = pakfire_get_solv_pool(pkg1->pakfire);
Solvable* s1 = get_solvable(pkg1);
return strcmp(str1, str2);
}
-PAKFIRE_EXPORT int pakfire_package_evr_cmp(struct pakfire_package* pkg1, struct pakfire_package* pkg2) {
+int pakfire_package_evr_cmp(struct pakfire_package* pkg1, struct pakfire_package* pkg2) {
Pool* pool = pakfire_get_solv_pool(pkg1->pakfire);
Solvable* s1 = get_solvable(pkg1);
return pool_evrcmp(pool, s1->evr, s2->evr, EVRCMP_COMPARE);
}
-PAKFIRE_EXPORT unsigned int pakfire_package_id(struct pakfire_package* pkg) {
+unsigned int pakfire_package_id(struct pakfire_package* pkg) {
return pkg->id;
}
return pakfire_cache_path(pkg->pakfire, pkg->cache_path, "%s/%s", uuid, filename);
}
-PAKFIRE_EXPORT void pakfire_package_unset(struct pakfire_package* pkg,
+void pakfire_package_unset(struct pakfire_package* pkg,
const enum pakfire_package_key key) {
Id id = ID_NULL;
solvable_unset(s, id);
}
-PAKFIRE_EXPORT char** pakfire_package_get_strings(
+char** pakfire_package_get_strings(
struct pakfire_package* pkg, const enum pakfire_package_key key) {
char** ret = NULL;
const char* str = NULL;
return ret;
}
-PAKFIRE_EXPORT int pakfire_package_set_strings(struct pakfire_package* pkg,
+int pakfire_package_set_strings(struct pakfire_package* pkg,
const enum pakfire_package_key key, const char** values) {
int r;
return r;
}
-PAKFIRE_EXPORT const char* pakfire_package_get_string(
+const char* pakfire_package_get_string(
struct pakfire_package* pkg, const enum pakfire_package_key key) {
const char* ret = NULL;
int r;
return ret;
}
-PAKFIRE_EXPORT int pakfire_package_set_string(
+int pakfire_package_set_string(
struct pakfire_package* pkg, const enum pakfire_package_key key, const char* value) {
char basename[PATH_MAX];
char dirname[PATH_MAX];
return 0;
}
-PAKFIRE_EXPORT int pakfire_package_add_string(struct pakfire_package* pkg,
+int pakfire_package_add_string(struct pakfire_package* pkg,
const enum pakfire_package_key key, const char* value) {
Id key_id = ID_NULL;
Id value_id = ID_NULL;
return 0;
}
-PAKFIRE_EXPORT int pakfire_package_get_uuid(struct pakfire_package* pkg,
+int pakfire_package_get_uuid(struct pakfire_package* pkg,
const enum pakfire_package_key key, uuid_t uuid) {
const char* buffer = NULL;
int r;
}
}
-PAKFIRE_EXPORT int pakfire_package_set_uuid(struct pakfire_package* pkg,
+int pakfire_package_set_uuid(struct pakfire_package* pkg,
const enum pakfire_package_key key, const uuid_t uuid) {
char buffer[UUID_STR_LEN];
}
}
-PAKFIRE_EXPORT unsigned long long pakfire_package_get_num(struct pakfire_package* pkg,
+unsigned long long pakfire_package_get_num(struct pakfire_package* pkg,
const enum pakfire_package_key key, unsigned long long notfound) {
Id id = ID_NULL;
return solvable_lookup_num(s, id, notfound);
}
-PAKFIRE_EXPORT int pakfire_package_set_num(struct pakfire_package* pkg,
+int pakfire_package_set_num(struct pakfire_package* pkg,
const enum pakfire_package_key key, unsigned long long num) {
Id id = ID_NULL;
return 0;
}
-PAKFIRE_EXPORT const unsigned char* pakfire_package_get_digest(
+const unsigned char* pakfire_package_get_digest(
struct pakfire_package* pkg, enum pakfire_digest_types* type, size_t* length) {
Solvable* s = get_solvable(pkg);
Id id = 0;
return checksum;
}
-PAKFIRE_EXPORT int pakfire_package_set_digest(struct pakfire_package* pkg,
+int pakfire_package_set_digest(struct pakfire_package* pkg,
enum pakfire_digest_types type, const unsigned char* digest, const size_t length) {
Solvable* s = get_solvable(pkg);
Pool* pool = s->repo->pool;
return pool->installed == s->repo;
}
-PAKFIRE_EXPORT size_t pakfire_package_get_size(struct pakfire_package* pkg) {
+size_t pakfire_package_get_size(struct pakfire_package* pkg) {
if (pakfire_package_is_installed(pkg))
return pakfire_package_get_num(pkg, PAKFIRE_PKG_INSTALLSIZE, 0);
// Dependencies
-PAKFIRE_EXPORT char** pakfire_package_get_deps(struct pakfire_package* pkg,
+char** pakfire_package_get_deps(struct pakfire_package* pkg,
const enum pakfire_package_key key) {
Solvable* s = get_solvable(pkg);
char** ret = NULL;
return pakfire_package_add_depid(pkg, key, id);
}
-PAKFIRE_EXPORT int pakfire_package_get_reverse_requires(struct pakfire_package* pkg,
+int pakfire_package_get_reverse_requires(struct pakfire_package* pkg,
struct pakfire_packagelist* list) {
Queue matches;
queue_init(&matches);
return solvable_matchesdep(s, id, depid, marker);
}
-PAKFIRE_EXPORT struct pakfire_repo* pakfire_package_get_repo(struct pakfire_package* pkg) {
+struct pakfire_repo* pakfire_package_get_repo(struct pakfire_package* pkg) {
if (!pkg->repo) {
Solvable* s = get_solvable(pkg);
return strcmp(dep1, dep2);
}
-PAKFIRE_EXPORT char* pakfire_package_dump(struct pakfire_package* pkg, int flags) {
+char* pakfire_package_dump(struct pakfire_package* pkg, int flags) {
char* string = NULL;
// Name
return string;
}
-PAKFIRE_EXPORT struct pakfire_archive* pakfire_package_get_archive(struct pakfire_package* pkg) {
+struct pakfire_archive* pakfire_package_get_archive(struct pakfire_package* pkg) {
struct pakfire_archive* archive = NULL;
struct pakfire_repo* repo = NULL;
const char* path = NULL;
return search.r;
}
-PAKFIRE_EXPORT struct pakfire_filelist* pakfire_package_get_filelist(struct pakfire_package* pkg) {
+struct pakfire_filelist* pakfire_package_get_filelist(struct pakfire_package* pkg) {
struct pakfire_filelist* filelist = NULL;
// Create a new filelist
return pakfire_package_append_file(pkg, path);
}
-PAKFIRE_EXPORT int pakfire_package_set_filelist(
+int pakfire_package_set_filelist(
struct pakfire_package* pkg, struct pakfire_filelist* filelist) {
return pakfire_filelist_walk(filelist, __pakfire_package_set_filelist, pkg, 0, NULL);
}
return md;
}
-PAKFIRE_EXPORT int pakfire_package_installcheck(struct pakfire_package* pkg,
+int pakfire_package_installcheck(struct pakfire_package* pkg,
char** problem, int flags) {
struct pakfire_transaction* transaction = NULL;
char* p = NULL;
#include <pakfire/package.h>
#include <pakfire/packagelist.h>
#include <pakfire/pakfire.h>
-#include <pakfire/private.h>
struct pakfire_packagelist_element {
TAILQ_ENTRY(pakfire_packagelist_element) nodes;
free(list);
}
-PAKFIRE_EXPORT int pakfire_packagelist_create(
+int pakfire_packagelist_create(
struct pakfire_packagelist** list, struct pakfire_ctx* ctx) {
struct pakfire_packagelist* l = calloc(1, sizeof(*l));
if (!l)
return 0;
}
-PAKFIRE_EXPORT struct pakfire_packagelist* pakfire_packagelist_ref(struct pakfire_packagelist* list) {
+struct pakfire_packagelist* pakfire_packagelist_ref(struct pakfire_packagelist* list) {
list->nrefs++;
return list;
}
-PAKFIRE_EXPORT struct pakfire_packagelist* pakfire_packagelist_unref(struct pakfire_packagelist* list) {
+struct pakfire_packagelist* pakfire_packagelist_unref(struct pakfire_packagelist* list) {
if (--list->nrefs > 0)
return list;
return NULL;
}
-PAKFIRE_EXPORT size_t pakfire_packagelist_length(struct pakfire_packagelist* list) {
+size_t pakfire_packagelist_length(struct pakfire_packagelist* list) {
struct pakfire_packagelist_element* element = NULL;
size_t size = 0;
return size;
}
-PAKFIRE_EXPORT struct pakfire_package* pakfire_packagelist_get(struct pakfire_packagelist* list, unsigned int index) {
+struct pakfire_package* pakfire_packagelist_get(struct pakfire_packagelist* list, unsigned int index) {
struct pakfire_packagelist_element* element = NULL;
// Fetch the first element
return pakfire_package_ref(element->pkg);
}
-PAKFIRE_EXPORT int pakfire_packagelist_push(struct pakfire_packagelist* list, struct pakfire_package* pkg) {
+int pakfire_packagelist_push(struct pakfire_packagelist* list, struct pakfire_package* pkg) {
struct pakfire_packagelist_element* element = NULL;
struct pakfire_packagelist_element* e = NULL;
return 0;
}
-PAKFIRE_EXPORT int pakfire_packagelist_walk(struct pakfire_packagelist* list,
+int pakfire_packagelist_walk(struct pakfire_packagelist* list,
pakfire_packagelist_walk_callback callback, void* data, int flags) {
struct pakfire_packagelist_element* element = NULL;
int kept_going = 0;
#include <pakfire/pakfire.h>
#include <pakfire/parser.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/pwd.h>
#include <pakfire/repo.h>
#include <pakfire/snapshot.h>
return r;
}
-PAKFIRE_EXPORT int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx,
+int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx,
const char* path, const char* arch, FILE* conf, int flags) {
struct pakfire* p = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT struct pakfire* pakfire_ref(struct pakfire* pakfire) {
+struct pakfire* pakfire_ref(struct pakfire* pakfire) {
++pakfire->nrefs;
return pakfire;
}
-PAKFIRE_EXPORT struct pakfire* pakfire_unref(struct pakfire* pakfire) {
+struct pakfire* pakfire_unref(struct pakfire* pakfire) {
if (--pakfire->nrefs > 0)
return pakfire;
return pakfire_ctx_ref(pakfire->ctx);
}
-PAKFIRE_EXPORT int pakfire_has_flag(struct pakfire* pakfire, const int flag) {
+int pakfire_has_flag(struct pakfire* pakfire, const int flag) {
return pakfire->flags & flag;
}
return pakfire_config_ref(pakfire->config);
}
-PAKFIRE_EXPORT const char* pakfire_get_path(struct pakfire* pakfire) {
+const char* pakfire_get_path(struct pakfire* pakfire) {
return pakfire->path;
}
return pakfire_repo_clean(repo, flags);
}
-PAKFIRE_EXPORT int pakfire_clean(struct pakfire* pakfire, int flags) {
+int pakfire_clean(struct pakfire* pakfire, int flags) {
int r;
// Clean all repositories
return pakfire_repo_refresh(repo, flags);
}
-PAKFIRE_EXPORT int pakfire_refresh(struct pakfire* pakfire, int flags) {
+int pakfire_refresh(struct pakfire* pakfire, int flags) {
return pakfire_repo_walk(pakfire, __pakfire_repo_refresh, &flags);
}
-PAKFIRE_EXPORT const char* pakfire_get_arch(struct pakfire* pakfire) {
+const char* pakfire_get_arch(struct pakfire* pakfire) {
return pakfire->arches.nominal;
}
return pakfire->arches.effective;
}
-PAKFIRE_EXPORT int pakfire_version_compare(struct pakfire* pakfire, const char* evr1, const char* evr2) {
+int pakfire_version_compare(struct pakfire* pakfire, const char* evr1, const char* evr2) {
return pool_evrcmp_str(pakfire->pool, evr1, evr2, EVRCMP_COMPARE);
}
pakfire->internal_flags |= PAKFIRE_POOL_READY;
}
-PAKFIRE_EXPORT struct pakfire_repolist* pakfire_get_repos(struct pakfire* pakfire) {
+struct pakfire_repolist* pakfire_get_repos(struct pakfire* pakfire) {
struct pakfire_repo* repo = NULL;
struct pakfire_repolist* list;
return NULL;
}
-PAKFIRE_EXPORT struct pakfire_repo* pakfire_get_repo(struct pakfire* pakfire, const char* name) {
+struct pakfire_repo* pakfire_get_repo(struct pakfire* pakfire, const char* name) {
Pool* pool = pakfire_get_solv_pool(pakfire);
if (!pool)
return NULL;
return r;
}
-PAKFIRE_EXPORT int pakfire_whatprovides(struct pakfire* pakfire, const char* what, int flags,
+int pakfire_whatprovides(struct pakfire* pakfire, const char* what, int flags,
struct pakfire_packagelist* list) {
int r;
return pakfire_package_get_reverse_requires(pkg, list);
}
-PAKFIRE_EXPORT int pakfire_whatrequires(struct pakfire* pakfire, const char* what, int flags,
+int pakfire_whatrequires(struct pakfire* pakfire, const char* what, int flags,
struct pakfire_packagelist* list) {
struct pakfire_packagelist* packages = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_search(struct pakfire* pakfire, const char* what, int flags,
+int pakfire_search(struct pakfire* pakfire, const char* what, int flags,
struct pakfire_packagelist* list) {
const Id keys[] = {
SOLVABLE_NAME,
return r;
}
-PAKFIRE_EXPORT int pakfire_check(struct pakfire* pakfire, struct pakfire_filelist* errors) {
+int pakfire_check(struct pakfire* pakfire, struct pakfire_filelist* errors) {
struct pakfire_db* db = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_update_snapshot(struct pakfire* pakfire) {
+int pakfire_update_snapshot(struct pakfire* pakfire) {
struct pakfire_snapshot* snapshot = NULL;
int r;
#include <pakfire/i18n.h>
#include <pakfire/logging.h>
#include <pakfire/pakfire.h>
-#include <pakfire/private.h>
#include <pakfire/problem.h>
#include <pakfire/solution.h>
#include <pakfire/transaction.h>
free(problem);
}
-PAKFIRE_EXPORT struct pakfire_problem* pakfire_problem_ref(struct pakfire_problem* problem) {
+struct pakfire_problem* pakfire_problem_ref(struct pakfire_problem* problem) {
problem->nrefs++;
return problem;
}
-PAKFIRE_EXPORT struct pakfire_problem* pakfire_problem_unref(struct pakfire_problem* problem) {
+struct pakfire_problem* pakfire_problem_unref(struct pakfire_problem* problem) {
if (--problem->nrefs > 0)
return problem;
return NULL;
}
-PAKFIRE_EXPORT const char* pakfire_problem_to_string(struct pakfire_problem* problem) {
+const char* pakfire_problem_to_string(struct pakfire_problem* problem) {
if (!problem->string)
problem->string = pakfire_problem_make_string(problem);
return pakfire_transaction_ref(problem->transaction);
}
-PAKFIRE_EXPORT struct pakfire_solution** pakfire_problem_get_solutions(
+struct pakfire_solution** pakfire_problem_get_solutions(
struct pakfire_problem* problem) {
struct pakfire_solution** solutions = NULL;
struct pakfire_solution* solution = NULL;
#include <pakfire/ctx.h>
#include <pakfire/logging.h>
-#include <pakfire/private.h>
#include <pakfire/progress.h>
struct pakfire_progress {
return NULL;
}
-PAKFIRE_EXPORT int pakfire_progress_has_flag(struct pakfire_progress* p, int flag) {
+int pakfire_progress_has_flag(struct pakfire_progress* p, int flag) {
return p->flags & flag;
}
Callback Configuration
*/
-PAKFIRE_EXPORT void pakfire_progress_set_callback_data(struct pakfire_progress* p, void* data) {
+void pakfire_progress_set_callback_data(struct pakfire_progress* p, void* data) {
p->callbacks.data = data;
}
-PAKFIRE_EXPORT void pakfire_progress_set_start_callback(
+void pakfire_progress_set_start_callback(
struct pakfire_progress* p, pakfire_progress_start_callback callback) {
p->callbacks.start = callback;
}
-PAKFIRE_EXPORT void pakfire_progress_set_finish_callback(
+void pakfire_progress_set_finish_callback(
struct pakfire_progress* p, pakfire_progress_finish_callback callback) {
p->callbacks.finish = callback;
}
-PAKFIRE_EXPORT void pakfire_progress_set_update_callback(
+void pakfire_progress_set_update_callback(
struct pakfire_progress* p, pakfire_progress_update_callback callback) {
p->callbacks.update = callback;
}
-PAKFIRE_EXPORT void pakfire_progress_set_free_callback(
+void pakfire_progress_set_free_callback(
struct pakfire_progress* p, pakfire_progress_free_callback callback) {
p->callbacks.free = callback;
}
return 0;
}
-PAKFIRE_EXPORT struct pakfire_progress* pakfire_progress_get_parent(struct pakfire_progress* p) {
+struct pakfire_progress* pakfire_progress_get_parent(struct pakfire_progress* p) {
if (p->parent)
return pakfire_progress_ref(p->parent);
return NULL;
}
-PAKFIRE_EXPORT unsigned long int pakfire_progress_get_value(struct pakfire_progress* p) {
+unsigned long int pakfire_progress_get_value(struct pakfire_progress* p) {
return p->value;
}
-PAKFIRE_EXPORT unsigned long int pakfire_progress_get_max_value(struct pakfire_progress* p) {
+unsigned long int pakfire_progress_get_max_value(struct pakfire_progress* p) {
return p->max_value;
}
p->max_value = value;
}
-PAKFIRE_EXPORT const char* pakfire_progress_get_title(struct pakfire_progress* p) {
+const char* pakfire_progress_get_title(struct pakfire_progress* p) {
return p->title;
}
return 0;
}
-PAKFIRE_EXPORT double pakfire_progress_get_percentage(struct pakfire_progress* p) {
+double pakfire_progress_get_percentage(struct pakfire_progress* p) {
if (!p->max_value)
return 0;
return p->value * 100.0 / p->max_value;
}
-PAKFIRE_EXPORT time_t pakfire_progress_get_elapsed_time(struct pakfire_progress* p) {
+time_t pakfire_progress_get_elapsed_time(struct pakfire_progress* p) {
struct timespec now;
int r;
return -1;
}
-PAKFIRE_EXPORT time_t pakfire_progress_get_eta(struct pakfire_progress* p) {
+time_t pakfire_progress_get_eta(struct pakfire_progress* p) {
if (!p->value || !p->max_value)
return 0;
return t * p->max_value / p->value - t;
}
-PAKFIRE_EXPORT double pakfire_progress_get_transfer_speed(struct pakfire_progress* p) {
+double pakfire_progress_get_transfer_speed(struct pakfire_progress* p) {
const time_t t = pakfire_progress_get_elapsed_time(p);
if (t <= 0)
return t;
#include <pakfire/package.h>
#include <pakfire/pakfire.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/progress.h>
#include <pakfire/repo.h>
#include <pakfire/string.h>
return appdata;
}
-PAKFIRE_EXPORT int pakfire_repo_create(struct pakfire_repo** repo,
+int pakfire_repo_create(struct pakfire_repo** repo,
struct pakfire* pakfire, const char* name) {
int r = 1;
return repo;
}
-PAKFIRE_EXPORT struct pakfire_repo* pakfire_repo_ref(struct pakfire_repo* repo) {
+struct pakfire_repo* pakfire_repo_ref(struct pakfire_repo* repo) {
repo->nrefs++;
return repo;
}
-PAKFIRE_EXPORT struct pakfire_repo* pakfire_repo_unref(struct pakfire_repo* repo) {
+struct pakfire_repo* pakfire_repo_unref(struct pakfire_repo* repo) {
if (--repo->nrefs > 0)
return repo;
return NULL;
}
-PAKFIRE_EXPORT struct pakfire* pakfire_repo_get_pakfire(struct pakfire_repo* repo) {
+struct pakfire* pakfire_repo_get_pakfire(struct pakfire_repo* repo) {
return pakfire_ref(repo->pakfire);
}
return repo_last_repodata(repo->repo);
}
-PAKFIRE_EXPORT int pakfire_repo_identical(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {
+int pakfire_repo_identical(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {
Repo* r1 = repo1->repo;
Repo* r2 = repo2->repo;
return strcmp(r1->name, r2->name);
}
-PAKFIRE_EXPORT int pakfire_repo_cmp(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {
+int pakfire_repo_cmp(struct pakfire_repo* repo1, struct pakfire_repo* repo2) {
Repo* r1 = repo1->repo;
Repo* r2 = repo2->repo;
return strcmp(r1->name, r2->name);
}
-PAKFIRE_EXPORT int pakfire_repo_count(struct pakfire_repo* repo) {
+int pakfire_repo_count(struct pakfire_repo* repo) {
Pool* pool = pakfire_get_solv_pool(repo->pakfire);
int cnt = 0;
return 0;
}
-PAKFIRE_EXPORT const char* pakfire_repo_get_name(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_name(struct pakfire_repo* repo) {
return repo->repo->name;
}
-PAKFIRE_EXPORT const char* pakfire_repo_get_description(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_description(struct pakfire_repo* repo) {
return repo->appdata->description;
}
-PAKFIRE_EXPORT int pakfire_repo_set_description(struct pakfire_repo* repo, const char* description) {
+int pakfire_repo_set_description(struct pakfire_repo* repo, const char* description) {
return pakfire_string_set(repo->appdata->description, description);
}
-PAKFIRE_EXPORT int pakfire_repo_get_enabled(struct pakfire_repo* repo) {
+int pakfire_repo_get_enabled(struct pakfire_repo* repo) {
return !repo->repo->disabled;
}
-PAKFIRE_EXPORT void pakfire_repo_set_enabled(struct pakfire_repo* repo, int enabled) {
+void pakfire_repo_set_enabled(struct pakfire_repo* repo, int enabled) {
repo->repo->disabled = !enabled;
pakfire_repo_has_changed(repo);
}
-PAKFIRE_EXPORT int pakfire_repo_get_priority(struct pakfire_repo* repo) {
+int pakfire_repo_get_priority(struct pakfire_repo* repo) {
return repo->repo->priority;
}
-PAKFIRE_EXPORT void pakfire_repo_set_priority(struct pakfire_repo* repo, int priority) {
+void pakfire_repo_set_priority(struct pakfire_repo* repo, int priority) {
repo->repo->priority = priority;
}
-PAKFIRE_EXPORT const char* pakfire_repo_get_baseurl(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_baseurl(struct pakfire_repo* repo) {
return repo->appdata->baseurl;
}
return (*repo->appdata->expanded_baseurl) ? repo->appdata->expanded_baseurl : NULL;
}
-PAKFIRE_EXPORT int pakfire_repo_set_baseurl(struct pakfire_repo* repo, const char* baseurl) {
+int pakfire_repo_set_baseurl(struct pakfire_repo* repo, const char* baseurl) {
int r;
// Store the URL
return baseurl + strlen("file://");
}
-PAKFIRE_EXPORT struct pakfire_key* pakfire_repo_get_key(struct pakfire_repo* repo) {
+struct pakfire_key* pakfire_repo_get_key(struct pakfire_repo* repo) {
int r;
// It looks like no key has been imported
return pakfire_key_ref(repo->key);
}
-PAKFIRE_EXPORT const char* pakfire_repo_get_mirrorlist_url(struct pakfire_repo* repo) {
+const char* pakfire_repo_get_mirrorlist_url(struct pakfire_repo* repo) {
return repo->appdata->mirrorlist_url;
}
-PAKFIRE_EXPORT int pakfire_repo_set_mirrorlist_url(struct pakfire_repo* repo, const char* url) {
+int pakfire_repo_set_mirrorlist_url(struct pakfire_repo* repo, const char* url) {
return pakfire_string_set(repo->appdata->mirrorlist_url, url);
}
-PAKFIRE_EXPORT int pakfire_repo_write_config(struct pakfire_repo* repo, FILE* f) {
+int pakfire_repo_write_config(struct pakfire_repo* repo, FILE* f) {
int r;
// Do nothing for the installed repository
return r;
}
-PAKFIRE_EXPORT int pakfire_repo_is_installed_repo(struct pakfire_repo* repo) {
+int pakfire_repo_is_installed_repo(struct pakfire_repo* repo) {
struct pakfire_repo* installed_repo = pakfire_get_installed_repo(repo->pakfire);
if (!installed_repo)
return 0;
return r;
}
-PAKFIRE_EXPORT int pakfire_repo_read_solv(struct pakfire_repo* repo, FILE *f, int flags) {
+int pakfire_repo_read_solv(struct pakfire_repo* repo, FILE *f, int flags) {
// Automatically detect compression
f = pakfire_xfopen(f, "r");
if (!f) {
return 0;
}
-PAKFIRE_EXPORT int pakfire_repo_write_solv(struct pakfire_repo* repo, FILE *f, int flags) {
+int pakfire_repo_write_solv(struct pakfire_repo* repo, FILE *f, int flags) {
Repodata* meta = NULL;
Queue addedfileprovides;
int r;
return 0;
}
-PAKFIRE_EXPORT int pakfire_repo_clean(struct pakfire_repo* repo, int flags) {
+int pakfire_repo_clean(struct pakfire_repo* repo, int flags) {
char cache_path[PATH_MAX];
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_repo_scan(struct pakfire_repo* repo, int flags) {
+int pakfire_repo_scan(struct pakfire_repo* repo, int flags) {
int r;
// Scan context
return r;
}
-PAKFIRE_EXPORT int pakfire_repo_refresh(struct pakfire_repo* repo, int force) {
+int pakfire_repo_refresh(struct pakfire_repo* repo, int force) {
const char* name = pakfire_repo_get_name(repo);
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_repo_compose(struct pakfire* pakfire, const char* path,
+int pakfire_repo_compose(struct pakfire* pakfire, const char* path,
struct pakfire_key* key, const char** files) {
struct pakfire_repo* repo = NULL;
char realpath[PATH_MAX];
#include <errno.h>
#include <stdlib.h>
-#include <pakfire/private.h>
#include <pakfire/repo.h>
#include <pakfire/repolist.h>
return 0;
}
-PAKFIRE_EXPORT int pakfire_repolist_create(struct pakfire_repolist** list) {
+int pakfire_repolist_create(struct pakfire_repolist** list) {
struct pakfire_repolist* l = calloc(1, sizeof(*l));
if (!l)
return ENOMEM;
return 0;
}
-PAKFIRE_EXPORT struct pakfire_repolist* pakfire_repolist_ref(
+struct pakfire_repolist* pakfire_repolist_ref(
struct pakfire_repolist* list) {
list->nrefs++;
free(list);
}
-PAKFIRE_EXPORT struct pakfire_repolist* pakfire_repolist_unref(
+struct pakfire_repolist* pakfire_repolist_unref(
struct pakfire_repolist* list) {
if (--list->nrefs > 0)
return list;
return NULL;
}
-PAKFIRE_EXPORT void pakfire_repolist_clear(struct pakfire_repolist* list) {
+void pakfire_repolist_clear(struct pakfire_repolist* list) {
if (!list->elements)
return;
list->size = 0;
}
-PAKFIRE_EXPORT size_t pakfire_repolist_size(struct pakfire_repolist* list) {
+size_t pakfire_repolist_size(struct pakfire_repolist* list) {
return list->size;
}
-PAKFIRE_EXPORT int pakfire_repolist_empty(struct pakfire_repolist* list) {
+int pakfire_repolist_empty(struct pakfire_repolist* list) {
return list->size == 0;
}
-PAKFIRE_EXPORT struct pakfire_repo* pakfire_repolist_get(struct pakfire_repolist* list, size_t index) {
+struct pakfire_repo* pakfire_repolist_get(struct pakfire_repolist* list, size_t index) {
if (index >= list->size)
return NULL;
return pakfire_repo_ref(list->elements[index]);
}
-PAKFIRE_EXPORT int pakfire_repolist_append(struct pakfire_repolist* list, struct pakfire_repo* repo) {
+int pakfire_repolist_append(struct pakfire_repolist* list, struct pakfire_repo* repo) {
if (!repo)
return EINVAL;
#include <pakfire/i18n.h>
#include <pakfire/logging.h>
#include <pakfire/pakfire.h>
-#include <pakfire/private.h>
#include <pakfire/problem.h>
#include <pakfire/solution.h>
#include <pakfire/string.h>
return 0;
}
-PAKFIRE_EXPORT struct pakfire_solution* pakfire_solution_ref(struct pakfire_solution* solution) {
+struct pakfire_solution* pakfire_solution_ref(struct pakfire_solution* solution) {
solution->nrefs++;
return solution;
free(solution);
}
-PAKFIRE_EXPORT struct pakfire_solution* pakfire_solution_unref(struct pakfire_solution* solution) {
+struct pakfire_solution* pakfire_solution_unref(struct pakfire_solution* solution) {
if (!solution)
return NULL;
return s;
}
-PAKFIRE_EXPORT const char* pakfire_solution_to_string(struct pakfire_solution* solution) {
+const char* pakfire_solution_to_string(struct pakfire_solution* solution) {
if (!solution->string)
solution->string = pakfire_solution_make_string(solution);
#include <pakfire/package.h>
#include <pakfire/pakfire.h>
#include <pakfire/path.h>
-#include <pakfire/private.h>
#include <pakfire/repo.h>
#include <pakfire/string.h>
#include <pakfire/transaction.h>
return 0;
}
-PAKFIRE_EXPORT int pakfire_transaction_create(struct pakfire_transaction** transaction,
+int pakfire_transaction_create(struct pakfire_transaction** transaction,
struct pakfire* pakfire, int flags) {
int r;
free(transaction);
}
-PAKFIRE_EXPORT struct pakfire_transaction* pakfire_transaction_ref(
+struct pakfire_transaction* pakfire_transaction_ref(
struct pakfire_transaction* transaction) {
transaction->nrefs++;
return transaction;
}
-PAKFIRE_EXPORT struct pakfire_transaction* pakfire_transaction_unref(
+struct pakfire_transaction* pakfire_transaction_unref(
struct pakfire_transaction* transaction) {
if (--transaction->nrefs > 0)
return transaction;
free(buffer);
}
-PAKFIRE_EXPORT struct pakfire_problem** pakfire_transaction_get_problems(
+struct pakfire_problem** pakfire_transaction_get_problems(
struct pakfire_transaction* transaction) {
struct pakfire_problem** problems = NULL;
struct pakfire_problem* problem = NULL;
return transaction->solver;
}
-PAKFIRE_EXPORT int pakfire_transaction_solve(struct pakfire_transaction* transaction,
+int pakfire_transaction_solve(struct pakfire_transaction* transaction,
int flags, char** problems) {
clock_t solving_start;
clock_t solving_end;
return r;
}
-PAKFIRE_EXPORT int pakfire_transaction_request(struct pakfire_transaction* transaction,
+int pakfire_transaction_request(struct pakfire_transaction* transaction,
const enum pakfire_job_action action, const char* what, int flags) {
struct pakfire_package* package = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_transaction_request_package(struct pakfire_transaction* transaction,
+int pakfire_transaction_request_package(struct pakfire_transaction* transaction,
const enum pakfire_job_action action, struct pakfire_package* package, int flags) {
// Get the solvable ID
Id id = pakfire_package_id(package);
return __pakfire_transaction_add(transaction, action, SOLVER_SOLVABLE, id, flags);
}
-PAKFIRE_EXPORT int pakfire_transaction_take_solution(struct pakfire_transaction* transaction,
+int pakfire_transaction_take_solution(struct pakfire_transaction* transaction,
struct pakfire_solution* solution) {
struct pakfire_problem* problem = pakfire_solution_get_problem(solution);
return 0;
}
-PAKFIRE_EXPORT size_t pakfire_transaction_count(struct pakfire_transaction* transaction) {
+size_t pakfire_transaction_count(struct pakfire_transaction* transaction) {
return transaction->num;
}
return pakfire_transaction_append_line(s, "%s%-21s: %s\n", *s, headline, buffer);
}
-PAKFIRE_EXPORT char* pakfire_transaction_dump(struct pakfire_transaction* transaction, size_t width) {
+char* pakfire_transaction_dump(struct pakfire_transaction* transaction, size_t width) {
char headline[1024];
char* s = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_transaction_download(struct pakfire_transaction* transaction) {
+int pakfire_transaction_download(struct pakfire_transaction* transaction) {
struct pakfire_httpclient* httpclient = NULL;
int r;
return r;
}
-PAKFIRE_EXPORT int pakfire_transaction_run(struct pakfire_transaction* transaction) {
+int pakfire_transaction_run(struct pakfire_transaction* transaction) {
char* dump = NULL;
int r;