With version 1.4.48 debconf-set-selections introduced ability to set
seen flag using line:

owner\tvariable_name\tseen\tvalue

Howewer as I can see debconf-get-selections doesn't generate such output
until now (version 1.5.13). It's not too difficult to make patch like
this one:
=====

--- debconf-get-selections      Tue Mar  6 21:46:16 2007
+++ debconf-get-selections-new  Mon Jul  9 22:56:06 2007
@@ -60,15 +60,18 @@
        print "# ".$q->description."\n";
        if ($q->type eq 'select' || $q->type eq 'multiselect') {
                print "# Choices: ".join(", ", $q->choices)."\n";
-       }
+       };
+       my $owner = $defaultowner;
        if ($q->owners) {
-               foreach my $owner (split ", ", $q->owners) {
+               foreach $owner (split ", ", $q->owners) {
                        print "$owner\t$name\t$type\t$value\n";
-               }
+               };
+               $owner = (split ", ",$q->owners)[-1];
        }
        else {          
                print "$defaultowner\t$name\t$type\t$value\n";
-       }
+       };
+       print "$owner\t$name\tseen\t" . $q->flag("seen") . "\n";
 }
 
 =head1 AUTHOR
=====

It's also easy to remove added lines with grep -v \
'^[^[:space:]]*[[:space:]][^[:space:]]*[[:space:]]seen[[:space:]].*$'
or something like.

Patched version is 1.5.13, but, unfortunately I have only 'sarge' there
and tested against it, not 'etch' or 'sid' (I tested only output of
program, not in conjunction with debconf-set-selections there, but with
other system at my home I tested similar patch together with test debconf
database).

WBR
Dmitri Ivanov





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to