On Mon, Oct 27, 2008 at 02:50:15PM +0200, Niko Tyni wrote:
> On Mon, Oct 27, 2008 at 12:52:57PM +0100, Bastian Blank wrote:
> > Package: request-tracker3.6
> > Version: 3.6.7-3
> > Severity: serious
> > 
> > request-tracker3.6 uses debconf as a registry to detect which db
> > informations are available. The debconf data is volatile and therefor
> > not possible to be used in this way.
> 
> The debconf information (rt3.6-db-*/available) is only
> used on new installations or upgrades with an unmodified
> /etc/request-tracker3.6/RT_SiteConfig.pm.
> 
> The aim was (of course) to aid the administrator by offering only the
> possible database choices. This is particularly hard to do otherwise in
> the preconfiguration case, where there is no other information source
> available because the rt3.6-db-* packages are usually not installed yet,
> only preconfigured.

The attached patch simply ignores the debconf settings if a db backend
package is already installed or selected for installation. This means
the debconf information will only be used for preconfiguration.

I think this is enough to fix the bug, but please let me know if you
disagree.
-- 
Niko Tyni   [EMAIL PROTECTED]
diff --git a/debian/config b/debian/config
index fbe8774..4bbc8c2 100755
--- a/debian/config
+++ b/debian/config
@@ -276,9 +276,9 @@ if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
                 pkg=rt3.6-db-sqlite
                 ;;
             esac
-            db_get ${pkg}/available || true
-            if [ "$RET" = "true" ]
-            then
+            if dpkg-query -W -f='${Status}\n' $pkg 2>/dev/null | \
+               grep -q '^install \| installed$' || \
+               ( db_get ${pkg}/available && [ "$RET" = "true" ] ); then
                 dbc_dbtypes="${dbc_dbtypes}, $dbtype"
             fi
             dbc_dbtypes=$(echo $dbc_dbtypes | sed 's/^, //')

Reply via email to