Commits on Source (29)
-
Joerg Jaspert authored
-
Niels Thykier authored
This will make .gitignore exclude *most* of the artifacts from the tests fixtures package builds. It still leaves package build and staging directories behind (e.g. debian/<pkg>/) because I had no good way of telling them apart from a "wanted" subdirectory. Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
-
Ansgar authored
Merge remote-tracking branches 'nthykier/update-gitignore', 'nthykier/cover-all-the-things' and 'nthykier/patch-1'
-
Niels Thykier authored
Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Ansgar authored
Merge remote-tracking branches 'nthykier/integration-tests-0002-remove-dup-import-key-calls' and 'nthykier/integration-test-with-minimal-dinstall'
-
Joerg Jaspert authored
-
Niels Thykier authored
This change is compatible with python2 and removes some 50-100 lines of "deprecation warning"-noise when trying to test dak with python3. Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
This rewrites the following statements: if a in b.keys(): to if a in b: At the moment, both variants are cheap (i.e. O(1)) operations. However, the 2to3 will blindly rewrite the former into a more expensive variant, namely: if a in list(b.keys()): Sadly, this becomes O(|b|) as __contains__ on a list is a lot more expensive than it is on a directory/set-like structure. Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
They are compatible with python2 + python3 and the 2to3 rewrite will do a similar transformation. However, with this rewrite, we can improve the generated results a bit to avoid some suboptimal cases while also reducing the delta for the py2 and py3 variants of dak. As an example: filelist = [] for ... in ...: filelist += map(lambda x: os.path.join(r, x), filter(lambda x: x.endswith('.changes'), f)) Here 2to3 offers the following rewrite: filelist = [] for ... in ...: filelist += [os.path.join(r, x) for x in [x for x in f if x.endswith('.changes')]] But this is performance-wise much better written as: filelist = [] for ... in ...: filelist.extend(os.path.join(r, x) for x in f if x.endswith('.changes')) The original code and the 2to3 variant produces a lot of temporary lists only to discard them again (in python2 filter + map generates a list each). In the optimized variant, we avoid all the temporary lists by using a generator-comprehension. Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
This commit aims to pre-empty some of the 2to3 delta while also using more concise constructs. Examples include: y = x.keys() y.sort(...) is rewritten into: y = sorted(x.keys(), ...) (Except in one case, where we really wanted "max" rather than "sort".) Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
At the moment, most "dak admin" subcommands implement the logic in the form of: s = get_suite(s_n, ...) if s is None: die("...") But the callers do not always agree on whether s_n to have a ".lower()" or not. With this, change we unify this code flow so all of them now use the new "get_suite_or_die", which will always "lower()" the suite name plus handle this check for us. A few calls that were missing the "if s is None: die()" code has been migrated as well to fix some errors when the code operated on the None object. Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Niels Thykier authored
Signed-off-by:
Niels Thykier <niels@thykier.net>
-
Ansgar authored
Merge remote-tracking branches 'nthykier/tests-improve-debian-like-setup', 'nthykier/tests-coverages-multi-processing', 'nthykier/fix-dak-admin-s-cfg-none-error-invalid-suite', 'nthykier/tests-sign-releases' and 'nthykier/python3-test-fixes'
-
Ansgar authored
-
Ansgar authored
-
Ansgar authored
-
Ansgar authored
As the path to the copyright file `cright` wasn't sanitized, passing it as part of the command to `os.popen()` might allow command injection.
-
Ansgar authored
Creating a temporary directory, removing it and then reusing the name is not a safe operation. Instead just extract the source package to a path below the temporary directory.
-
Ansgar authored
-
Ansgar authored
-
Ansgar authored
-
Ansgar authored
-
Ansgar authored