From: Duncan Coutts Date: Sat, 11 Mar 2006 21:31:06 +0000 (+0000) Subject: Add a patch by Bjorn Bringert to fix a problem found in the sqlite3 backend. See... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=22ec470ed778d4a4f9eb0b2370956b2adb3850e0;p=gentoo.git Add a patch by Bjorn Bringert to fix a problem found in the sqlite3 backend. See also bugs #98549 and #98551. Package-Manager: portage-2.1_pre5-r4 --- diff --git a/dev-haskell/hsql/ChangeLog b/dev-haskell/hsql/ChangeLog index 26a27c53ed8b..03a5f5c5661b 100644 --- a/dev-haskell/hsql/ChangeLog +++ b/dev-haskell/hsql/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-haskell/hsql # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/ChangeLog,v 1.6 2006/03/11 20:33:26 dcoutts Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/ChangeLog,v 1.7 2006/03/11 21:31:06 dcoutts Exp $ + + 11 Mar 2006; Duncan Coutts + +files/hsql-1.7-sqltext-to-int.patch, hsql-1.7.ebuild: + Add a patch by Bjorn Bringert to fix a problem found in the sqlite3 backend. + See also bugs #98549 and #98551. 11 Mar 2006; Duncan Coutts hsql-1.7.ebuild: Remove the backends from PDEPEND. Use a message in pkg_postinst instead. diff --git a/dev-haskell/hsql/Manifest b/dev-haskell/hsql/Manifest index 1051f42143ef..7853580f5c4d 100644 --- a/dev-haskell/hsql/Manifest +++ b/dev-haskell/hsql/Manifest @@ -1,22 +1,25 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 0f90345ddd2bc9e123a90e46a00b9e4c ChangeLog 922 -RMD160 4fdc31f052737f6a312557781e19ebb3871305dc ChangeLog 922 -SHA256 68b3a9e95e30271be4aae9f25e2521bf144dc591e8fd2e1dc4ec4ca20ca15739 ChangeLog 922 +MD5 638f370809271e42626c52853530709a ChangeLog 1144 +RMD160 7b90dc411f8f246a9e3a7aff59a760e44561c887 ChangeLog 1144 +SHA256 8de97a756eb952c93d9b21ab5421fe24e2c7631f1d2b0b8a5c03c6b2aeb22d04 ChangeLog 1144 MD5 8b88f3b8f094ddbdd05b6694b7543fc7 files/digest-hsql-1.7 223 RMD160 7d319609e94b9fd8a725bbb036d5f6ae37e818f6 files/digest-hsql-1.7 223 SHA256 68b6c539208dcf5c7056e412864a29dda67a3bea95995b53b80c981b76e3cedd files/digest-hsql-1.7 223 -MD5 19853965d81712068c4c6fbc31233e33 hsql-1.7.ebuild 785 -RMD160 ed39b68bf5f62bdb9d1e7872d419efb4561bf969 hsql-1.7.ebuild 785 -SHA256 961cfada6f0e29f5360ddef3484db3481229f5b68ff5d1320d3390125c414ac7 hsql-1.7.ebuild 785 +MD5 8d8cd22a297e6d46e9722463ea64770c files/hsql-1.7-sqltext-to-int.patch 2443 +RMD160 2c81d50e1eb4cbf947d09ccdd9ed394374312b80 files/hsql-1.7-sqltext-to-int.patch 2443 +SHA256 abecdec2d2b86d55899520cce95249634232134f2045ef1fe1151884e433f20a files/hsql-1.7-sqltext-to-int.patch 2443 +MD5 4960102f87474509832aee715ba11cc6 hsql-1.7.ebuild 883 +RMD160 246c7315532c259780ba05bc3a5de36bf44f9293 hsql-1.7.ebuild 883 +SHA256 b1f2ca6a914da1121f31026460997814ab0f8a59f1b92f088af69a7be3468851 hsql-1.7.ebuild 883 MD5 c694674dcbef799cd4fdb6914683ebff metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 metadata.xml 223 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508 metadata.xml 223 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) -iD8DBQFEEzQG/B0cxt+cq+wRAnOsAJ9ecj8mQZrL6/9tGrWAmE1Sf2blZgCfaY6L -p+YjyxBBVmlrwa39UJmUQG4= -=Devc +iD8DBQFEE0GR/B0cxt+cq+wRAg6fAJ951IkZCjodF4NnajWFU1C3LCcXOQCfV/1K +HVq5ayFO1qLJoJhCEzjMAJw= +=fGqw -----END PGP SIGNATURE----- diff --git a/dev-haskell/hsql/files/hsql-1.7-sqltext-to-int.patch b/dev-haskell/hsql/files/hsql-1.7-sqltext-to-int.patch new file mode 100644 index 000000000000..65effac3c7e6 --- /dev/null +++ b/dev-haskell/hsql/files/hsql-1.7-sqltext-to-int.patch @@ -0,0 +1,58 @@ +Index: HSQL/Database/HSQL.hsc +=================================================================== +RCS file: /cvsroot/htoolkit/HSQL/HSQL/Database/HSQL.hsc,v +retrieving revision 1.16 +diff -u -r1.16 HSQL.hsc +--- HSQL/Database/HSQL.hsc 9 Jan 2006 14:49:23 -0000 1.16 ++++ HSQL/Database/HSQL.hsc 11 Mar 2006 20:27:45 -0000 +@@ -239,7 +239,8 @@ + sqlType==SqlTinyInt || + sqlType==SqlSmallInt|| + sqlType==SqlBigInt = c_atoi cstr +- | otherwise = throwDyn (SqlBadTypeCast name sqlType) ++ fromSqlCStringLen field cstr cstrLen ++ = defaultFromSqlCStringLen field cstr cstrLen + + fromSqlValue SqlInteger s = Just (read s) + fromSqlValue SqlMedInt s = Just (read s) +@@ -265,7 +266,8 @@ + #else + c_strtoll cstr nullPtr 10 + #endif +- | otherwise = throwDyn (SqlBadTypeCast name sqlType) ++ fromSqlCStringLen field cstr cstrLen ++ = defaultFromSqlCStringLen field cstr cstrLen + + fromSqlValue SqlInteger s = Just (read s) + fromSqlValue SqlMedInt s = Just (read s) +Index: HSQL/Database/HSQL/Types.hs +=================================================================== +RCS file: /cvsroot/htoolkit/HSQL/HSQL/Database/HSQL/Types.hs,v +retrieving revision 1.9 +diff -u -r1.9 Types.hs +--- HSQL/Database/HSQL/Types.hs 9 Jan 2006 14:49:23 -0000 1.9 ++++ HSQL/Database/HSQL/Types.hs 11 Mar 2006 20:27:45 -0000 +@@ -150,13 +150,16 @@ + -- This allows for faster conversion for eq. integral numeric types, etc. + -- Default version uses fromSqlValue. + fromSqlCStringLen :: FieldDef -> CString -> Int -> IO a +- fromSqlCStringLen (name,sqlType,_) cstr cstrLen +- | cstr == nullPtr = throwDyn (SqlFetchNull name) +- | otherwise = do +- str <- peekCStringLen (cstr, cstrLen) +- case fromSqlValue sqlType str of +- Nothing -> throwDyn (SqlBadTypeCast name sqlType) +- Just v -> return v ++ fromSqlCStringLen = defaultFromSqlCStringLen + + fromSqlValue :: SqlType -> String -> Maybe a + toSqlValue :: a -> String ++ ++defaultFromSqlCStringLen :: SqlBind a => FieldDef -> CString -> Int -> IO a ++defaultFromSqlCStringLen (name,sqlType,_) cstr cstrLen ++ | cstr == nullPtr = throwDyn (SqlFetchNull name) ++ | otherwise = do ++ str <- peekCStringLen (cstr, cstrLen) ++ case fromSqlValue sqlType str of ++ Nothing -> throwDyn (SqlBadTypeCast name sqlType) ++ Just v -> return v diff --git a/dev-haskell/hsql/hsql-1.7.ebuild b/dev-haskell/hsql/hsql-1.7.ebuild index a24c302e55a0..8fb38388f205 100644 --- a/dev-haskell/hsql/hsql-1.7.ebuild +++ b/dev-haskell/hsql/hsql-1.7.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/hsql-1.7.ebuild,v 1.6 2006/03/11 20:33:26 dcoutts Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hsql/hsql-1.7.ebuild,v 1.7 2006/03/11 21:31:06 dcoutts Exp $ CABAL_FEATURES="lib haddock" -inherit ghc-package haskell-cabal +inherit base ghc-package haskell-cabal DESCRIPTION="SQL bindings for Haskell" HOMEPAGE="http://htoolkit.sourceforge.net/" @@ -18,6 +18,13 @@ DEPEND=">=virtual/ghc-6.4.1" S="${WORKDIR}/HSQL/HSQL" +src_unpack() { + base_src_unpack + + cd ${S} + epatch "${FILESDIR}/${P}-sqltext-to-int.patch" +} + pkg_postinst () { ghc-package_pkg_postinst