Skip to content

Commit

Permalink
Expose utis/fs/file.hpp and temp.hpp on API
Browse files Browse the repository at this point in the history
This will be used from plugins and dnf5.
  • Loading branch information
kontura committed Nov 28, 2023
1 parent e5dcfe8 commit 1764e21
Show file tree
Hide file tree
Showing 31 changed files with 40 additions and 35 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion libdnf5/conf/config_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "config.h"
#include "config_utils.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/common/xdg.hpp"
#include "libdnf5/conf/config_parser.hpp"
#include "libdnf5/conf/const.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"

#include <glob.h>

Expand Down
2 changes: 1 addition & 1 deletion libdnf5/conf/config_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "libdnf5/conf/config_parser.hpp"

#include "utils/fs/file.hpp"
#include "utils/iniparser.hpp"

#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"

#include <utility>

Expand Down
2 changes: 1 addition & 1 deletion libdnf5/conf/vars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "libdnf5/conf/vars.hpp"

#include "rpm/rpm_log_guard.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/base/base.hpp"
#include "libdnf5/common/exception.hpp"
#include "libdnf5/rpm/arch.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"

#include <dirent.h>
#include <rpm/rpmdb.h>
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/module/module_sack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "module/module_metadata.hpp"
#include "module/module_sack_impl.hpp"
#include "solv/solv_map.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/base/base.hpp"
#include "libdnf5/base/base_weak.hpp"
Expand All @@ -34,6 +33,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "libdnf5/module/module_sack_weak.hpp"
#include "libdnf5/module/nsvcap.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"

#include <modulemd-2.0/modulemd.h>

Expand Down
2 changes: 1 addition & 1 deletion libdnf5/repo/repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ constexpr const char * REPOID_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno
#include "repo_downloader.hpp"
#include "rpm/package_sack_impl.hpp"
#include "solv_repo.hpp"
#include "utils/fs/file.hpp"
#include "utils/string.hpp"

#include "libdnf5/common/exception.hpp"
#include "libdnf5/conf/const.hpp"
#include "libdnf5/logger/logger.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"

extern "C" {
#include <solv/repo_rpmdb.h>
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/repo/repo_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.


#include "repo_cache_private.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/base/base.hpp"
#include "libdnf5/logger/logger.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"


namespace libdnf5::repo {
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/repo/repo_downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "repo_downloader.hpp"

#include "utils/fs/temp.hpp"
#include "utils/fs/utils.hpp"
#include "utils/string.hpp"

#include "libdnf5/base/base.hpp"
#include "libdnf5/conf/const.hpp"
#include "libdnf5/repo/repo_errors.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/temp.hpp"

#include <librepo/librepo.h>
#include <solv/chksum.h>
Expand Down
3 changes: 1 addition & 2 deletions libdnf5/repo/repo_pgp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "repo_pgp.hpp"

#include "utils/fs/temp.hpp"

#include "libdnf5/base/base.hpp"
#include "libdnf5/logger/logger.hpp"
#include "libdnf5/repo/repo_errors.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/temp.hpp"

#include <memory>

Expand Down
4 changes: 2 additions & 2 deletions libdnf5/repo/repo_sack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "rpm/package_sack_impl.hpp"
#include "solv/solver.hpp"
#include "solv_repo.hpp"
#include "utils/fs/file.hpp"
#include "utils/fs/temp.hpp"
#include "utils/fs/utils.hpp"
#include "utils/string.hpp"
#include "utils/url.hpp"
Expand All @@ -42,6 +40,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "libdnf5/conf/option_bool.hpp"
#include "libdnf5/repo/file_downloader.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"
#include "libdnf5/utils/fs/temp.hpp"

extern "C" {
#include <solv/testcase.h>
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/repo/solv_repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "base/base_impl.hpp"
#include "repo_cache_private.hpp"
#include "solv/pool.hpp"
#include "utils/fs/temp.hpp"

#include "libdnf5/base/base.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/temp.hpp"
#include "libdnf5/utils/to_underlying.hpp"

extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/repo/solv_repo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "repo_downloader.hpp"
#include "solv/id_queue.hpp"
#include "solv/pool.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/base/base_weak.hpp"
#include "libdnf5/common/exception.hpp"
#include "libdnf5/repo/config_repo.hpp"
#include "libdnf5/utils/fs/file.hpp"

#include <solv/repo.h>

Expand Down
2 changes: 1 addition & 1 deletion libdnf5/repo/temp_files_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "temp_files_memory.hpp"

#include "utils/fs/file.hpp"
#include "utils/string.hpp"

#include "libdnf5/base/base.hpp"
#include "libdnf5/common/exception.hpp"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"

#include <toml.hpp>

Expand Down
2 changes: 1 addition & 1 deletion libdnf5/rpm/rpm_signature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "repo/repo_pgp.hpp"
#include "rpm/rpm_log_guard.hpp"
#include "utils/fs/temp.hpp"
#include "utils/string.hpp"
#include "utils/url.hpp"

#include "libdnf5/repo/file_downloader.hpp"
#include "libdnf5/repo/repo.hpp"
#include "libdnf5/utils/bgettext/bgettext-lib.h"
#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/temp.hpp"

#include <rpm/rpmcli.h>
#include <rpm/rpmdb.h>
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/system/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "system/state.hpp"

#include "utils/fs/file.hpp"
#include "utils/string.hpp"

#include "libdnf5/utils/bgettext/bgettext-mark-domain.h"
#include "libdnf5/utils/fs/file.hpp"

#include <libdnf5/comps/group/package.hpp>
#include <toml.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libdnf5/utils/fs/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
*/


#include "file.hpp"
#include "libdnf5/utils/fs/file.hpp"

#include "libdnf5/common/exception.hpp"

Expand Down
2 changes: 1 addition & 1 deletion libdnf5/utils/fs/temp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
*/


#include "temp.hpp"
#include "libdnf5/utils/fs/temp.hpp"

#include "libdnf5/common/exception.hpp"

Expand Down
3 changes: 1 addition & 2 deletions libdnf5/utils/iniparser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#ifndef LIBDNF5_UTILS_INIPARSER_HPP
#define LIBDNF5_UTILS_INIPARSER_HPP

#include "utils/fs/file.hpp"

#include "libdnf5/common/exception.hpp"
#include "libdnf5/utils/fs/file.hpp"

#include <memory>
#include <string>
Expand Down
3 changes: 2 additions & 1 deletion test/libdnf5/comps/test_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "test_group.hpp"

#include "../shared/utils.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/utils/fs/file.hpp"

#include <libdnf5/comps/comps.hpp>
#include <libdnf5/comps/group/package.hpp>
Expand Down
4 changes: 2 additions & 2 deletions test/libdnf5/conf/test_config_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "test_config_parser.hpp"

#include "utils/fs/file.hpp"
#include "utils/fs/temp.hpp"
#include "libdnf5/utils/fs/file.hpp"
#include "libdnf5/utils/fs/temp.hpp"

#include <libdnf5/conf/config_parser.hpp>

Expand Down
5 changes: 3 additions & 2 deletions test/libdnf5/iniparser/test_iniparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "test_iniparser.hpp"

#include "utils/fs/file.hpp"
#include "utils/fs/temp.hpp"
#include "utils/iniparser.hpp"

#include "libdnf5/utils/fs/file.hpp"
#include "libdnf5/utils/fs/temp.hpp"

#include <string_view>
#include <vector>

Expand Down
3 changes: 2 additions & 1 deletion test/libdnf5/module/test_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "base/base_impl.hpp"
#include "module/module_db.hpp"
#include "system/state.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/utils/fs/file.hpp"

#include <libdnf5/base/goal.hpp>
#include <libdnf5/module/module_errors.hpp>
Expand Down
3 changes: 2 additions & 1 deletion test/libdnf5/repo/test_package_downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "../shared/utils.hpp"
#include "repo/temp_files_memory.hpp"
#include "utils/fs/file.hpp"
#include "utils/string.hpp"

#include "libdnf5/utils/fs/file.hpp"

#include <libdnf5/base/base.hpp>
#include <libdnf5/repo/package_downloader.hpp>
#include <libdnf5/rpm/package_query.hpp>
Expand Down
3 changes: 2 additions & 1 deletion test/libdnf5/system/test_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include "test_state.hpp"

#include "../shared/utils.hpp"
#include "utils/fs/file.hpp"

#include "libdnf5/utils/fs/file.hpp"


CPPUNIT_TEST_SUITE_REGISTRATION(StateTest);
Expand Down
3 changes: 2 additions & 1 deletion test/libdnf5/system/test_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

#include "../shared/base_test_case.hpp"
#include "system/state.hpp"
#include "utils/fs/temp.hpp"

#include "libdnf5/utils/fs/temp.hpp"

#include <cppunit/extensions/HelperMacros.h>
#include <libdnf5/comps/group/package.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/libdnf5/transaction/transaction_test_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#define LIBDNF5_TEST_TRANSACTION_TRANSACTION_TEST_BASE_HPP


#include "utils/fs/temp.hpp"
#include "libdnf5/utils/fs/temp.hpp"

#include <cppunit/TestCase.h>
#include <cppunit/extensions/HelperMacros.h>
Expand Down
4 changes: 2 additions & 2 deletions test/libdnf5/utils/test_fs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#define LIBDNF5_TEST_UTILS_FS_HPP


#include "utils/fs/file.hpp"
#include "utils/fs/temp.hpp"
#include "libdnf5/utils/fs/file.hpp"
#include "libdnf5/utils/fs/temp.hpp"

#include <cppunit/TestCase.h>
#include <cppunit/extensions/HelperMacros.h>
Expand Down
3 changes: 2 additions & 1 deletion test/shared/base_test_case.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#define TEST_LIBDNF5_BASE_TEST_CASE_HPP

#include "test_case_fixture.hpp"
#include "utils/fs/temp.hpp"

#include "libdnf5/utils/fs/temp.hpp"

#include <libdnf5/base/base.hpp>
#include <libdnf5/repo/repo_sack.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/shared/test_case_fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#ifndef TEST_LIBDNF5_TESTCASE_FIXTURE_HPP
#define TEST_LIBDNF5_TESTCASE_FIXTURE_HPP

#include "utils/fs/temp.hpp"
#include "libdnf5/utils/fs/temp.hpp"

#include <cppunit/TestCase.h>
#include <libdnf5/base/base.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/tutorial/test_tutorial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#define TEST_TUTORIAL_TEST_TUTORIAL_HPP


#include "utils/fs/temp.hpp"
#include "libdnf5/utils/fs/temp.hpp"

#include <cppunit/extensions/HelperMacros.h>

Expand Down

0 comments on commit 1764e21

Please sign in to comment.