summaryrefslogtreecommitdiff
path: root/doc/PROGRAMMING
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2016-01-10 10:19:29 +0000
committerNiels Thykier <niels@thykier.net>2016-01-10 10:47:26 +0000
commit1566865e67d2712c45462794cc29d89f75c011d1 (patch)
tree017ca3bd9b5e2ae6f7d467686c9d631829f958ce /doc/PROGRAMMING
parentbca06f8d784fb0d6ac6f1358fc1ea2366fbb774e (diff)
downloaddebhelper-1566865e67d2712c45462794cc29d89f75c011d1.tar.gz
Dh_Lib: Add restore_file_on_clean
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'doc/PROGRAMMING')
-rw-r--r--doc/PROGRAMMING9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING
index e5b9a726..1f03bdfb 100644
--- a/doc/PROGRAMMING
+++ b/doc/PROGRAMMING
@@ -290,6 +290,15 @@ load_log($package, $hashref)
write_log($cmd, $package ...)
Writes the log files for the specified package(s), adding
the cmd to the end.
+restore_file_on_clean($file)
+ Store a copy of $file, which will be restored by dh_clean.
+ The $file *must* be a relative path to the package root and
+ *must* be a real regular file. Dirs, devices and symlinks
+ (and everything else) *cannot* be restored by this.
+ If $file is passed multiple times (e.g. from different programs)
+ only the first version is stored.
+ CAVEAT: This *cannot* undo arbitrary "rm -fr"'ing. The dir,
+ which is/was in $file, must be present when dh_clean is called.
make_symlink($src, $dest, $tmp)
Creates a Policy compliant sytem link called $dest pointing to
$src. If $tmp is given, then $tmp will be prefixed to $dest when