|
From: Christian M. <mar...@fr...> - 2002-05-23 16:38:05
|
Hi,
Bug report submitted by a Debian user
Christian
From: Eloy A. Paris <pe...@ch...>
Subject: Bug#146989: libscrollkeeper0: [PATCH] scrollkeeper-update fails
misserably on Sparc
To: su...@bu...
Date: Tue, 14 May 2002 17:06:56 -0400
Reply-To: Eloy A. Paris <pe...@ch...>, 14...@bu...
Resent-From: Eloy A. Paris <pe...@ch...>
X-Mailer: bug 3.3.10.1
Package: libscrollkeeper0
Version: 0.3.8-1
Severity: important
Running scrollkeeper-update on a Sparc system was failing misserably
with the following message:
Could not create database. Aborting update.
Since scrollkeeper-update was being called in the postinst of several
packages, I was unable to upgrade any of these packages (gnome-*,
Evolution, etc.)
A little bit of investigation unconvered the problem:
cl/src/update.c:main() calls libs/database.c:create_database_directory(),
which return 0 if succesful or 1 otherwise. cl/src/update.c:main() aborts
if libs/database.c:create_database_directory() returns something != 0.
Unfortunately, for the case where the database directory exists, and
is not empty, libs/database.c:create_database_directory() just returns
without a return value. On i386 this works by lucky chance (the garbage
happens to be 0) but on my Sparc the garbage is differnet than 0 so
scrollkeeper-update fails to do anything, and then I can't upgrade
my packages.
The fix is obvious:
-------------------
diff -uNr scrollkeeper-0.3.8.orig/libs/database.c scrollkeeper-0.3.8/libs/database.c
--- scrollkeeper-0.3.8.orig/libs/database.c Sat Apr 20 23:14:16 2002
+++ scrollkeeper-0.3.8/libs/database.c Tue May 14 16:48:45 2002
@@ -122,7 +122,7 @@
closedir(dir);
if (!empty)
- return;
+ return 0;
data_dir = malloc((strlen(scrollkeeper_data_dir)+strlen("/Templates")+1)*
sizeof(char));
-------------------
Cheers,
Eloy.-
pe...@de...
|