diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-12-29 15:27:20 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-12-29 15:27:20 -0500 |
commit | b18201805c64970a9a439637beee52b981160d8e (patch) | |
tree | da21b4c2646c7ecbbfa7a2ec87453141bb13431e /dh_python | |
parent | 29ce222e43b69ee8bec4c471c2cafdb7a293068c (diff) |
stop trying to handle substvars idempotently
In the beginning, I tried to be careful to have commands that added a
substvar remove it when ran again with different options that caused it
to not be needed. However, now when I look over the code, I see 3 places
that got it right, 1 that was right but I just broke, and a dozen that
don't even try to handle this case.
Also, handling the case is hard; code that adds substvars may be complex
and calculate versioned dependencies. The removal code then has to somehow
also come up with those same exact dependency strings. It's a recipe for
nasty code and maintenance headache even if I went and fixed everything
right now.
Instead, I dropped the whole thing. Many debhelper commands make no
pretense of being idempotent anyway; it's easy and normal to call dh_prep
when starting a binary package build, with the exact purpose of not needing
to worry about idempotency.
I did leave in the delsubstvar function, as well as the option to
addsubstvar that, confusingly, causes an item to be removed. Just for
library compatability reasons.
Diffstat (limited to 'dh_python')
-rwxr-xr-x | dh_python | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -135,8 +135,6 @@ use constant SO_MODULE_NONSTANDARD => 16; foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp = tmpdir($package); - delsubstvar($package, "python:Depends"); - my @dirs = ("usr/lib/site-python", "usr/lib/$package", "usr/share/$package", "usr/lib/games/$package", "usr/share/games/$package", @ARGV ); my @dirs_so = ("usr/lib/site-python", @ARGV ); |