2009-06-22 11:29:18 UTC
The following error was bugging me:
make[3]: Entering directory `/usr/src/paco-2.0.6/lib/paco'
g++ -DHAVE_CONFIG_H -I. -I../.. -W -I../.. -DPACORC='"/etc/pacorc"' -ansi -pedantic -Wall -Wshadow -fno-operator-names -g -O2 -MT libpaco_a-BasePkg.o -MD -MP -MF .deps/libpaco_a-BasePkg.Tpo -c -o libpaco_a-BasePkg.o `test -f 'BasePkg.cc' || echo './'`BasePkg.cc
BasePkg.cc: In static member function 'static bool Paco::BasePkg::updateLog(const std::string&)':
BasePkg.cc:204: error: invalid conversion from 'const char*' to 'char*'
make[3]: *** [libpaco_a-BasePkg.o] Error 1
make[3]: Leaving directory `/usr/src/paco-2.0.6/lib/paco'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/paco-2.0.6/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/paco-2.0.6'
make: *** [all] Error 2
To solve this one, I did the following patch:
--- ../paco-2.0.6.new/paco-2.0.6/lib/paco/BasePkg.cc 2009-06-22 15:05:50.000000000 +0200
+++ lib/paco/BasePkg.cc 2008-10-03 20:57:46.000000000 +0200
@@ -196,14 +196,14 @@
}
char* p;
- const char* file;
+ char* file;
enum { RAW, GZ, BZ2, NSIZES };
long size[NSIZES], sizeInst = 0, sizeMiss = 0, filesInst = 0, filesMiss = 0;
do {
if (UNLIKELY(!(file = strchr(buf.c_str(), '/'))))
continue;
- else if ((p = (char*) strchr(file, '|')))
+ else if ((p = strchr(file, '|')))
*p++ = 0;
if (getSize(size[RAW], file) +
getSize(size[GZ], file, ".gz") +