aboutsummaryrefslogtreecommitdiff
path: root/paludis
AgeCommit message (Collapse)AuthorLines
5 daysmodernize: Mark overriding functions as suchHEADmasterAvatar Marvin Schmidt -1930/+1930
Done using clang-tidy's `modernize-use-override` check
2020-02-19emagicdocs: Also install CONTRIBUTING* filesAvatar Heiko Becker -1/+1
It is quite common for projects to have such a file and it (hopefully) is a good start when you're looking for information where and how to submit a patch.
2019-10-24Use the versioned component and imported target for boost pythonAvatar Heiko Becker -1/+1
2019-10-22hooker_TEST: make ordering/py_hook Python3 compatibleAvatar Marvin Schmidt -1/+1
Otherwise the test fails with the following error when using Python 3: 13: [ RUN ] Hooker.Ordering 13: paludis@1565848657: [WARNING hook.python.failure] Hook 'hooker_TEST_dir/ordering/py_hook.py': running hook_run_ordering function failed: 'Traceback (most recent call last): 13: File "hooker_TEST_dir/ordering/py_hook.py", line 2, in hook_run_ordering 13: file("hooker_TEST_dir/ordering.out", "a").write("py_hook\n") 13: NameError: name 'file' is not defined' 13: ../paludis/hooker_TEST.cc:76: Failure 13: Expected equality of these values: 13: 0 13: result.max_exit_status() 13: Which is: 1 13: ../paludis/hooker_TEST.cc:83: Failure 13: Expected equality of these values: 13: "e\nc\nf\nd\nb\na\npy_hook\ng\ni\nh\nsohook\nk\nj\n" 13: line 13: Which is: "e\nc\nf\nd\nb\na\ng\ni\nh\nsohook\nk\nj\n" 13: With diff: 13: @@ -5,5 @@ 13: b 13: a 13: -py_hook 13: g 13: i 13: 13: [ FAILED ] Hooker.Ordering (184 ms)
2019-10-22python: Normalize exceptionsAvatar Marvin Schmidt -0/+1
The python 3 incompatible call of `file` in the python hook caused an exception. Trying to get the traceback failed because the exception isn't normalized: 13: [ RUN ] Hooker.Ordering 13: paludis@1565848332: [WARNING hook.python.traceback_failed] In thread ID '13623': 13: ... When triggering hook 'ordering': 13: ... When running hook 'hooker_TEST_dir/ordering/py_hook.py' for hook 'ordering': 13: ... When getting traceback 13: ... Hook 'hooker_TEST_dir/ordering/py_hook.py': _get_traceback(): traceback.format_exception failed 13: paludis@1565848332: [WARNING hook.python.failure] Hook 'hooker_TEST_dir/ordering/py_hook.py': running hook_run_ordering function failed: 'Getting traceback failed' 13: paludis@1565848332: [WARNING hook.python.failure] Hook 'hooker_TEST_dir/ordering/py_hook.py' failed unexpectedly: 'Traceback (most recent call last): 13: File "/usr/x86_64-pc-linux-gnu/lib/python3.7/traceback.py", line 121, in format_exception 13: type(value), value, tb, limit=limit).format(chain=chain)) 13: File "/usr/x86_64-pc-linux-gnu/lib/python3.7/traceback.py", line 476, in __init__ 13: if (exc_value and exc_value.__cause__ is not None 13: AttributeError: 'str' object has no attribute '__cause__' 13: 13: The above exception was the direct cause of the following exception: 13: 13: Traceback (most recent call last): 13: File "/home/marv/devel/paludis-worktrees/cross/python/paludis_output_wrapper.py", line 101, in restore_prefix 13: restore("both") 13: File "/home/marv/devel/paludis-worktrees/cross/python/paludis_output_wrapper.py", line 80, in restore 13: if len(stderr_cache): 13: SystemError: <built-in function len> returned a result with an error set' 13: ../paludis/hooker_TEST.cc:76: Failure 13: Expected equality of these values: 13: 0 13: result.max_exit_status() 13: Which is: 1 13: ../paludis/hooker_TEST.cc:83: Failure 13: Expected equality of these values: 13: "e\nc\nf\nd\nb\na\npy_hook\ng\ni\nh\nsohook\nk\nj\n" 13: line 13: Which is: "e\nc\nf\nd\nb\na\ng\ni\nh\nsohook\nk\nj\n" 13: With diff: 13: @@ -5,5 @@ 13: b 13: a 13: -py_hook 13: g 13: i 13: 13: [ FAILED ] Hooker.Ordering (195 ms)
2019-04-18tests: fix BASH_COMPAT tests with bash 5Avatar Marc-Antoine Perennou -2/+2
Bash now overrides this with a new value with no dot Fixes #2 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2019-03-11tests: Allow Linux 5.xAvatar Heiko Becker -1/+1
2018-12-22build: Generate an import target for Jansson and use itAvatar Heiko Becker -4/+1
2018-07-23Adjust the stripper for file>=5.33 and PIE executablesAvatar Heiko Becker -1/+2
It can recognize executables built with PIE now, which are just shared objects with the executable bit set (and were recognized by stripper via the "shared object" text returned from earlier versions). With file 5.32: $ file .../file: ".../file: ELF 64-bit LSB shared object" $ file .../libmagic.so.1.0.0: ".../libmagic.so.1.0.0: ELF 64-bit LSB shared object" With file 5.33: $ file .../file: ".../file: ELF 64-bit LSB pie executable x86-64" $ file .../libmagic.so.1.0.0: ".../libmagic.so.1.0.0: ELF 64-bit LSB pie executable x86-64"
2018-06-13process.cc: don't allocate after forkAvatar Johannes Nixdorf -176/+567
In multithreaded processes POSIX specifies that after fork only AS-safe functions may be called. [1] This fixes a race condition I observed in "cave generate-metadata" with musl libc. This does happen regularily with musl libc, but the general problem also affects glibc. (test [2] if you don't believe me - with glibc it happens more rarely and causes a deadlock inside of malloc locks instead of a crash). This does not fix these problems for as_main_process, as there never will be an exec in the child process that way, which makes it impossible to do safely this way. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html [2]: https://shadowice.org/~mixi/examples/never-fork-and-malloc-in-multiple-threads.c
2018-04-09set USER and LOGNAME when running with userprivAvatar Benedikt Morbach -1/+4
some builds/tests get confused when running as paludisbuild with USER=root.
2018-04-09add reduced_username() to EnvironmentAvatar Benedikt Morbach -1/+28
2018-02-04build: fix compile against libc++ using clangAvatar Bjorn Pagen -1/+4
added several includes, such as time.h, iostream, and string, as libc++ requires explicit including of these files. tr1/memory is replaced with POSIX defined memory Change-Id: Id859f33f78343d814f47b1e1e34a3dbe23d174e3 Reviewed-on: https://galileo.mailstation.de/gerrit/11152 Reviewed-by: Saleem Abdulrasool <compnerd@compnerd.org>
2018-01-29use correct type when stringifying whirlpool checksumAvatar Łukasz P. Michalik -1/+1
Patch-URL: https://paste.pound-python.org/raw/3MLCZhW0maomtLa2IOy5/ Change-Id: I7d56ff2388c5f9e4455bf830ef926500431ad9d2 Reviewed-on: https://galileo.mailstation.de/gerrit/8793 Reviewed-by: Saleem Abdulrasool <compnerd@compnerd.org>
2017-08-08resolver: use range based for loops (NFC)Avatar Saleem Abdulrasool -14/+10
Convert a few loops to range based for loops instead of standard for loops.
2017-08-07fuzzy-finder: convert to c++11, hoist checkAvatar Saleem Abdulrasool -8/+9
Hoist the length check out of the loop. This avoids an unnecessary call each iteration through the loop. Use some C++11 constructs to simplify the logic a bit.
2017-06-11test: silence a __attribute__((__unused_return_value__)) checkAvatar Saleem Abdulrasool -1/+1
2017-06-11resolver: add fallthrough attribute to silence -Wimplicit-fallthroughAvatar Saleem Abdulrasool -2/+2
2017-06-10paludis: add missing include (NFC)Avatar Saleem Abdulrasool -0/+1
2017-06-10util: sort includes (NFC)Avatar Saleem Abdulrasool -5/+5
2017-05-23disallow unexported phasesAvatar Benedikt Morbach -3/+9
avoids bugs and confusion that happen occasionally when phases are accidentally left around but not exported so they don't do anything. This is also the first step if we want to make the exporting automatic in the future to make sure that doesn't suddenly activate previously unexported phases. Change-Id: I4f7c5de4974e547c2596d138839dd41738d61e68
2017-05-04Add missing includes to fix building with libstdc++7Avatar Heiko Becker -0/+2
2017-01-18build: add missing dependencies on generated headersAvatar Bo Ørsted Andresen -0/+2
These depend upon libpaludisutils' generated headers. Found by the Jenkins build bot.
2017-01-16paludis: c++11-ify repository iterationAvatar Saleem Abdulrasool -134/+107
Add a `repositories` in `Environment` which provides an iterator range for the repositories, allowing C++11 style range based iteration.
2017-01-09build: *repository depend on libpaludisutil_SEAvatar Heiko Becker -0/+3
2016-12-21build: libpaludisrepositoryrepository depends on libpaludisutil_SEAvatar Heiko Becker -0/+1
Found by Jenkins: https://galileo.mailstation.de/jenkins/job/stage_x86/954/console
2016-12-16build: Add missing linkage between shared librariesAvatar Michał Górny -0/+14
2016-12-15build: Add missing linkage for Python libsAvatar Michał Górny -0/+1
2016-12-14Mark loop variable const (NFC)Avatar Marvin Schmidt -1/+1
Change-Id: Ib7fb03ca19f60114b54ec928d2134d205e693819
2016-12-14Remove some dead code (NFC)Avatar Marvin Schmidt -13/+0
There is no MetadataSpecTreeKey<SetSpecTree> Change-Id: If17a855e700408c8b23a70af375fc01e5544e309
2016-12-14Add missing exception specification to declaration (NFC)Avatar Marvin Schmidt -1/+1
[302/1198] Building CXX object paludis/CMakeFiles/libpaludis.dir/ipc_output_manager.cc.o /home/marv/devel/paludis/paludis/ipc_output_manager.cc:128:19: warning: function previously declared with an implicit exception specification redeclared with an explicit exception specification [-Wimplicit-exc eption-spec-mismatch] IPCOutputManager::~IPCOutputManager() noexcept(false) ^ /home/marv/devel/paludis/paludis/ipc_output_manager.hh:48:13: note: previous declaration is here ~IPCOutputManager(); ^ 1 warning generated. Change-Id: Idc9f7cbf953230449ff273468b90461328d9b4fb
2016-12-14build: Install headers generated from .se filesAvatar Marvin Schmidt -7/+8
Change-Id: I66a5594bbce99d6fae533f967af767c9cede3457
2016-12-14build: Install missing fwd/impl headersAvatar Marvin Schmidt -7/+140
Change-Id: I68dcabbd37a414b90b8d0070140fb83964ea985f
2016-12-13repositories: ensure that the destructor is materialisedAvatar Saleem Abdulrasool -0/+1
2016-12-13build: Fix yet another dependency issueAvatar Heiko Becker -0/+1
Found by Jenkins in https://galileo.mailstation.de/jenkins/job/stage_x86/950/console
2016-12-13build: Use the imported target for linking to pthreadAvatar Heiko Becker -4/+4
Our required cmake version is new enough (>=3.1) and usage of the imported target is recommended by cmake's documentation [1]. Furthermore, according to the docs THREADS_PREFER_PTHREAD_FLAG can only be used with the imported target. [1] https://cmake.org/cmake/help/v3.7/module/FindThreads.html
2016-12-12build: more explicit SE dependenciesAvatar Saleem Abdulrasool -2/+3
Thanks to mgorny, Caelian, and heirecka for reporting these.
2016-12-11repositories: avoid a shadowing warningAvatar Saleem Abdulrasool -6/+4
The string is used in one place, inline it. It is passed as an argument and the life time will be extended around the call.
2016-12-11paludis: address -Wterminate warning from gcc 6Avatar Saleem Abdulrasool -13/+17
In C++11, destructors are `noexcept` by default. However, some of the destructors in paludis throw. Annotate these functions as `noexcept(false)`.
2016-12-11build: libpaludissohooks_TEST depends on libpaludisutil_SEAvatar Heiko Becker -1/+1
2016-12-10paludis: use pre-tokenised strings in BrokenLinkageConfigurationAvatar Saleem Abdulrasool -19/+24
Rather than split the strings when inserting, split them in the storage.
2016-12-10paludis: range loop conversion for BrokenLinkageConfigurationAvatar Saleem Abdulrasool -25/+28
2016-12-10build: resolvertest uses google-test, SE source dependencyAvatar Saleem Abdulrasool -31/+33
The test was previously built as part of the check target, which hid the fact that it was not conditionalised on gtest tests being enabled. Add the guard for that. Add a dependency on libpaludisutil_SE on the support library. It uses path-se.hh.
2016-12-08resolver: whitespace, style cleanupsAvatar Saleem Abdulrasool -115/+67
Avoid else return, use range based loop. Rename resolvent from `q` to `r`.
2016-12-08re-add builtin_tidyuprm.bash to exheres-0 CmakeLists.txtAvatar Benedikt Morbach -0/+1
Change-Id: I8acf352cc1effa69088570be8cd823f5565d58fa
2016-12-07paludis: more range loop usage (NFC)Avatar Saleem Abdulrasool -56/+53
2016-12-07introduce and use an iterator range in BrokenLinkageFinderAvatar Saleem Abdulrasool -11/+30
Add some convenience helpers for iteration to BrokenLinkageFinder. This allows us to use range based for loops in cave fix-linkage.
2016-12-07paludis: avoid return after else (NFC)Avatar Saleem Abdulrasool -4/+4
2016-12-06Fix build with -Wl,--as-neededAvatar Heiko Becker -1/+2
2016-12-06Only build resolver_TEST_promote_binaries if tests are enabledAvatar Heiko Becker -3/+2
Otherwise cmake complains when -DENABLE_GTEST=FALSE is passed, because it doesn't know the target.