Niels Thykier
c91cfe64ae
Reduce the number of "used-once" lists
...
Where possible, avoid creating a list only to discard immediately
afterwards. Example:
"""
for x in sorted([x for x in ...]):
...
"""
Creates a list, passes it to sorted, which generates a new list and
sorts that copy. Since sorted accepts an iterable, we can avoid the
"inner" list and just pass it a generator expression instead.
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
6c81d39c2f
Move newlyuninst to britney_util
...
Also, renamed it for consistency with the other X_uninst functions.
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
9ad010f924
Move eval_uninst to britney_util
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
680457cbec
Move write_heidi to britney_util
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
bf9362be83
Move {read,write}_nuninst to britney_util
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
1c144b3eb2
Move get_reverse_tree into britney_util
...
Rename get_reverse_tree and move it to britney_util with slightly
different arguments.
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
53012ea54b
register_reverses: factor out a[0]
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
0aa2546956
Move the package loop into register_reverses
...
By moving the package loop inside register_reverses, it will be
invoked a lot less (reducing the overhead of invoking functions).
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
5c1391da4f
Move register_reverses to britney_util
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
d9b20ef0ab
Add container filters and use it to refactor get_reverse_tree
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
9771c454b3
Move old_libraries_format to britney_util
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
6d6e735bac
Move "undo_changes" to britney_util
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago
Niels Thykier
4b33e763a0
Move same_source to separate module
...
Signed-off-by: Niels Thykier <niels@thykier.net>
11 years ago