فهرست منبع

link into ODBC also on upgrades

Ralf S. Engelschall 17 سال پیش
والد
کامیت
f207895b40
1فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 6 3
      postgresql/postgresql.spec

+ 6 - 3
postgresql/postgresql.spec

@@ -46,7 +46,7 @@ Class:        BASE
 Group:        Database
 License:      GPL
 Version:      %{V_postgresql}
-Release:      20080318
+Release:      20080323
 
 #   package options
 %option       with_server       yes
@@ -693,16 +693,19 @@ AutoReqProv:  no
           echo "After this the user <user> will be able to connect to his RDBMS with:"
           echo "    \$ $RPM_INSTALL_PREFIX/bin/psql"
         ) | %{l_rpmtool} msg -b -t notice
+    fi
 
-        #   optionally link into ODBC
 %if "%{with_odbc}" == "yes"
+    #   optionally link into ODBC
+    if ! $RPM_INSTALL_PREFIX/bin/odbcinst -q -d -n "PostgreSQL" >/dev/null 2>&1; then
         ( echo "[PostgreSQL]"
           echo "Description     = PostgreSQL ODBC driver"
           echo "Driver          = $RPM_INSTALL_PREFIX/lib/psqlodbc.so"
           echo "Threading       = 2"
         ) | $RPM_INSTALL_PREFIX/bin/odbcinst -i -d -r -n "PostgreSQL"
-%endif
     fi
+%endif
+
     if [ $1 -eq 2 ]; then
         #   after upgrade, restore status
         { eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}; true; } >/dev/null 2>&1