File checkinstall-1.6.1-reloadsyms.patch of Package checkinstall
--- installwatch-0.7.0beta5/installwatch.c
+++ installwatch-0.7.0beta5/installwatch.c
@@ -274,7 +274,14 @@
static void *libc_handle=NULL;
+static void myinit(void);
+#define RLSYMS if(!true_time) myinit();
+
void _init(void) {
+ myinit();
+}
+
+static void myinit(void) {
#ifdef BROKEN_RTLD_NEXT
// printf ("RTLD_LAZY");
libc_handle = dlopen(LIBC_VERSION, RTLD_LAZY);
@@ -347,6 +354,8 @@
int logfd;
int rcod=0;
+ RLSYMS
+
count=vsnprintf(buffer,BUFSIZE,format,ap);
if(count == -1) {
/* The buffer was not big enough */
@@ -450,6 +459,8 @@
*/
static int canonicalize(const char *path, char *resolved_path) {
+ RLSYMS
+
unset_okwrap();
if(!realpath(path,resolved_path)) {
@@ -480,6 +491,8 @@
int i = 0;
+ RLSYMS
+
#if DEBUG
debug(2,"===== make_path: %s\n", path);
#endif
@@ -529,6 +542,8 @@
char linkpath[PATH_MAX+1];
size_t linksz;
+ RLSYMS
+
#if DEBUG
debug(2,"copy_path(%s,%s)\n",truepath,translroot);
#endif
@@ -663,6 +678,8 @@
char wpath[PATH_MAX+1];
struct stat winfo;
+ RLSYMS
+
#if DEBUG
debug(2,"unlink_recursive(%s)\n",truepath);
#endif
@@ -736,6 +753,8 @@
char pns[PATH_MAX+1];
size_t len;
+ RLSYMS
+
#if DEBUG
debug(4,"expand_path(%p,%s,%s)\n",list,prefix,suffix);
#endif
@@ -975,6 +994,8 @@
int oktransl;
int okwrap;
+ RLSYMS
+
#if DEBUG
/*
* We set the requested dynamic debug level
@@ -1307,6 +1328,8 @@
int i=0;
string_t *pthis;
+ RLSYMS
+
#if DEBUG
debug(3,"instw_setmetatransl(%p)\n",instw);
instw_print(instw);
@@ -1375,6 +1398,8 @@
size_t trlen;
size_t melen;
+ RLSYMS
+
#if DEBUG
debug(2,"instw_setpath(%p,%s)\n",instw,path);
#endif
@@ -1475,6 +1500,8 @@
struct stat rinode;
struct stat tinode;
+ RLSYMS
+
#if DEBUG
debug(2,"instw_getstatus(%p,%p)\n",instw,status);
#endif
@@ -1566,7 +1593,8 @@
size_t wsz=0;
char linkpath[PATH_MAX+1];
-
+ RLSYMS
+
#if DEBUG
debug(2,"instw_apply(%p)\n",instw);
instw_print(instw);
@@ -1663,6 +1691,8 @@
instw_t iw_entry;
int status=0;
+ RLSYMS
+
#if DEBUG
debug(2,"instw_filldirls(%p)\n",instw);
#endif
@@ -1860,6 +1890,8 @@
struct stat dirlsinfo;
char wdirname[NAME_MAX+1];
+ RLSYMS
+
#if DEBUG
debug(2,"instw_makedirls(%p)\n",instw);
#endif
@@ -1929,6 +1961,8 @@
struct stat inode,backup_inode;
struct utimbuf timbuf;
+ RLSYMS
+
#if DEBUG
debug(2,"========= backup () ========= path: %s\n", path);
#endif
@@ -2041,6 +2075,8 @@
}
time_t time (time_t *timer) {
+ RLSYMS
+
TIMECOUNT;
#if DEBUG
@@ -2059,6 +2095,8 @@
instw_t instw;
int status;
+ RLSYMS
+
#if DEBUG
debug(2,"chdir(%s)n",pathname);
#endif
@@ -2091,6 +2129,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2127,6 +2167,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2163,6 +2205,8 @@
int result;
char canonic[MAXPATHLEN];
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2184,6 +2228,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2218,6 +2264,8 @@
int fchmod(int filedes, mode_t mode) {
int result;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2232,6 +2280,8 @@
int fchown(int fd, uid_t owner, gid_t group) {
int result;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2249,7 +2299,8 @@
instw_t instw;
int status=0;
-
+ RLSYMS
+
#if DEBUG
debug(2,"fopen(%s,%s)\n",pathname,mode);
#endif
@@ -2299,6 +2350,8 @@
int ftruncate(int fd, TRUNCATE_T length) {
int result;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2316,6 +2369,8 @@
char *wptr;
size_t wsize;
+ RLSYMS
+
#if DEBUG
debug(2,"getcwd(%p,%ld)\n",buffer,(long int)size);
#endif
@@ -2363,6 +2418,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2400,6 +2457,8 @@
instw_t instw_o;
instw_t instw_n;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2441,6 +2500,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2475,6 +2536,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2514,6 +2577,8 @@
instw_t instw;
int status;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2565,6 +2630,8 @@
DIR *result;
instw_t instw;
+ RLSYMS
+
#if DEBUG
debug(2,"opendir(%s)\n",dirname);
#endif
@@ -2594,6 +2661,8 @@
struct dirent *readdir(DIR *dir) {
struct dirent *result;
+ RLSYMS
+
#if DEBUG
debug(3,"readdir(%p)\n",dir);
#endif
@@ -2619,6 +2688,8 @@
instw_t instw;
int status;
+ RLSYMS
+
#if DEBUG
debug(2,"readlink(\"%s\",%p,%ld)\n",path,buf,(long int)bufsiz);
#endif
@@ -2651,6 +2722,8 @@
char *realpath(const char *file_name,char *resolved_name) {
char *result;
+ RLSYMS
+
/* We were asked to work in "real" mode */
if( !(__instw.gstatus & INSTW_INITIALIZED) ||
!(__instw.gstatus & INSTW_OKWRAP) ) {
@@ -2668,6 +2741,8 @@
instw_t oldinstw;
instw_t newinstw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2709,6 +2784,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2741,6 +2818,8 @@
int (*compar)(const void *,const void *) ) {
int result;
+ RLSYMS
+
#if DEBUG
debug(2,"scandir(%s,%p,%p,%p)\n",dir,namelist,select,compar);
#endif
@@ -2762,6 +2841,8 @@
instw_t instw;
int status;
+ RLSYMS
+
#if DEBUG
debug(2,"stat(%s,%p)\n",pathname,info);
#endif
@@ -2801,6 +2882,8 @@
instw_t instw;
int status;
+ RLSYMS
+
#if DEBUG
debug(2,"lstat(%s,%p)\n",pathname,info);
#endif
@@ -2840,6 +2923,8 @@
instw_t instw;
instw_t instw_slink;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2880,6 +2965,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2916,6 +3003,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -2951,6 +3040,8 @@
int result;
instw_t instw;
+ RLSYMS
+
#if DEBUG
debug(2,"utime(%s,newtimes)\n",pathname);
#endif
@@ -2987,6 +3078,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -3021,6 +3114,8 @@
int ftruncate64(int fd, __off64_t length) {
int result;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -3038,6 +3133,8 @@
instw_t instw;
int status;
+ RLSYMS
+
#if DEBUG
debug(2,"fopen64(%s,%s)\n",pathname,mode);
#endif
@@ -3090,6 +3187,8 @@
instw_t instw;
int status;
+ RLSYMS
+
REFCOUNT;
#if DEBUG
@@ -3141,6 +3240,8 @@
struct dirent64 *readdir64(DIR *dir) {
struct dirent64 *result;
+ RLSYMS
+
#if DEBUG
debug(3,"readdir64(%p)\n",dir);
#endif
@@ -3166,6 +3267,8 @@
int (*compar)(const void *,const void *) ) {
int result;
+ RLSYMS
+
#if DEBUG
debug(2,"scandir64(%s,%p,%p,%p)\n",dir,namelist,select,compar);
#endif
@@ -3187,6 +3290,8 @@
instw_t instw;
int status;
+ RLSYMS
+
#if DEBUG
debug(2,"stat64(%s,%p)\n",pathname,info);
#endif
@@ -3226,6 +3331,8 @@
instw_t instw;
int status;
+ RLSYMS
+
#if DEBUG
debug(2,"lstat64(%s,%p)\n",pathname,info);
#endif
@@ -3264,6 +3371,8 @@
int result;
instw_t instw;
+ RLSYMS
+
REFCOUNT;
#if DEBUG