summaryrefslogtreecommitdiff
path: root/Debian/Debhelper
diff options
context:
space:
mode:
authorjoey <joey>2002-09-22 15:36:23 +0000
committerjoey <joey>2002-09-22 15:36:23 +0000
commit79b845498ac4420eb6f422137e0b428ec841270e (patch)
treef8187ddebd2f508cf682c853270a68c09d3bba8c /Debian/Debhelper
parente9e319e1f6b414b6f72451b8760f00bb7ad06e16 (diff)
r551: * Make addsubstvars remove old instances of line before adding new. This
will make dh_perl get deps right for packages that have perl modules and XS in them.
Diffstat (limited to 'Debian/Debhelper')
-rw-r--r--Debian/Debhelper/Dh_Lib.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index e2d26b25..3b7a5192 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -439,7 +439,8 @@ sub addsubstvar {
}
if (length $line) {
- complex_doit("echo '${substvar}=$line' >> $substvarfile");
+ complex_doit("(grep -v ${substvar} $substvarfile 2>/dev/null; echo '${substvar}=$line') > $substvarfile.new");
+ doit("mv", "$substvarfile.new", $substvarfile);
}
}