summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-01-17 00:08:16 +0100
committerJulian Andres Klode <jak@debian.org>2017-01-17 01:43:50 +0100
commit6ede8952f55a1bc356b42b1adc7b9bd504af943c (patch)
tree4cc3971fe0ad8ca7fc789f21033e4a1f89585d77 /doc
parentc5b8afab0f409b06a63599ff1c5acb433f3957d4 (diff)
Read dpkg tables to handle architecture wildcards
Our implementation of wildcards was rudimentary. It worked for some common ones, but it was also broken: For example, armel matched any-armel, but should match any-arm. With this commit, we load the correct tables from dpkg. Supported are both triplets and quadruplet tables (the latter introduced in dpkg 1.18.11). There are some odd things we have to deal with in the cache filter for historical and API reasons: * The character "*" must be accepted as an alternative to any - in fact it may appear anywhere in the wildcard as we also allow fnmatch() style wildcard matching on the commandline. * The code might get passed an arch with a minus at the end, for example the cmdline "install apt:any-arm-" will first try to check if any-arm- is a valid architecture. We deal with this by rejecting any wildcard ending in a minus. * Triplets are actually implemented by extending them to faux quadruplets - by prepending a "base" component for the architecture tuple, and "any" if there is a wildcard component. Once we have constructed a wildcard, it is transformed into an fnmatch() expression for historical reasons. In the future, we should really get a tuple class and implement matching in a better, more explicit way. This does for now though - it passes all the test cases and accepts all things it should accept. Closes: #748936 Thanks: James Clarke <jrtc27@jrtc27.com> for the initial patch
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/configure-index5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index 7ce5aef51..653bdec1e 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -751,3 +751,8 @@ translation::compress "<STRING>";
sources::extensions "<STRING>";
packages::extensions "<STRING>";
dir::filelistdir "<STRING>";
+
+// Internal code.
+dir::dpkg::tupletable "<FILE>";
+dir::dpkg::triplettable "<FILE>";
+dir::dpkg::cputable "<FILE>";