repoview et sqlite 3.6
+
Par Remi le samedi 2 mai 2009, 22:36 - General - Lien permanent
En passant sous Fedora 11 Preview, j'ai découvert que repoview ne générait plus les pages d'index par premières lettres des paquets... plutôt génant.
En cherchant dans le code, j'ai découvert une petite maladresse, mais qui permettait quand même à repoview de fonctionner grâce au laxisme des précédentes versions de sqlite.
La fonction SQL "substr" a pour syntaxe substr(chaine,debut,longueur), avec debut >= 1. Mais que se passe-t-il si on prend 0 comme début ?
Avant :
$ sqlite3
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> select substr('ABCD',1,2);
AB
sqlite> select substr('ABCD',0,2);
AB
sqlite> select substr('ABCD',0,1);
A
sqlite>
Maintenant :
$ sqlite3
SQLite version 3.6.12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select substr('ABCD',1,2);
AB
sqlite> select substr('ABCD',0,2);
A
sqlite> select substr('ABCD',0,1);
sqlite>
Le nouveau comportement est apparemment plus conforme, mais provoque le plantage de repoview.
Un fois le problème compris, la correction est trivial.
Voir : Bug #498752
Allez, MrIcon, au boulot ;)
Commentaires
C'est maintenant "fixé" en 0.6.4 -- disponible sur le site web de repoview. Je vais mettre à jour le paquetage en F11 ce soir (ou demain matain), mais il est possible que c'est trop tard pour F11 et le mis-à-jour va être distribué après que F11 est sortie.
Merci! :)