path: root/src
AgeCommit message (Collapse)AuthorLines
2022-11-08cave: Remove redundant StringSetArgOptions parameters (NFC)HEADmasterAvatar Marvin Schmidt -14/+7
2022-11-08cave: Use IteratorRange<T>::empty() (NFC)Avatar Marvin Schmidt -28/+28
2022-11-08cave: Consistently use size() on lhs in comparisons (NFC)Avatar Marvin Schmidt -20/+20
2022-11-08cave: cmd_import: Use IteratorRange<T>::size() (NFC)Avatar Marvin Schmidt -6/+4
2022-11-08cave: Use IteratorRange<T>::size() instead of capped_distanceAvatar Marvin Schmidt -3/+3
There's not much benefit in using `capped_distance` if any. Replace it with IteratorRange<T>::size() to make the code simpler and more readable
2022-11-08cave: Use IteratorRange<T>::size() instead of std::distance() (NFC)Avatar Marvin Schmidt -28/+27
2022-11-08cave: cmd_graph_jobs: Assure graphviz file is written before running graph ↵Avatar Marvin Schmidt -2/+6
program SafeOFStream uses a buffer, so we can't really be sure the contents are written to file completely before the stream object is destroyed. Assure this by limiting its scope
2022-11-08cave: cmd_graph_jobs: Simplify control flow (NFC)Avatar Marvin Schmidt -9/+20
There are two different cases: non-empty basename: - write graphviz to ${basename}.graphviz - create ${basename}.${format} if `--graph-jobs-format` was given empty basename: - just print graphviz to stdout Instead of checking whether we are supposed to write/have written the graphviz to a file in three places handle the two cases separately to make it more readable
2022-11-08cave: cmd_graph_jobs: Fix graphviz outputAvatar Marvin Schmidt -3/+3
- Add a comma and whitespace after install job labels - Remove redundant whitespace in job dependency attributes Before: job543 [ label="paludis:0::arbor -> pbins-amd64"shape=octagon, fillcolor=aquamarine3, style=filled ] job543 -> job542 [ color=crimson ] job543 -> job527 [ color=indianred style=dotted ] job543 -> job529 [ color=indianred style=dotted ] After: job543 [ label="paludis:0::arbor -> pbins-amd64", shape=octagon, fillcolor=aquamarine3, style=filled ] job543 -> job542 [ color=crimson ] job543 -> job527 [ color=indianred style=dotted ] job543 -> job529 [ color=indianred style=dotted ]
2022-11-08cave: cmd_graph_jobs: Remove else after return (NFC)Avatar Marvin Schmidt -9/+8
2022-11-08cave: Give loop variables better names (NFC)Avatar Marvin Schmidt -314/+313
2022-11-08Add MetadataKeyHolder::metadataAvatar Marvin Schmidt -20/+14
2022-11-08Add PackageID::masks and PackageID::overridden_masksAvatar Marvin Schmidt -34/+22
2022-11-08tree: Convert to range-based for loops (NFC)Avatar Marvin Schmidt -418/+326
Carried out by clang-tidy's modernize-loop-convert check
2022-11-08cave: cmd_print_ids: Give variable a better name (NFC)Avatar Marvin Schmidt -10/+10
Rename the member variable `mask` which denotes the mask we filter for to `mask_filter` so that we can use `mask` when converting to range-based for loops
2022-11-08cave: Use range-based loop to iterate over commandline parametersAvatar Marvin Schmidt -31/+24
2022-11-08cave: Use StringSequenceArg::args()Avatar Marvin Schmidt -3/+2
2022-11-08cave: Use range-based for loops for StringSetArgAvatar Marvin Schmidt -110/+65
Commit e74f4919aa0f ("use range based for loops more pervasively (NFC)") introduced StringSetArg::args() to allow iteration using range-based for loops. Make use of it
2022-11-08cave: Use Environment::repositories() for range based iteration (NFC)Avatar Marvin Schmidt -21/+13
Commit 6b0e48f888cf ("paludis: c++11-ify repository iteration") introduced `Environment::repositories()` to allow range based iteration of repositories
2022-11-08cave: cmd_print_unused_distfiles: Make loop variable constAvatar Marvin Schmidt -1/+1
2022-11-08cave: cmd_print_unused_distfiles: Remove redundant parentheses (NFC)Avatar Marvin Schmidt -1/+1
2022-10-10Isolate declarations (NFC)Avatar Marvin Schmidt -25/+57
2022-10-10Use std::string::find(char) where appropriateAvatar Marvin Schmidt -1/+1
Refactoring done by clang-tidy's `performance-faster-string-find` check
2022-10-10cave: Remove unused using declarations (NFC)Avatar Marvin Schmidt -38/+0
2022-10-10cave: resolve_common: Silence clang-tidy false positive about a dead store (NFC)Avatar Marvin Schmidt -0/+1
clang-tidy's clang-analyzer-deadcode.DeadStores check emits a false positive thinking that the `first` variable is never read: > src/clients/cave/resolve_common.cc:1128:25: error: Value stored to 'first' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors] > first = false; > ^ > src/clients/cave/resolve_common.cc:1128:25: note: Value stored to 'first' is never read In case `resolver->resolve()` throws a `SuggestRestart` exception, the `break` isn't reached and the next loop iteration is started where the state of the `first` is read
2022-10-10cave: cmd_display_resolution: Remove dead storeAvatar Marvin Schmidt -1/+1
> src/clients/cave/cmd_display_resolution.cc:1719:13: error: Value stored to 'need_comma' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors] > need_comma = true; > ^
2022-10-04cave: resolve_common: Remove redundant semicolon (NFC)Avatar Marvin Schmidt -1/+1
2021-11-18build: Use cmake's FindSQLite3 moduleAvatar Heiko Becker -1/+2
instead of a custom one we have to maintain. Raises the required cmake version to 3.14.0 which shouldn't be a problem because cmake.exlib on Exherbo already requires 3.16.0 and it was released over two and a half years ago.
2021-09-17build: libcave depends on libpaludis{,util}_SEAvatar Marvin Schmidt -1/+1
[ 3%] Building CXX object src/clients/cave/CMakeFiles/libcave.dir/colour_pretty_printer.cc.o In file included from /home/marv/devel/paludis/paludis/pretty_printer.hh:25:0, from /home/marv/devel/paludis/paludis/formatted_pretty_printer.hh:25, from /home/marv/devel/paludis/src/clients/cave/colour_pretty_printer.hh:23, from /home/marv/devel/paludis/src/clients/cave/colour_pretty_printer.cc:20: /home/marv/devel/paludis/paludis/util/fs_path-fwd.hh:48:38: fatal error: paludis/util/fs_path-se.hh: No such file or directory compilation terminated. make[7]: *** [src/clients/cave/CMakeFiles/libcave.dir/build.make:63: src/clients/cave/CMakeFiles/libcave.dir/colour_pretty_printer.cc.o] Error 1 [ 6%] Building CXX object src/clients/cave/CMakeFiles/libcave.dir/colour_pretty_printer.cc.o In file included from /home/marv/devel/paludis/paludis/pretty_printer.hh:27:0, from /home/marv/devel/paludis/paludis/formatted_pretty_printer.hh:25, from /home/marv/devel/paludis/src/clients/cave/colour_pretty_printer.hh:23, from /home/marv/devel/paludis/src/clients/cave/colour_pretty_printer.cc:20: /home/marv/devel/paludis/paludis/package_id-fwd.hh:59:36: fatal error: paludis/package_id-se.hh: No such file or directory
2020-10-16modernize: Mark overriding functions as suchAvatar Marvin Schmidt -204/+204
Done using clang-tidy's `modernize-use-override` check
2018-02-04build: fix compile against libc++ using clangAvatar Bjorn Pagen -0/+1
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>
2017-02-19build: unbreak parallel makefile/docs generationAvatar Benedikt Morbach -4/+16
for real this time. See also http://stackoverflow.com/a/26211863 (did I mention that I hate cmake?) Change-Id: I7e58a7d0709543013b2d38772a277f4773cbe28a
2017-02-19Revert "build: make asciidoc output to a tmp file"Avatar Benedikt Morbach -6/+2
This reverts commit 572e65d9cbef0c05e10159723ccd21ff5c873d46.
2017-02-17build: make asciidoc output to a tmp fileAvatar Marc-Antoine Perennou -2/+6
Change-Id: I189806f930422ed01b4f89804386d1ce3db92da5 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> Reviewed-on: https://galileo.mailstation.de/gerrit/8362 Reviewed-by: Saleem Abdulrasool <compnerd@compnerd.org>
2017-01-29cave: use more range based for loopsAvatar Saleem Abdulrasool -53/+33
Convert a number of for loops to range based form. NFC.
2017-01-18build: add missing dependencies on generated headersAvatar Bo Ørsted Andresen -1/+1
These depend upon libpaludisutils' generated headers. Found by the Jenkins build bot.
2017-01-16build: liboutput depends on libpaludisutil_SEAvatar Heiko Becker -0/+1
Found by Jenkins: https://galileo.mailstation.de/jenkins/job/stage_amd64/1051/console
2017-01-16paludis: c++11-ify repository iterationAvatar Saleem Abdulrasool -28/+20
Add a `repositories` in `Environment` which provides an iterator range for the repositories, allowing C++11 style range based iteration.
2016-12-31cave: range-loop-ify execute-resolutionAvatar Saleem Abdulrasool -24/+17
Use C++11 range based loops. NFC
2016-12-28format package: %I as shorthand for %c/%p%:%sAvatar Łukasz P. Michalik -22/+17
Change-Id: I26c70aca17e07a8a71cc6fa4431c40580df07003 Reviewed-on: https://galileo.mailstation.de/gerrit/7777 Reviewed-by: Bo Ørsted Andresen <zlin@exherbo.org>
2016-12-16build: Add missing linkage between shared librariesAvatar Michał Górny -0/+1
2016-12-12build: more explicit SE dependenciesAvatar Saleem Abdulrasool -0/+1
Thanks to mgorny, Caelian, and heirecka for reporting these.
2016-12-11build: Export -DENABLE_SEARCH_INDEX for the right targetAvatar Heiko Becker -1/+1
It is used in src/clients/cave/search_extras_handle.{cc,hh} which is built by libcave, not libcavesearchextras.
2016-12-07introduce and use an iterator range in BrokenLinkageFinderAvatar Saleem Abdulrasool -25/+15
Add some convenience helpers for iteration to BrokenLinkageFinder. This allows us to use range based for loops in cave fix-linkage.
2016-12-07cave: adjust whitespaceAvatar Saleem Abdulrasool -15/+8
2016-12-07cave: range base loopify (NFC)Avatar Saleem Abdulrasool -7/+6
2016-12-05build: Fix logic error with PALUDIS_COLOUR_PINKAvatar Heiko Becker -2/+2
Setting PALUDIS_COLOUR_PINK to FALSE lead to unexpected colours.
2016-12-05build: Install bash scripts as 'PROGRAMS'Avatar Heiko Becker -1/+1
...to make them executable.
2016-12-04use range based for loops more pervasively (NFC)Avatar Saleem Abdulrasool -220/+160
2016-11-30build: remove autotools based buildAvatar Saleem Abdulrasool -314/+0
There can be only one!