From 1566865e67d2712c45462794cc29d89f75c011d1 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 10 Jan 2016 10:19:29 +0000 Subject: Dh_Lib: Add restore_file_on_clean Signed-off-by: Niels Thykier --- doc/PROGRAMMING | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/PROGRAMMING') 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 -- cgit v1.2.3