tag 435143 - moreinfo unreproducible tag 435143 + patch thanks On Sat, Sep 08, 2007 at 01:38:13PM +0200, sean finney wrote:
> could you provide me some more info on this bug? afaik there shouldn't be a > way for diff lines to get into the file at all, except for possibly it > happening via ucf. is it reproducible? It's perfectly reproducible, whenever dbconfig-generate-include has to replace an existing file so that ucf prompts for instructions. The problem is that dbconfig-generate-include redirects its stdout to the new (temporary) file, but then calls ucf which outputs the diff to stdout through sensible-pager. A fix is to call ucf with >&2 so stdout is replaced. I also suggest using --debconf-ok, which would have avoided the original problem and enhances the user experience. Note that this needs a versioned dependency on ucf (>= 0.28), as detailed in ucf(1). (I think the >&2 is still needed even with --debconf-ok for the corner case where $DEBIAN_HAS_FRONTEND is unset.) Trivial patch attached. Cheers, -- Niko Tyni [EMAIL PROTECTED]
diff --git a/dbconfig-generate-include b/dbconfig-generate-include index 039bc04..9ede85a 100755 --- a/dbconfig-generate-include +++ b/dbconfig-generate-include @@ -405,7 +405,7 @@ esac if [ "$outputfile" ]; then if [ "$do_ucf" ]; then - ucf "$tmpout" "$outputfile" + ucf --debconf-ok "$tmpout" "$outputfile" >&2 rm -f "$tmpout" else mv "$tmpout" "$outputfile" diff --git a/debian/changelog b/debian/changelog index 0e1751a..587e282 100644 diff --git a/debian/control b/debian/control index 1636b39..46e4078 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.7.2 Package: dbconfig-common Architecture: all -Depends: ucf, ${misc:Depends} +Depends: ucf (>= 0.28), ${misc:Depends} Suggests: virtual-mysql-client | mysql-client | postgresql-client Description: common framework for packaging database applications dbconfig-common presents a policy and implementation for