Lucas Nussbaum wrote:

>> x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../src -I..  -I../../include   
>> -Wall -W -Werror -ggdb -O2 -std=gnu99 -MT check.o -MD -MP -MF 
>> .deps/check.Tpo -c -o check.o ../../src/check.c
>> cc1: warnings being treated as errors
>> ../../src/check.c: In function 'check_packages':
>> ../../src/check.c:80:3: error: passing argument 2 of 'check_md5' from 
>> incompatible pointer type
>> ../../src/check.c:39:12: note: expected 'const char *' but argument is of 
>> type 'char **'
>> make[4]: *** [check.o] Error 1

Yep, this is from libdebian-installer commit 0.78~6 (Add minimal
support for SHA1 checksums in Release file parser, 2011-02-25), which
changed "char *sum;" to "char *sum[2];" in struct di_release_file and
updated "di_release_parser_read_file" and "di_release_read_file" to
populate sum[1] with a sha1sum.

Here's a minimal patch to just get cdebootstrap building again.
A proper fix would presumably involve actually using the sha1sums.
---
 src/check.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/check.c b/src/check.c
index d96aa30..6e7d7a0 100644
--- a/src/check.c
+++ b/src/check.c
@@ -77,6 +77,6 @@ int check_packages (const char *target, const char *ext, 
di_release *rel)
   item = di_hash_table_lookup (rel->md5sum, &key);
   if (!item)
     log_text (DI_LOG_LEVEL_ERROR, "Can't find checksum for Packages file");
-  return check_md5 (target, item->sum, buf_name);
+  return check_md5 (target, item->sum[0], buf_name);
 }
 
-- 
1.7.5.rc0




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to