aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy84
-rw-r--r--.gitlab-ci.yml26
-rw-r--r--CMakeLists.txt4
-rwxr-xr-xci/configure-paludis.sh6
-rw-r--r--ci/docker/exherbo/paludis-exherbo-clang/Dockerfile4
-rw-r--r--ci/docker/exherbo/paludis-exherbo-gcc/Dockerfile2
-rwxr-xr-xci/docker/exherbo/paludis-exherbo-gcc/build.sh4
-rw-r--r--ci/docker/gentoo/paludis-gentoo-gcc/Dockerfile18
-rwxr-xr-xci/docker/gentoo/paludis-gentoo-gcc/build.sh4
-rw-r--r--ci/docker/gentoo/paludis-gentoo-gcc/config/package.accept_keywords12
-rw-r--r--ci/docker/gentoo/paludis-gentoo-gcc/config/package.mask1
-rw-r--r--ci/docker/gentoo/paludis-gentoo-gcc/config/package.use9
-rw-r--r--ci/docker/gentoo/paludis-gentoo-gcc/config/sets/paludis-deps17
-rwxr-xr-xci/docker/update-images.sh2
-rw-r--r--cmake/modules/PaludisAddTest.cmake2
-rw-r--r--cmake/modules/PaludisCompileFlags.cmake2
-rw-r--r--doc/api/cplusplus/examples/CMakeLists.txt2
-rw-r--r--doc/api/cplusplus/examples/example_package_id.cc4
-rw-r--r--paludis/environments/paludis/CMakeLists.txt2
-rw-r--r--paludis/filter_TEST.cc2
-rw-r--r--paludis/generator_TEST.cc2
-rw-r--r--paludis/python_hooks.cc12
-rw-r--r--paludis/repositories/accounts/CMakeLists.txt2
-rw-r--r--paludis/repositories/e/CMakeLists.txt2
-rw-r--r--paludis/repositories/e/depend_rdepend_TEST.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_pbin.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_phases.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_replacing.cc2
-rw-r--r--paludis/repositories/e/pbin_merger.cc6
-rw-r--r--paludis/repositories/e/pbin_merger.hh1
-rw-r--r--paludis/repositories/e/vdb_merger_TEST.cc4
-rw-r--r--paludis/repositories/e/vdb_repository_TEST_eapis.cc4
-rw-r--r--paludis/repositories/e/vdb_unmerger_TEST.cc8
-rw-r--r--paludis/repositories/fake/CMakeLists.txt2
-rw-r--r--paludis/repositories/gemcutter/CMakeLists.txt2
-rw-r--r--paludis/repositories/gemcutter/gemcutter_dependencies_key.hh18
-rw-r--r--paludis/repositories/gemcutter/gemcutter_id.hh70
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository.hh44
-rw-r--r--paludis/repositories/gemcutter/gemcutter_uri_key.hh14
-rw-r--r--paludis/repositories/repository/CMakeLists.txt2
-rw-r--r--paludis/repositories/unavailable/CMakeLists.txt2
-rw-r--r--paludis/repositories/unpackaged/CMakeLists.txt2
-rw-r--r--paludis/repositories/unwritten/CMakeLists.txt2
-rw-r--r--paludis/resolver/CMakeLists.txt7
-rw-r--r--paludis/tar_extras.cc23
-rw-r--r--paludis/tar_extras.hh1
-rw-r--r--paludis/tar_merger.cc21
-rw-r--r--paludis/tar_merger.hh3
-rw-r--r--paludis/tar_merger_TEST.cc9
-rwxr-xr-xpaludis/tar_merger_TEST_setup.sh2
-rw-r--r--paludis/util/process.cc5
-rw-r--r--paludis/util/process_TEST.cc2
-rw-r--r--ruby/CMakeLists.txt6
-rw-r--r--src/clients/cave/CMakeLists.txt2
56 files changed, 334 insertions, 165 deletions
diff --git a/.clang-tidy b/.clang-tidy
index eeef98f1b..b29dd219f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -23,57 +23,73 @@ HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
- - key: cert-dcl16-c.NewSuffixes
- value: 'L;LL;LU;LLU'
+ - key: modernize-use-nodiscard.ReplacementString
+ value: '[[nodiscard]]'
+ - key: modernize-loop-convert.MinConfidence
+ value: reasonable
+ - key: modernize-replace-auto-ptr.IncludeStyle
+ value: llvm
+ - key: modernize-use-bool-literals.IgnoreMacros
+ value: 'true'
+ - key: modernize-use-noexcept.UseNoexceptFalse
+ value: 'true'
+ - key: google-readability-namespace-comments.ShortNamespaceLines
+ value: '10'
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: '0'
- - key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
- value: '1'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'
- - key: google-readability-braces-around-statements.ShortStatementLines
- value: '1'
- - key: google-readability-function-size.StatementThreshold
- value: '800'
- - key: google-readability-namespace-comments.ShortNamespaceLines
- value: '10'
- - key: google-readability-namespace-comments.SpacesBeforeComments
- value: '2'
+ - key: cert-dcl16-c.NewSuffixes
+ value: 'L;LL;LU;LLU'
+ - key: modernize-use-override.IgnoreDestructors
+ value: 'false'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- - key: modernize-loop-convert.MinConfidence
- value: reasonable
- - key: modernize-loop-convert.NamingStyle
- value: CamelCase
- - key: modernize-make-shared.IgnoreMacros
- value: '1'
- - key: modernize-make-shared.IncludeStyle
- value: '0'
+ - key: google-readability-namespace-comments.SpacesBeforeComments
+ value: '2'
- key: modernize-make-shared.MakeSmartPtrFunction
value: 'std::make_shared'
+ - key: modernize-avoid-bind.PermissiveParameterList
+ value: 'false'
+ - key: modernize-use-override.FinalSpelling
+ value: final
+ - key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
+ value: '1'
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
value: memory
- - key: modernize-make-unique.IgnoreMacros
- value: '1'
- - key: modernize-make-unique.IncludeStyle
+ - key: modernize-use-noexcept.ReplacementString
+ value: ''
+ - key: llvm-qualified-auto.AddConstToQualified
+ value: '0'
+ - key: modernize-loop-convert.NamingStyle
+ value: CamelCase
+ - key: modernize-use-override.AllowOverrideAndFinal
+ value: 'false'
+ - key: google-readability-function-size.StatementThreshold
+ value: '800'
+ - key: llvm-else-after-return.WarnOnConditionVariables
+ value: '0'
+ - key: modernize-use-override.OverrideSpelling
+ value: override
+ - key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
value: '0'
- - key: modernize-make-unique.MakeSmartPtrFunction
- value: 'std::make_unique'
- - key: modernize-make-unique.MakeSmartPtrFunctionHeader
- value: memory
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- - key: modernize-replace-auto-ptr.IncludeStyle
- value: llvm
- - key: modernize-use-nodiscard.ReplacementString
- value: '[[nodiscard]]'
- - key: modernize-use-noexcept.ReplacementString
- value: ''
- - key: modernize-use-noexcept.UseNoexceptFalse
+ - key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
+ - key: modernize-make-shared.IgnoreMacros
+ value: 'true'
- key: modernize-use-transparent-functors.SafeMode
+ value: 'false'
+ - key: modernize-make-shared.IgnoreDefaultInitialization
+ value: 'true'
+ - key: modernize-replace-disallow-copy-and-assign-macro.MacroName
+ value: DISALLOW_COPY_AND_ASSIGN
+ - key: llvm-else-after-return.WarnOnUnfixable
value: '0'
+ - key: modernize-make-shared.IncludeStyle
+ value: llvm
...
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e898ea1b8..dfdc7bdff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -52,12 +52,19 @@ docker-images:exherbo-clang:
VERSION: "latest"
<<: *dockerimage-template
+docker-images:gentoo-gcc:
+ variables:
+ DISTRIBUTION: "gentoo"
+ COMPILER: "gcc"
+ VERSION: "latest"
+ <<: *dockerimage-template
+
Exherbo GCC:
variables:
DISTRIBUTION: "exherbo"
COMPILER: "gcc"
VERSION: "latest"
- PYTHON_VERSION: "3.7"
+ PYTHON_VERSION: "3.9"
<<: *build-template
Exherbo GCC testing:
@@ -65,7 +72,7 @@ Exherbo GCC testing:
DISTRIBUTION: "exherbo"
COMPILER: "gcc"
VERSION: "next"
- PYTHON_VERSION: "3.8"
+ PYTHON_VERSION: "3.9"
allow_failure: true
<<: *build-template
@@ -74,7 +81,16 @@ Exherbo clang:
DISTRIBUTION: "exherbo"
COMPILER: "clang"
VERSION: "latest"
- PYTHON_VERSION: "3.7"
+ PYTHON_VERSION: "3.9"
+ <<: *build-template
+
+Gentoo GCC:
+ variables:
+ DISTRIBUTION: "gentoo"
+ COMPILER: "gcc"
+ VERSION: "latest"
+ PYTHON_VERSION: "3.9"
+ RUBY_VERSION: "2.6"
<<: *build-template
clang-tidy:
@@ -84,9 +100,9 @@ clang-tidy:
DISTRIBUTION: "exherbo"
COMPILER: "clang"
VERSION: "latest"
- PYTHON_VERSION: "3.7"
+ PYTHON_VERSION: "3.9"
script:
- *build-script
- export PATH="${PATH}:$(llvm-config --prefix)/share/clang"
- - run-clang-tidy.py -j$(nproc) -header-filter="${PWD}/.*"
+ - run-clang-tidy.py -j$(nproc)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 263726f17..a4ae883a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,7 @@ endif()
set(PALUDIS_VIM_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/vim/vimfiles" CACHE PATH
"vim installation directory")
-set(PYTHON_SUPPORTED_VERSIONS 2.7 3.5 3.6 3.7 3.8)
+set(PYTHON_SUPPORTED_VERSIONS 2.7 3.6 3.7 3.8 3.9)
set(PYTHON_VERSION "2.7" CACHE STRING
"Python version (${PYTHON_SUPPORTED_VERSIONS}) (requires corresponding Boost.Python as well)")
@@ -409,7 +409,7 @@ endif()
enable_testing()
if(ENABLE_GTEST)
- find_package(GTest REQUIRED)
+ find_package(GTest 1.10 REQUIRED)
endif()
find_program(BASH_EXECUTABLE bash)
diff --git a/ci/configure-paludis.sh b/ci/configure-paludis.sh
index c25a5cb47..fee1add06 100755
--- a/ci/configure-paludis.sh
+++ b/ci/configure-paludis.sh
@@ -3,6 +3,8 @@ DISTRIBUTION=${2}
COMPILER=${3}
BUILD_TYPE=${4:-debug}
+[[ -z ${RUBY_VERSION} ]] && RUBY_VERSION=2.7
+
myconf=()
if [[ ${DISTRIBUTION} == "exherbo" ]]; then
myconf+=(
@@ -11,7 +13,7 @@ if [[ ${DISTRIBUTION} == "exherbo" ]]; then
-DPALUDIS_DEFAULT_DISTRIBUTION=exherbo
-DCONFIG_FRAMEWORK=eclectic
- -DRUBY_VERSION:STRING="2.7"
+ -DRUBY_VERSION:STRING="${RUBY_VERSION}"
-DPYTHON_VERSION:STRING="${PYTHON_VERSION}"
)
elif [[ ${DISTRIBUTION} == "gentoo" ]]; then
@@ -21,7 +23,7 @@ elif [[ ${DISTRIBUTION} == "gentoo" ]]; then
-DPALUDIS_DEFAULT_DISTRIBUTION=gentoo
-DCONFIG_FRAMEWORK=eselect
- -DRUBY_VERSION:STRING="2.7"
+ -DRUBY_VERSION:STRING="${RUBY_VERSION}"
-DPYTHON_VERSION:STRING="${PYTHON_VERSION}"
)
fi
diff --git a/ci/docker/exherbo/paludis-exherbo-clang/Dockerfile b/ci/docker/exherbo/paludis-exherbo-clang/Dockerfile
index 742e09594..3d3cc8e16 100644
--- a/ci/docker/exherbo/paludis-exherbo-clang/Dockerfile
+++ b/ci/docker/exherbo/paludis-exherbo-clang/Dockerfile
@@ -1,4 +1,4 @@
-FROM marvins/exherbo-x86_64-pc-linux-gnu-gcc-with-clang:11
+FROM marvins/exherbo-x86_64-pc-linux-gnu-gcc-with-clang:12
MAINTAINER Marvin Schmidt <marv@exherbo.org>
# Switch to option.conf.d layout
@@ -11,7 +11,7 @@ COPY ./config/sets/paludis-deps.conf /etc/paludis/sets/
RUN chgrp tty /dev/tty \
&& eclectic env update \
&& source /etc/profile \
- && cave resolve -1z repository/{media,pyro,scientific} -x \
+ && cave resolve -1z repository/{media,net,pyro,rust,scientific} -x \
&& cave resolve \
--execute \
--preserve-world \
diff --git a/ci/docker/exherbo/paludis-exherbo-gcc/Dockerfile b/ci/docker/exherbo/paludis-exherbo-gcc/Dockerfile
index 6492ec6b7..95698764f 100644
--- a/ci/docker/exherbo/paludis-exherbo-gcc/Dockerfile
+++ b/ci/docker/exherbo/paludis-exherbo-gcc/Dockerfile
@@ -20,7 +20,7 @@ RUN echo "*/* ${DEPENDENCY_VERSIONS}" >> /etc/paludis/package_unmask.conf \
RUN chgrp tty /dev/tty \
&& eclectic env update \
&& source /etc/profile \
- && cave resolve -1z repository/{media,pyro,python,scientific,x11} -x \
+ && cave resolve -1z repository/{media,net,pyro,python,rust,scientific,x11} -x \
&& cave resolve \
--execute \
--preserve-world \
diff --git a/ci/docker/exherbo/paludis-exherbo-gcc/build.sh b/ci/docker/exherbo/paludis-exherbo-gcc/build.sh
index 8aa8c922e..4347fc87c 100755
--- a/ci/docker/exherbo/paludis-exherbo-gcc/build.sh
+++ b/ci/docker/exherbo/paludis-exherbo-gcc/build.sh
@@ -5,13 +5,13 @@
# next = all testing versions unmasked
IMAGE_VERSION=${1:-latest}
-PYTHON_ABI=3.7
+PYTHON_ABI=3.9
if [[ ${IMAGE_VERSION} == "latest" ]]; then
DEPENDENCY_VERSIONS="stable"
elif [[ ${IMAGE_VERSION} == "next" ]]; then
DEPENDENCY_VERSIONS="testing broken"
- PYTHON_ABI=3.8
+ PYTHON_ABI=3.9
else
echo "Unknown image version, use 'latest' or 'next'"
exit 1
diff --git a/ci/docker/gentoo/paludis-gentoo-gcc/Dockerfile b/ci/docker/gentoo/paludis-gentoo-gcc/Dockerfile
new file mode 100644
index 000000000..d0f4c2620
--- /dev/null
+++ b/ci/docker/gentoo/paludis-gentoo-gcc/Dockerfile
@@ -0,0 +1,18 @@
+FROM gentoo/portage:latest as portage
+FROM gentoo/stage3:latest
+
+# copy the entire portage volume in
+COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
+
+COPY ./config/package.use /etc/portage/
+COPY ./config/package.mask /etc/portage/
+COPY ./config/package.accept_keywords /etc/portage/
+COPY ./config/sets/paludis-deps /etc/portage/sets/
+
+RUN emerge --update --newuse --deep -v @world \
+ && emerge --update --newuse --deep -v @paludis-deps \
+ && rm -rf /var/db/repos/*
+
+# Unprivileged user
+RUN useradd -M builder
+USER builder
diff --git a/ci/docker/gentoo/paludis-gentoo-gcc/build.sh b/ci/docker/gentoo/paludis-gentoo-gcc/build.sh
new file mode 100755
index 000000000..ef7ba5072
--- /dev/null
+++ b/ci/docker/gentoo/paludis-gentoo-gcc/build.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 ts=4 et tw=80 :
+
+docker build --no-cache --rm --pull -t paludis/gentoo-gcc .
diff --git a/ci/docker/gentoo/paludis-gentoo-gcc/config/package.accept_keywords b/ci/docker/gentoo/paludis-gentoo-gcc/config/package.accept_keywords
new file mode 100644
index 000000000..0de75ec24
--- /dev/null
+++ b/ci/docker/gentoo/paludis-gentoo-gcc/config/package.accept_keywords
@@ -0,0 +1,12 @@
+# required by app-crypt/rhash-1.3.5::gentoo[ssl,-libressl]
+# required by dev-util/cmake-3.9.6::gentoo
+# required by media-libs/openjpeg-2.3.0::gentoo
+# required by app-text/ghostscript-gpl-9.21::gentoo
+# required by app-doc/doxygen-1.8.14-r1::gentoo
+# required by @selected
+# required by @world (argument)
+=dev-libs/openssl-1.0.2o-r6 ~amd64
+
+=dev-util/boost-build-1.71.0 **
+=dev-libs/boost-1.71.0 **
+=dev-util/cmake-3.15.3 **
diff --git a/ci/docker/gentoo/paludis-gentoo-gcc/config/package.mask b/ci/docker/gentoo/paludis-gentoo-gcc/config/package.mask
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/ci/docker/gentoo/paludis-gentoo-gcc/config/package.mask
@@ -0,0 +1 @@
+
diff --git a/ci/docker/gentoo/paludis-gentoo-gcc/config/package.use b/ci/docker/gentoo/paludis-gentoo-gcc/config/package.use
new file mode 100644
index 000000000..b329790cf
--- /dev/null
+++ b/ci/docker/gentoo/paludis-gentoo-gcc/config/package.use
@@ -0,0 +1,9 @@
+# required by dev-python/sqlalchemy-1.2.7::gentoo[python_targets_python3_5]
+# required by dev-python/sphinxcontrib-websupport-1.0.1-r1::gentoo
+# required by dev-python/sphinx-1.6.5::gentoo[-test]
+# required by dev-python/sphinx (argument)
+dev-lang/python sqlite
+
+dev-libs/boost python
+
+*/* ruby_targets_ruby26
diff --git a/ci/docker/gentoo/paludis-gentoo-gcc/config/sets/paludis-deps b/ci/docker/gentoo/paludis-gentoo-gcc/config/sets/paludis-deps
new file mode 100644
index 000000000..ffd0b74ab
--- /dev/null
+++ b/ci/docker/gentoo/paludis-gentoo-gcc/config/sets/paludis-deps
@@ -0,0 +1,17 @@
+app-doc/doxygen
+app-text/asciidoc
+app-text/htmltidy
+app-text/xmlto
+dev-python/sphinx
+dev-ruby/syntax
+
+dev-cpp/gtest
+
+dev-libs/boost
+dev-lang/ruby:2.6
+
+app-arch/libarchive
+
+dev-db/sqlite:3
+
+dev-util/ninja
diff --git a/ci/docker/update-images.sh b/ci/docker/update-images.sh
index 5262e2dd7..61cac1aa7 100755
--- a/ci/docker/update-images.sh
+++ b/ci/docker/update-images.sh
@@ -4,3 +4,5 @@
docker build -t paludis/exherbo-gcc exherbo/paludis-exherbo-gcc
docker build -t paludis/exherbo-clang exherbo/paludis-exherbo-clang
+docker build -t paludis/gentoo-gcc gentoo/paludis-gentoo-gcc
+
diff --git a/cmake/modules/PaludisAddTest.cmake b/cmake/modules/PaludisAddTest.cmake
index 684da49c8..15463cd4a 100644
--- a/cmake/modules/PaludisAddTest.cmake
+++ b/cmake/modules/PaludisAddTest.cmake
@@ -46,8 +46,10 @@ function(paludis_add_test test_name)
set(pat_test_extension "")
if(PAT_PYTHON)
set(pat_test_extension ".py")
+ set(pat_display_name "python_${pat_display_name}")
elseif(PAT_RUBY)
set(pat_test_extension ".rb")
+ set(pat_display_name "ruby_${pat_display_name}")
endif()
if(PAT_BASH OR PAT_PYTHON OR PAT_RUBY)
diff --git a/cmake/modules/PaludisCompileFlags.cmake b/cmake/modules/PaludisCompileFlags.cmake
index 7db849f37..2d3dae17f 100644
--- a/cmake/modules/PaludisCompileFlags.cmake
+++ b/cmake/modules/PaludisCompileFlags.cmake
@@ -76,3 +76,5 @@ append_if(CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden"
check_cxx_compiler_flag("-Werror -fno-strict-aliasing" CXX_SUPPORTS_FNO_STRICT_ALIASING)
check_cxx_compiler_flag("-Werror -g0" CXX_SUPPORTS_G0)
+check_cxx_compiler_flag("-Werror -fdeclspec" CXX_SUPPORTS_FDECLSPEC)
+
diff --git a/doc/api/cplusplus/examples/CMakeLists.txt b/doc/api/cplusplus/examples/CMakeLists.txt
index 5e15f2d43..e68c3541a 100644
--- a/doc/api/cplusplus/examples/CMakeLists.txt
+++ b/doc/api/cplusplus/examples/CMakeLists.txt
@@ -13,7 +13,7 @@ paludis_add_library(libpaludisexamples
target_link_libraries(libpaludisexamples
INTERFACE
libpaludisargs)
-add_dependencies(libpaludisexamples libpaludisargs_SE libpaludisutil_SE)
+add_dependencies(libpaludisexamples libpaludis_SE libpaludisargs_SE libpaludisutil_SE)
function(add_example example)
add_executable(example_${example}
diff --git a/doc/api/cplusplus/examples/example_package_id.cc b/doc/api/cplusplus/examples/example_package_id.cc
index c1cdc8894..8746d78ad 100644
--- a/doc/api/cplusplus/examples/example_package_id.cc
+++ b/doc/api/cplusplus/examples/example_package_id.cc
@@ -107,11 +107,11 @@ int main(int argc, char * argv[])
if ((*i)->supports_action(config_action))
actions.insert("config");
- SupportsActionTest<UninstallAction> fetch_action;
+ SupportsActionTest<FetchAction> fetch_action;
if ((*i)->supports_action(fetch_action))
actions.insert("fetch");
- SupportsActionTest<UninstallAction> info_action;
+ SupportsActionTest<InfoAction> info_action;
if ((*i)->supports_action(info_action))
actions.insert("info");
}
diff --git a/paludis/environments/paludis/CMakeLists.txt b/paludis/environments/paludis/CMakeLists.txt
index b56bacd88..db2968702 100644
--- a/paludis/environments/paludis/CMakeLists.txt
+++ b/paludis/environments/paludis/CMakeLists.txt
@@ -17,7 +17,7 @@ paludis_add_library(libpaludispaludisenvironment
target_compile_definitions(libpaludispaludisenvironment
PRIVATE
-DSHAREDIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}")
-add_dependencies(libpaludispaludisenvironment libpaludisutil_SE)
+add_dependencies(libpaludispaludisenvironment libpaludis_SE libpaludisutil_SE)
paludis_add_test(paludis_environment GTEST)
paludis_add_test(world GTEST)
diff --git a/paludis/filter_TEST.cc b/paludis/filter_TEST.cc
index 7de3c4b5b..09e35cd70 100644
--- a/paludis/filter_TEST.cc
+++ b/paludis/filter_TEST.cc
@@ -104,7 +104,7 @@ TEST_P(FilterTestCaseBase, Works)
EXPECT_EQ("", join(indirect_iterator(got_none->begin()), indirect_iterator(got_none->end()), ", "));
}
-INSTANTIATE_TEST_CASE_P(FilterTest, FilterTestCaseBase, testing::Values(
+INSTANTIATE_TEST_SUITE_P(FilterTest, FilterTestCaseBase, testing::Values(
TestInfo{ std::make_shared<filter::All>(), std::string(
"cat/a-1:0::inst_repo1, "
"cat/a-1:0::repo1, "
diff --git a/paludis/generator_TEST.cc b/paludis/generator_TEST.cc
index b94fd81f9..2f8acf531 100644
--- a/paludis/generator_TEST.cc
+++ b/paludis/generator_TEST.cc
@@ -107,7 +107,7 @@ TEST_P(GeneratorTestCaseBase, Works)
EXPECT_EQ("", join(indirect_iterator(got_none->begin()), indirect_iterator(got_none->end()), ", "));
}
-INSTANTIATE_TEST_CASE_P(GeneratorTest, GeneratorTestCaseBase, testing::Values(
+INSTANTIATE_TEST_SUITE_P(GeneratorTest, GeneratorTestCaseBase, testing::Values(
TestInfo{ std::make_shared<generator::All>(), std::string(
"cat/a-1:0::inst_repo1, "
"cat/a-1:0::repo1, "
diff --git a/paludis/python_hooks.cc b/paludis/python_hooks.cc
index 248805e88..2a1fd095d 100644
--- a/paludis/python_hooks.cc
+++ b/paludis/python_hooks.cc
@@ -34,6 +34,15 @@ namespace
private:
static std::mutex _mutex;
+ struct Initializer
+ {
+ Initializer()
+ {
+ Py_Initialize();
+ }
+ };
+
+ static Initializer pyinit;
static bp::dict _local_namespace_base;
static bp::dict _output_wrapper_namespace;
static bp::object _format_exception;
@@ -79,6 +88,7 @@ namespace
};
std::mutex PyHookFile::_mutex;
+ PyHookFile::Initializer PyHookFile::pyinit;
bp::dict PyHookFile::_output_wrapper_namespace;
bp::dict PyHookFile::_local_namespace_base;
bp::object PyHookFile::_format_exception;
@@ -99,8 +109,6 @@ PyHookFile::PyHookFile(const FSPath & f, const bool r, const Environment * const
initialized = true;
try
{
- Py_Initialize();
-
bp::object main = bp::import("__main__");
bp::object global_namespace = main.attr("__dict__");
diff --git a/paludis/repositories/accounts/CMakeLists.txt b/paludis/repositories/accounts/CMakeLists.txt
index a01e9e65c..315f094b8 100644
--- a/paludis/repositories/accounts/CMakeLists.txt
+++ b/paludis/repositories/accounts/CMakeLists.txt
@@ -12,7 +12,7 @@ paludis_add_library(libpaludisaccountsrepository
"${CMAKE_CURRENT_SOURCE_DIR}/dummy_accounts_handler.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/passwd_accounts_handler.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
-add_dependencies(libpaludisaccountsrepository libpaludisutil_SE)
+add_dependencies(libpaludisaccountsrepository libpaludis_SE libpaludisutil_SE)
paludis_add_test(accounts_repository GTEST)
diff --git a/paludis/repositories/e/CMakeLists.txt b/paludis/repositories/e/CMakeLists.txt
index 4ecfa5196..fb0b19648 100644
--- a/paludis/repositories/e/CMakeLists.txt
+++ b/paludis/repositories/e/CMakeLists.txt
@@ -102,7 +102,7 @@ paludis_add_library(libpaludiserepository
"${CMAKE_CURRENT_SOURCE_DIR}/dep_parser.se"
"${CMAKE_CURRENT_SOURCE_DIR}/iuse.se"
"${CMAKE_CURRENT_SOURCE_DIR}/e_repository_params.se")
-add_dependencies(libpaludiserepository libpaludisutil_SE)
+add_dependencies(libpaludiserepository libpaludis_SE libpaludisutil_SE)
foreach(test
aa_visitor
diff --git a/paludis/repositories/e/depend_rdepend_TEST.cc b/paludis/repositories/e/depend_rdepend_TEST.cc
index b14274674..a1a384173 100644
--- a/paludis/repositories/e/depend_rdepend_TEST.cc
+++ b/paludis/repositories/e/depend_rdepend_TEST.cc
@@ -194,7 +194,7 @@ TEST_P(DependRdependTest, Works)
}
}
-INSTANTIATE_TEST_CASE_P(DependRdepend, DependRdependTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(DependRdepend, DependRdependTest, testing::Values(
TestParams{"0", true},
TestParams{"1", true},
TestParams{"2", true},
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index 81740bdfd..8a2e63266 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -141,7 +141,7 @@ TEST_P(EverTest, Works)
id->perform_action(action);
}
-INSTANTIATE_TEST_CASE_P(Works, EverTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Works, EverTest, testing::Values(
std::string("ever-split"),
std::string("ever-split-all"),
std::string("ever-at-least"),
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index da4cc4072..2896fc32e 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -166,7 +166,7 @@ TEST_P(ExlibsTest, Works)
}
}
-INSTANTIATE_TEST_CASE_P(Works, ExlibsTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Works, ExlibsTest, testing::Values(
TestInfo{"require-success", success},
TestInfo{"require-fail", unsupported},
TestInfo{"require-param", success},
diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc
index 71edda543..4284e19ed 100644
--- a/paludis/repositories/e/e_repository_TEST_pbin.cc
+++ b/paludis/repositories/e/e_repository_TEST_pbin.cc
@@ -189,7 +189,7 @@ TEST_P(ERepositoryInstallEAPIPBinTest, Works)
EXPECT_TRUE((root / "usr" / "share" / ("installed-" + base_eapi)).stat().exists());
}
-INSTANTIATE_TEST_CASE_P(Works, ERepositoryInstallEAPIPBinTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Works, ERepositoryInstallEAPIPBinTest, testing::Values(
std::string("0"),
std::string("1"),
std::string("2"),
diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc
index 9c802171e..ee4a740ce 100644
--- a/paludis/repositories/e/e_repository_TEST_phases.cc
+++ b/paludis/repositories/e/e_repository_TEST_phases.cc
@@ -159,7 +159,7 @@ TEST_P(PhasesTest, Works)
EXPECT_THROW(id->perform_action(action), ActionFailedError);
}
-INSTANTIATE_TEST_CASE_P(Works, PhasesTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Works, PhasesTest, testing::Values(
TestInfo{"no-expensive-test", true, false, false},
TestInfo{"expensive-test", true, true, false},
TestInfo{"expensive-test-fail", true, true, false},
diff --git a/paludis/repositories/e/e_repository_TEST_replacing.cc b/paludis/repositories/e/e_repository_TEST_replacing.cc
index d974c7759..db48087e0 100644
--- a/paludis/repositories/e/e_repository_TEST_replacing.cc
+++ b/paludis/repositories/e/e_repository_TEST_replacing.cc
@@ -154,7 +154,7 @@ TEST_P(ReplacingTest, Works)
id->perform_action(action);
}
-INSTANTIATE_TEST_CASE_P(Works, ReplacingTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Works, ReplacingTest, testing::Values(
TestInfo{"exheres-0", "repo1", "replace-none", "cat/none", "pkg"},
TestInfo{"exheres-0", "repo1", "replace-one", "=cat/pkg-1", "pkg"},
TestInfo{"exheres-0", "repo1", "replace-many", "cat/pkg", "pkg"},
diff --git a/paludis/repositories/e/pbin_merger.cc b/paludis/repositories/e/pbin_merger.cc
index 64eff3a82..4e4684aab 100644
--- a/paludis/repositories/e/pbin_merger.cc
+++ b/paludis/repositories/e/pbin_merger.cc
@@ -174,6 +174,12 @@ PbinMerger::on_done_merge()
}
void
+PbinMerger::track_install_dir(const FSPath &, const FSPath & dst)
+{
+ display_override(">>> [dir] " + stringify(dst));
+}
+
+void
PbinMerger::track_install_file(const FSPath &, const FSPath & dst)
{
display_override(">>> [obj] " + stringify(dst));
diff --git a/paludis/repositories/e/pbin_merger.hh b/paludis/repositories/e/pbin_merger.hh
index 358b8f36e..f8a92be5e 100644
--- a/paludis/repositories/e/pbin_merger.hh
+++ b/paludis/repositories/e/pbin_merger.hh
@@ -77,6 +77,7 @@ namespace paludis
void on_done_merge() override;
+ void track_install_dir(const FSPath &, const FSPath &) override;
void track_install_file(const FSPath &, const FSPath &) override;
void track_install_sym(const FSPath &, const FSPath &) override;
diff --git a/paludis/repositories/e/vdb_merger_TEST.cc b/paludis/repositories/e/vdb_merger_TEST.cc
index 0d778a185..ebb91fd16 100644
--- a/paludis/repositories/e/vdb_merger_TEST.cc
+++ b/paludis/repositories/e/vdb_merger_TEST.cc
@@ -196,7 +196,7 @@ TEST_P(VDBMergerTestConfigProtect, ConfigProtect)
EXPECT_TRUE(! (root_dir / "protected_dir_not_really/._cfg0000_unprotected_file").stat().exists());
}
-INSTANTIATE_TEST_CASE_P(ConfigProtect, VDBMergerTestConfigProtect, testing::Values(std::string("config_protect")));
+INSTANTIATE_TEST_SUITE_P(ConfigProtect, VDBMergerTestConfigProtect, testing::Values(std::string("config_protect")));
struct VDBMergerErrorTest : VDBMergerTest { };
@@ -205,7 +205,7 @@ TEST_P(VDBMergerErrorTest, Error)
EXPECT_THROW(merger->check(), FSMergerError);
}
-INSTANTIATE_TEST_CASE_P(Errors, VDBMergerErrorTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Errors, VDBMergerErrorTest, testing::Values(
std::string("dir_newline"),
std::string("sym_newline"),
std::string("sym_target_newline"),
diff --git a/paludis/repositories/e/vdb_repository_TEST_eapis.cc b/paludis/repositories/e/vdb_repository_TEST_eapis.cc
index 9e2448b52..eb405a645 100644
--- a/paludis/repositories/e/vdb_repository_TEST_eapis.cc
+++ b/paludis/repositories/e/vdb_repository_TEST_eapis.cc
@@ -202,7 +202,7 @@ TEST_P(PhasesTest, Works)
}
}
-INSTANTIATE_TEST_CASE_P(Works, PhasesTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Works, PhasesTest, testing::Values(
std::string("0"),
std::string("1"),
std::string("2"),
@@ -329,7 +329,7 @@ TEST_P(VarsTest, Works)
}
}
-INSTANTIATE_TEST_CASE_P(Works, VarsTest, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Works, VarsTest, testing::Values(
std::string("0"),
std::string("1"),
std::string("2"),
diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc
index e7c165e80..c7a33fc16 100644
--- a/paludis/repositories/e/vdb_unmerger_TEST.cc
+++ b/paludis/repositories/e/vdb_unmerger_TEST.cc
@@ -143,7 +143,7 @@ TEST_P(VDBUnmergerTestRemovesAll, RemovesAll)
ASSERT_TRUE(! (root_dir / target).stat().exists());
}
-INSTANTIATE_TEST_CASE_P(RemovesAll, VDBUnmergerTestRemovesAll, testing::Values(
+INSTANTIATE_TEST_SUITE_P(RemovesAll, VDBUnmergerTestRemovesAll, testing::Values(
std::string("file_ok"),
std::string("file_ with spaces"),
std::string("file_ with lots of spaces"),
@@ -168,7 +168,7 @@ TEST_P(VDBUnmergerTestRemaining, Remaining)
ASSERT_TRUE((root_dir / target).stat().exists());
}
-INSTANTIATE_TEST_CASE_P(Remaining, VDBUnmergerTestRemaining, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Remaining, VDBUnmergerTestRemaining, testing::Values(
std::string("file_bad_type"),
std::string("file_bad_md5sum"),
std::string("file_bad_mtime"),
@@ -191,7 +191,7 @@ TEST_P(VDBUnmergerTestSucceeds, Succeeds)
unmerger->unmerge();
}
-INSTANTIATE_TEST_CASE_P(Succeeds, VDBUnmergerTestSucceeds, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Succeeds, VDBUnmergerTestSucceeds, testing::Values(
std::string("file_replaces_dir")
));
@@ -232,7 +232,7 @@ TEST_P(VDBUnmergerTestConfigProtect, Works)
EXPECT_TRUE(! (root_dir / "protected_dir_not_really/unprotected_file").stat().exists());
}
-INSTANTIATE_TEST_CASE_P(Succeeds, VDBUnmergerTestConfigProtect, testing::Values(
+INSTANTIATE_TEST_SUITE_P(Succeeds, VDBUnmergerTestConfigProtect, testing::Values(
std::string("config_protect")
));
diff --git a/paludis/repositories/fake/CMakeLists.txt b/paludis/repositories/fake/CMakeLists.txt
index 2dfbc9f1e..3591f6b96 100644
--- a/paludis/repositories/fake/CMakeLists.txt
+++ b/paludis/repositories/fake/CMakeLists.txt
@@ -7,7 +7,7 @@ paludis_add_library(libpaludisfakerepository
"${CMAKE_CURRENT_SOURCE_DIR}/fake_installed_repository.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/fake_package_id.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
-add_dependencies(libpaludisfakerepository libpaludisutil_SE)
+add_dependencies(libpaludisfakerepository libpaludis_SE libpaludisutil_SE)
paludis_add_test(fake_repository GTEST)
paludis_add_test(fake_installed_repository GTEST)
diff --git a/paludis/repositories/gemcutter/CMakeLists.txt b/paludis/repositories/gemcutter/CMakeLists.txt
index a3ed4a4af..6569fd8ec 100644
--- a/paludis/repositories/gemcutter/CMakeLists.txt
+++ b/paludis/repositories/gemcutter/CMakeLists.txt
@@ -9,7 +9,7 @@ paludis_add_library(libpaludisgemcutterrepository
"${CMAKE_CURRENT_SOURCE_DIR}/json_common.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/json_things_handle.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
-add_dependencies(libpaludisgemcutterrepository libpaludisutil_SE)
+add_dependencies(libpaludisgemcutterrepository libpaludis_SE libpaludisutil_SE)
paludis_add_library(libpaludisgemcutterrepositoryjsonthings
json_things.cc)
diff --git a/paludis/repositories/gemcutter/gemcutter_dependencies_key.hh b/paludis/repositories/gemcutter/gemcutter_dependencies_key.hh
index a7afbe682..cdd9e9269 100644
--- a/paludis/repositories/gemcutter/gemcutter_dependencies_key.hh
+++ b/paludis/repositories/gemcutter/gemcutter_dependencies_key.hh
@@ -51,22 +51,22 @@ namespace paludis
const std::shared_ptr<const GemJSONDependencies> &,
const std::shared_ptr<const GemJSONDependencies> &);
- ~GemcutterDependenciesKey();
+ ~GemcutterDependenciesKey() override;
///\}
- virtual const std::shared_ptr<const DependencySpecTree> parse_value() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::shared_ptr<const DependencySpecTree> parse_value() const override PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::string human_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual MetadataKeyType type() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::string raw_name() const override PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::string human_name() const override PALUDIS_ATTRIBUTE((warn_unused_result));
+ MetadataKeyType type() const override PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::shared_ptr<const DependenciesLabelSequence> initial_labels() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::shared_ptr<const DependenciesLabelSequence> initial_labels() const
+ override PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::string pretty_print_value(
+ const std::string pretty_print_value(
const PrettyPrinter &,
- const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ const PrettyPrintOptions &) const override PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
}
diff --git a/paludis/repositories/gemcutter/gemcutter_id.hh b/paludis/repositories/gemcutter/gemcutter_id.hh
index a96805270..2fe85b51e 100644
--- a/paludis/repositories/gemcutter/gemcutter_id.hh
+++ b/paludis/repositories/gemcutter/gemcutter_id.hh
@@ -52,49 +52,49 @@ namespace paludis
Pimp<GemcutterID> _imp;
protected:
- void need_keys_added() const;
- void need_masks_added() const;
+ void need_keys_added() const override;
+ void need_masks_added() const override;
public:
GemcutterID(const GemcutterIDParams &);
- ~GemcutterID();
+ ~GemcutterID() override;
- const std::string canonical_form(const PackageIDCanonicalForm) const;
- const QualifiedPackageName name() const;
- const VersionSpec version() const;
- const RepositoryName repository_name() const;
- virtual PackageDepSpec uniquely_identifying_spec() const;
+ const std::string canonical_form(const PackageIDCanonicalForm) const override;
+ const QualifiedPackageName name() const override;
+ const VersionSpec version() const override;
+ const RepositoryName repository_name() const override;
+ PackageDepSpec uniquely_identifying_spec() const override;
- const std::shared_ptr<const MetadataValueKey<Slot> > slot_key() const;
- const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > keywords_key() const;
- const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
- dependencies_key() const;
- const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
- build_dependencies_key() const;
- const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
- run_dependencies_key() const;
- const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
- post_dependencies_key() const;
- const std::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > fetches_key() const;
- const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const;
- const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const;
- const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
- const std::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const;
- const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const;
- const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
- const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > choices_key() const;
+ const std::shared_ptr<const MetadataValueKey<Slot> > slot_key() const override;
+ const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > keywords_key() const override;
+ const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
+ dependencies_key() const override;
+ const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
+ build_dependencies_key() const override;
+ const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
+ run_dependencies_key() const override;
+ const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >
+ post_dependencies_key() const override;
+ const std::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > fetches_key() const override;
+ const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const override;
+ const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const override;
+ const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const override;
+ const std::shared_ptr<const MetadataTimeKey> installed_time_key() const override;
+ const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const override;
+ const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const override;
+ const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const override;
+ const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > choices_key() const override;
- bool supports_action(const SupportsActionTestBase &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
- void perform_action(Action &) const PALUDIS_ATTRIBUTE((noreturn));
+ bool supports_action(const SupportsActionTestBase &) const
+ override PALUDIS_ATTRIBUTE((warn_unused_result));
+ void perform_action(Action &) const override PALUDIS_ATTRIBUTE((noreturn));
- bool arbitrary_less_than_comparison(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
- std::size_t extra_hash_value() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
+ bool arbitrary_less_than_comparison(const PackageID &) const
+ override PALUDIS_ATTRIBUTE((warn_unused_result));
+ std::size_t extra_hash_value() const
+ override PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::shared_ptr<const Contents> contents() const;
+ const std::shared_ptr<const Contents> contents() const override;
};
}
diff --git a/paludis/repositories/gemcutter/gemcutter_repository.hh b/paludis/repositories/gemcutter/gemcutter_repository.hh
index 778348d59..98c409c07 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository.hh
+++ b/paludis/repositories/gemcutter/gemcutter_repository.hh
@@ -61,35 +61,35 @@ namespace paludis
void _add_metadata_keys();
protected:
- virtual void need_keys_added() const;
+ void need_keys_added() const override;
public:
GemcutterRepository(const GemcutterRepositoryParams &);
- ~GemcutterRepository();
+ ~GemcutterRepository() override;
- virtual const bool is_unimportant() const;
+ const bool is_unimportant() const override;
- virtual const std::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<FSPath> > location_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const;
- virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
+ const std::shared_ptr<const MetadataValueKey<std::string> > format_key() const override;
+ const std::shared_ptr<const MetadataValueKey<FSPath> > location_key() const override;
+ const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const override;
+ const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const override;
- virtual bool has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
- virtual bool has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const;
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes &) const;
- virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
- virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const;
+ bool has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const override;
+ bool has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const override;
+ std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const override;
+ std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const override;
+ std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes &) const override;
+ std::shared_ptr<const QualifiedPackageNameSet> package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const override;
+ std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const override;
- virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
- virtual bool some_ids_might_not_be_masked() const;
- virtual void invalidate();
+ bool some_ids_might_support_action(const SupportsActionTestBase &) const override;
+ bool some_ids_might_not_be_masked() const override;
+ void invalidate() override;
- virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
+ bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const override;
- virtual const std::shared_ptr<const Set<std::string> > maybe_expand_licence_nonrecursively(
- const std::string &) const;
+ const std::shared_ptr<const Set<std::string> > maybe_expand_licence_nonrecursively(
+ const std::string &) const override;
///\name RepositoryFactory functions
///\{
@@ -111,11 +111,11 @@ namespace paludis
///\name Set methods
///\{
- virtual void populate_sets() const;
+ void populate_sets() const override;
///\}
- virtual HookResult perform_hook(const Hook & hook, const std::shared_ptr<OutputManager> &);
+ HookResult perform_hook(const Hook & hook, const std::shared_ptr<OutputManager> &) override;
};
}
diff --git a/paludis/repositories/gemcutter/gemcutter_uri_key.hh b/paludis/repositories/gemcutter/gemcutter_uri_key.hh
index eba98ae01..438efa0d3 100644
--- a/paludis/repositories/gemcutter/gemcutter_uri_key.hh
+++ b/paludis/repositories/gemcutter/gemcutter_uri_key.hh
@@ -40,19 +40,19 @@ namespace paludis
const MetadataKeyType,
const std::string &);
- ~GemcutterURIKey();
+ ~GemcutterURIKey() override;
///\}
- virtual const std::shared_ptr<const SimpleURISpecTree> parse_value() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::shared_ptr<const SimpleURISpecTree> parse_value() const override PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::string human_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual MetadataKeyType type() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::string raw_name() const override PALUDIS_ATTRIBUTE((warn_unused_result));
+ const std::string human_name() const override PALUDIS_ATTRIBUTE((warn_unused_result));
+ MetadataKeyType type() const override PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::string pretty_print_value(
+ const std::string pretty_print_value(
const PrettyPrinter &,
- const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ const PrettyPrintOptions &) const override PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
}
diff --git a/paludis/repositories/repository/CMakeLists.txt b/paludis/repositories/repository/CMakeLists.txt
index cfb8f93b2..2c8e3953d 100644
--- a/paludis/repositories/repository/CMakeLists.txt
+++ b/paludis/repositories/repository/CMakeLists.txt
@@ -5,5 +5,5 @@ paludis_add_library(libpaludisrepositoryrepository
"${CMAKE_CURRENT_SOURCE_DIR}/repository_repository.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/repository_repository_store.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
-add_dependencies(libpaludisrepositoryrepository libpaludisutil_SE)
+add_dependencies(libpaludisrepositoryrepository libpaludis_SE libpaludisutil_SE)
diff --git a/paludis/repositories/unavailable/CMakeLists.txt b/paludis/repositories/unavailable/CMakeLists.txt
index d79a8bd73..975c10728 100644
--- a/paludis/repositories/unavailable/CMakeLists.txt
+++ b/paludis/repositories/unavailable/CMakeLists.txt
@@ -9,7 +9,7 @@ paludis_add_library(libpaludisunavailablerepository
"${CMAKE_CURRENT_SOURCE_DIR}/unavailable_repository_store.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/unavailable_repository_file.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
-add_dependencies(libpaludisunavailablerepository libpaludisutil_SE)
+add_dependencies(libpaludisunavailablerepository libpaludis_SE libpaludisutil_SE)
paludis_add_test(unavailable_repository GTEST)
diff --git a/paludis/repositories/unpackaged/CMakeLists.txt b/paludis/repositories/unpackaged/CMakeLists.txt
index c794956da..c1e924bc0 100644
--- a/paludis/repositories/unpackaged/CMakeLists.txt
+++ b/paludis/repositories/unpackaged/CMakeLists.txt
@@ -9,7 +9,7 @@ paludis_add_library(libpaludisunpackagedrepository
"${CMAKE_CURRENT_SOURCE_DIR}/installed_repository.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/installed_id.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
-add_dependencies(libpaludisunpackagedrepository libpaludisutil_SE)
+add_dependencies(libpaludisunpackagedrepository libpaludis_SE libpaludisutil_SE)
paludis_add_test(unpackaged_repository GTEST)
paludis_add_test(installed_repository GTEST)
diff --git a/paludis/repositories/unwritten/CMakeLists.txt b/paludis/repositories/unwritten/CMakeLists.txt
index 61d223ae3..98e2fa23c 100644
--- a/paludis/repositories/unwritten/CMakeLists.txt
+++ b/paludis/repositories/unwritten/CMakeLists.txt
@@ -7,7 +7,7 @@ paludis_add_library(libpaludisunwrittenrepository
"${CMAKE_CURRENT_SOURCE_DIR}/unwritten_repository_store.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/unwritten_repository_file.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/registration.cc")
-add_dependencies(libpaludisunwrittenrepository libpaludisutil_SE)
+add_dependencies(libpaludisunwrittenrepository libpaludis_SE libpaludisutil_SE)
paludis_add_test(unwritten_repository GTEST)
diff --git a/paludis/resolver/CMakeLists.txt b/paludis/resolver/CMakeLists.txt
index f0b25de86..59002bc0f 100644
--- a/paludis/resolver/CMakeLists.txt
+++ b/paludis/resolver/CMakeLists.txt
@@ -86,7 +86,7 @@ paludis_add_library(libpaludisresolver
"${CMAKE_CURRENT_SOURCE_DIR}/promote_binaries.se"
"${CMAKE_CURRENT_SOURCE_DIR}/resolver_functions.se"
"${CMAKE_CURRENT_SOURCE_DIR}/use_existing.se")
-add_dependencies(libpaludisresolver libpaludisutil_SE)
+add_dependencies(libpaludisresolver libpaludis_SE libpaludisutil_SE)
target_link_libraries(libpaludisresolver
INTERFACE
Threads::Threads)
@@ -97,7 +97,10 @@ if(ENABLE_GTEST)
"${CMAKE_CURRENT_SOURCE_DIR}/resolver_test.cc")
# TODO(compnerd) create an object library for the SE_SOURCES that we can depend
# on instead
- add_dependencies(libpaludisresolvertest libpaludisresolver_SE libpaludisutil_SE)
+ add_dependencies(libpaludisresolvertest
+ libpaludisfakerepository
+ libpaludisresolver_SE
+ libpaludisutil_SE)
foreach(test
any
diff --git a/paludis/tar_extras.cc b/paludis/tar_extras.cc
index 6e459d63e..85080c997 100644
--- a/paludis/tar_extras.cc
+++ b/paludis/tar_extras.cc
@@ -67,6 +67,29 @@ paludis_tar_extras_init(const std::string & f, const std::string & compress)
extern "C"
void
+paludis_tar_extras_add_dir(PaludisTarExtras * const extras, const std::string & from, const std::string & path)
+{
+ struct archive_entry * entry(archive_entry_new());
+ if (! entry)
+ throw MergerError("archive_entry_new returned null");
+
+ struct stat st;
+ if (0 != lstat(from.c_str(), &st))
+ throw MergerError("lstat failed");
+
+ archive_entry_copy_pathname(entry, path.c_str());
+ archive_entry_copy_stat(entry, &st);
+ if (ARCHIVE_OK != archive_write_header(extras->archive, entry))
+ throw MergerError("archive_write_header failed");
+
+ if (ARCHIVE_OK != archive_write_finish_entry(extras->archive))
+ throw MergerError("archive_write_finish_entry failed");
+
+ archive_entry_free(entry);
+}
+
+extern "C"
+void
paludis_tar_extras_add_file(PaludisTarExtras * const extras, const std::string & from, const std::string & path)
{
struct archive * disk_archive(archive_read_disk_new());
diff --git a/paludis/tar_extras.hh b/paludis/tar_extras.hh
index 09523a0f3..029260c57 100644
--- a/paludis/tar_extras.hh
+++ b/paludis/tar_extras.hh
@@ -26,6 +26,7 @@
struct PaludisTarExtras;
extern "C" PaludisTarExtras * paludis_tar_extras_init(const std::string &, const std::string &) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result));
+extern "C" void paludis_tar_extras_add_dir(PaludisTarExtras * const, const std::string &, const std::string &) PALUDIS_VISIBLE;
extern "C" void paludis_tar_extras_add_file(PaludisTarExtras * const, const std::string &, const std::string &) PALUDIS_VISIBLE;
extern "C" void paludis_tar_extras_add_sym(PaludisTarExtras * const, const std::string &, const std::string &, const std::string &) PALUDIS_VISIBLE;
extern "C" void paludis_tar_extras_cleanup(PaludisTarExtras * const) PALUDIS_VISIBLE;
diff --git a/paludis/tar_merger.cc b/paludis/tar_merger.cc
index bb508fcbe..6a742b7ed 100644
--- a/paludis/tar_merger.cc
+++ b/paludis/tar_merger.cc
@@ -46,12 +46,14 @@ namespace
Singleton<TarMergerHandle>
{
typedef PaludisTarExtras * (* InitPtr) (const std::string &, const std::string &);
+ typedef void (* AddDirPtr) (PaludisTarExtras * const, const std::string &, const std::string &);
typedef void (* AddFilePtr) (PaludisTarExtras * const, const std::string &, const std::string &);
typedef void (* AddSymPtr) (PaludisTarExtras * const, const std::string &, const std::string &, const std::string &);
typedef void (* CleanupPtr) (PaludisTarExtras * const);
void * handle;
InitPtr init;
+ AddDirPtr add_dir;
AddFilePtr add_file;
AddSymPtr add_sym;
CleanupPtr cleanup;
@@ -72,6 +74,10 @@ namespace
if (! init)
throw MergerError("Unable to init from libpaludistarextras due to error '" + stringify(::dlerror()) + "' from dlsym");
+ add_dir = STUPID_CAST(AddDirPtr, ::dlsym(handle, "paludis_tar_extras_add_dir"));
+ if (! add_dir)
+ throw MergerError("Unable to add_dir from libpaludistarextras due to error '" + stringify(::dlerror()) + "' from dlsym");
+
add_file = STUPID_CAST(AddFilePtr, ::dlsym(handle, "paludis_tar_extras_add_file"));
if (! add_file)
throw MergerError("Unable to add_file from libpaludistarextras due to error '" + stringify(::dlerror()) + "' from dlsym");
@@ -130,6 +136,16 @@ TarMerger::TarMerger(const TarMergerParams & p) :
TarMerger::~TarMerger() = default;
void
+TarMerger::on_dir_main(bool is_check, const FSPath & src, const FSPath & dst)
+{
+ if (is_check)
+ return;
+
+ track_install_dir(src, dst / src.basename());
+ (*TarMergerHandle::get_instance()->add_dir)(_imp->tar, stringify(src), strip_leading(stringify(dst / src.basename()), "/"));
+}
+
+void
TarMerger::on_file_main(bool is_check, const FSPath & src, const FSPath & dst)
{
if (is_check)
@@ -146,11 +162,6 @@ TarMerger::add_file(const FSPath & src, const FSPath & dst)
}
void
-TarMerger::on_dir_main(bool, const FSPath &, const FSPath &)
-{
-}
-
-void
TarMerger::on_sym_main(bool is_check, const FSPath & src, const FSPath & dst)
{
if (is_check)
diff --git a/paludis/tar_merger.hh b/paludis/tar_merger.hh
index ea6e5e1b8..009e2f4b6 100644
--- a/paludis/tar_merger.hh
+++ b/paludis/tar_merger.hh
@@ -79,6 +79,7 @@ namespace paludis
virtual void add_file(const FSPath &, const FSPath &);
+ virtual void track_install_dir(const FSPath &, const FSPath &) = 0;
virtual void track_install_file(const FSPath &, const FSPath &) = 0;
virtual void track_install_sym(const FSPath &, const FSPath &) = 0;
@@ -86,8 +87,8 @@ namespace paludis
TarMerger(const TarMergerParams &);
~TarMerger();
- void on_file_main(bool is_check, const FSPath &, const FSPath &) override;
void on_dir_main(bool is_check, const FSPath &, const FSPath &) override;
+ void on_file_main(bool is_check, const FSPath &, const FSPath &) override;
void on_sym_main(bool is_check, const FSPath &, const FSPath &) override;
void prepare_install_under() override;
diff --git a/paludis/tar_merger_TEST.cc b/paludis/tar_merger_TEST.cc
index 933609074..c01842b7c 100644
--- a/paludis/tar_merger_TEST.cc
+++ b/paludis/tar_merger_TEST.cc
@@ -72,6 +72,10 @@ namespace
{
}
+ void track_install_dir(const FSPath &, const FSPath &) override
+ {
+ }
+
void track_install_file(const FSPath &, const FSPath &) override
{
}
@@ -114,7 +118,7 @@ TEST(TarMerger, Works)
ASSERT_TRUE(output.stat().is_regular_file());
EXPECT_TRUE(output.stat().file_size() > 100);
- Process untar_process(ProcessCommand({"sh", "-c", "tar xf ../simple.tar 2>&1"}));
+ Process untar_process(ProcessCommand({"sh", "-c", "tar xpf ../simple.tar 2>&1"}));
untar_process.chdir(FSPath("tar_merger_TEST_dir/simple_extract"));
ASSERT_EQ(0, untar_process.run().wait());
@@ -127,6 +131,9 @@ TEST(TarMerger, Works)
EXPECT_TRUE((FSPath("tar_merger_TEST_dir") / "simple_extract" / "subdir" / "subsubdir" / "script").stat().is_regular_file());
EXPECT_TRUE(0 != ((FSPath("tar_merger_TEST_dir") / "simple_extract" / "subdir" / "subsubdir" / "script").stat().permissions() & S_IXUSR));
+ EXPECT_TRUE((FSPath("tar_merger_TEST_dir") / "simple_extract" / "subdir" / "subsubdir").stat().is_directory());
+ EXPECT_EQ((FSPath("tar_merger_TEST_dir") / "simple_extract" / "subdir" / "subsubdir").stat().permissions() & 0xFFF, S_IRWXU | S_IRWXG | S_IRWXO);
+
EXPECT_TRUE((FSPath("tar_merger_TEST_dir") / "simple_extract" / "goodsym").stat().is_symlink());
EXPECT_EQ("file", (FSPath("tar_merger_TEST_dir") / "simple_extract" / "goodsym").readlink());
diff --git a/paludis/tar_merger_TEST_setup.sh b/paludis/tar_merger_TEST_setup.sh
index a37f9b27b..0312e8238 100755
--- a/paludis/tar_merger_TEST_setup.sh
+++ b/paludis/tar_merger_TEST_setup.sh
@@ -18,6 +18,8 @@ Woohoo
END
chmod +x simple/subdir/subsubdir/script
+chmod 777 simple/subdir/subsubdir
+
ln -s file simple/goodsym
ln -s nothing simple/badsym
diff --git a/paludis/util/process.cc b/paludis/util/process.cc
index 0174cdb21..44ced0960 100644
--- a/paludis/util/process.cc
+++ b/paludis/util/process.cc
@@ -98,7 +98,7 @@ namespace paludis
argv_ptrs.clear();
}
};
-};
+}
namespace
{
@@ -429,6 +429,7 @@ ProcessCommand::exec_prepare()
namespace
{
+ PALUDIS_ATTRIBUTE((noreturn))
void
send_error(int err_fd, const ExecError & e)
{
@@ -1183,8 +1184,6 @@ Process::run()
}
_imp->command.exec(err_fd);
-
- _exit(1);
}
else
{
diff --git a/paludis/util/process_TEST.cc b/paludis/util/process_TEST.cc
index f872836c5..6b942cd6b 100644
--- a/paludis/util/process_TEST.cc
+++ b/paludis/util/process_TEST.cc
@@ -345,6 +345,6 @@ TEST(Process, SendFDFixed)
TEST(Process, ExecError)
{
Process process(ProcessCommand({"paludis-nonexisting-command"}));
- EXPECT_THROW({ process.run(); }, ProcessError);
+ EXPECT_THROW({ auto ph = process.run(); }, ProcessError);
}
diff --git a/ruby/CMakeLists.txt b/ruby/CMakeLists.txt
index 1bcbed1a1..a200fe50d 100644
--- a/ruby/CMakeLists.txt
+++ b/ruby/CMakeLists.txt
@@ -28,6 +28,9 @@ if(ENABLE_RUBY)
target_include_directories(libpaludisruby SYSTEM
PRIVATE
${RUBY_INCLUDE_DIRS})
+ if(CXX_SUPPORTS_FDECLSPEC)
+ target_compile_options(libpaludisruby PRIVATE -fdeclspec)
+ endif()
target_link_libraries(libpaludisruby
PRIVATE
libpaludis
@@ -40,6 +43,9 @@ if(ENABLE_RUBY)
target_include_directories(Paludis SYSTEM
PRIVATE
${RUBY_INCLUDE_DIRS})
+ if(CXX_SUPPORTS_FDECLSPEC)
+ target_compile_options(Paludis PRIVATE -fdeclspec)
+ endif()
target_link_libraries(Paludis
PRIVATE
libpaludisruby)
diff --git a/src/clients/cave/CMakeLists.txt b/src/clients/cave/CMakeLists.txt
index 410119d12..2dd8cefaa 100644
--- a/src/clients/cave/CMakeLists.txt
+++ b/src/clients/cave/CMakeLists.txt
@@ -86,7 +86,7 @@ paludis_add_library(libcave
"${CMAKE_CURRENT_SOURCE_DIR}/resolve_common.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/resume_data.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/size_common.cc")
-add_dependencies(libcave libpaludisargs_SE libpaludisresolver_SE libpaludisutil_SE)
+add_dependencies(libcave libpaludis_SE libpaludisargs_SE libpaludisutil_SE libpaludisresolver_SE)
paludis_add_library(libcavematchextras
"${CMAKE_CURRENT_SOURCE_DIR}/match_extras.cc")