[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Maintainer script code for moving conffiles



On Fre, 02 Mär 2007, Frank Küster wrote:
> You already wrote handle_config_file_preinst in common functions.  As I
> understood it, the preinst would need
> 
> for file in "list of moved files, new location" do;
>   handle_config_file_preinst $file
> done

The preinst contains:

handle_config_file_preinst file1
handle_config_file_preinst file2
handle_config_file_preinst file3
...

and only for those files which are actually in the package.

> I was thinking of substituting "list of moved files, new location" by
> the actual list at the time the preinst is created.

This is done:
from tpm2deb-bin.pl:
if ($type eq "preinst") {
	foreach my $cf (@configfiles) {
		print FOO "handle_config_file_preinst $cf\n"
	}
}
where @configfiles *ONLY* contains those which are actually in the
package?

The only thing which *COULD* be simplified is the code in
handle_config_file_preins itself, as it contains the handle information
for *all* files.

I believe that I still don't get it ..

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>                    Università di Siena
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
DITHERINGTON (n)
Sudden access to panic experienced by one who realises that he is
being drawn inexorably into a clabby (q.v.) conversion, i.e. one he
has no hope of enjoying, benefiting from or understanding.
			--- Douglas Adams, The Meaning of Liff



Reply to: