summaryrefslogtreecommitdiff
path: root/test/libapt/configuration_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* use FileFd to parse all apt configuration filesDavid Kalnischkies2017-07-261-2/+39
| | | | | | Using different ways of opening files means we have different behaviour and error messages for them, so by the same for all we can have more uniformity for users and apt developers alike.
* ensure Cnf::FindFile doesn't return files below /dev/nullDavid Kalnischkies2016-07-191-0/+28
| | | | | | | Very unlikely, but if the parent is /dev/null, the child empty and the grandchild a value we returned /dev/null/value which doesn't exist, so hardly a problem, but for best operability we should be consistent in our work and return /dev/null always.
* do not use _apt for file/copy sources if it isn't world-accessibleDavid Kalnischkies2015-11-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | In 0940230d we started dropping privileges for file (and a bit later for copy, too) with the intend of uniforming this for all methods. The commit message says that the source will likely fail based on the compressors already – and there isn't much secret in the repository content. After all, after apt has run the update everyone can access the content via apt anyway… There are sources through which worked before which are mostly single-deb (and those with the uncompressed files available). The first one being especially surprising for users maybe, so instead of failing, we make it so that apt detects that it can't access a source as _apt and if so doesn't drop (for all sources!) privileges – but we limit this to file/copy, so the uncompress which might be needed will still fail – but that failed before this regression. We display a notice about this, mostly so that if it still fails (e.g. compressed) the user has some idea what is wrong. Closes: 805069
* add binary-specific options via Binary scopeDavid Kalnischkies2015-11-041-0/+17
| | | | | | Especially with apt now, it can be useful to set an option only for apt and not for apt-get. Using a binary-specific subtree which is merged into the root seems like a simple enough trick to achieve this.
* use Google C++ Testing Framework for libapt testsDavid Kalnischkies2014-04-161-80/+87
| | | | | | | | | | | | My commit 45df0ad2 from 26. Nov 2009 had a little remark: "The commit also includes a very very simple testapp." This was never intended to be permanent, but as usually… The commit adds the needed make magic to compile gtest statically as it is required and links it against a small runner. All previous testcase binaries are reimplemented in gtest and combined in this runner. While most code is a 1:1 translation some had to be rewritten like compareversion_test.cc, but the coverage remains the same.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+2
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* add default and override handling for Cnf::FindVectorDavid Kalnischkies2014-03-131-3/+31
| | | | | | Automatically handle the override of list options via its parent value which can even be a comma-separated list of values. It also adds an easy way of providing a default for the list.
* * lp:~mvo/apt/config-clear:Michael Vogt2013-08-151-0/+4
| | | | | | | - support Configuration.Clear() for a clear of the entire configuration Conflicts: debian/changelog
* /dev/null is a special absolute path as it has no subdirectoriesDavid Kalnischkies2012-04-231-0/+5
|
* normalize a bit by replacing // and /./ with / in FindFileDavid Kalnischkies2012-04-231-0/+13
|
* * apt-pkg/contrib/configuration.cc:David Kalnischkies2012-01-301-0/+9
| | | | | - do not stop parent transversal in FindDir if the value is empty See http://lists.debian.org/deity/2012/01/msg00053.html , too.
* merge the tests for configuration into another libapt-testDavid Kalnischkies2011-08-171-0/+78