diff options
author | jbj <devnull@localhost> | 2002-08-19 22:27:44 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-08-19 22:27:44 +0000 |
commit | ae8428475cbfde3af746d51a056e0655fe6269d8 (patch) | |
tree | 6d173ac13fbc11799ea49d3dd70d5b8ee452283a /rpmdb | |
parent | 105f7a517cd13b7c40b359548a9c75cbd00ed9c4 (diff) | |
download | librpm-tizen-ae8428475cbfde3af746d51a056e0655fe6269d8.tar.gz librpm-tizen-ae8428475cbfde3af746d51a056e0655fe6269d8.tar.bz2 librpm-tizen-ae8428475cbfde3af746d51a056e0655fe6269d8.zip |
- add --with-efence to configure, check install/upgrade with efence.
- beecrypt: short hex string conversion overflows target buffer.
- mark "successors only" packages in transaction.
- reap scriptlets with SIGCHLD handler.
- rename PSM_t to rpmpsm, add methods and refcounts to manage.
- remove %%configure/%%makeinstall from arch-os/macros, default is OK.
- don't export MALLOC_CHECK_ to scriptlets.
- squeaky clean memory leak checking.
- always malloc rpmfi structure, refcounts are correct in rpmtsRun().
- skip redundant /sbin/ldconfig scripts on upgrade (if possible).
CVS patchset: 5645
CVS date: 2002/08/19 22:27:44
Diffstat (limited to 'rpmdb')
-rw-r--r-- | rpmdb/header.c | 7 | ||||
-rw-r--r-- | rpmdb/header_internal.h | 12 | ||||
-rw-r--r-- | rpmdb/legacy.c | 1 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 7 |
4 files changed, 15 insertions, 12 deletions
diff --git a/rpmdb/header.c b/rpmdb/header.c index e16782ff2..c2c3aaf62 100644 --- a/rpmdb/header.c +++ b/rpmdb/header.c @@ -2665,6 +2665,8 @@ static char * formatValue(sprintfTag tag, Header h, count = 1; type = RPM_STRING_TYPE; data = "(none)"; + } else { + datafree = extCache[tag->extNum].freeit; } /*@=boundswrite@*/ } else { @@ -2682,7 +2684,8 @@ static char * formatValue(sprintfTag tag, Header h, if (tag->arrayCount) { /*@-observertrans -modobserver@*/ - data = headerFreeData(data, type); + if (datafree) + data = headerFreeData(data, type); /*@=observertrans =modobserver@*/ countBuf = count; @@ -3016,7 +3019,7 @@ allocateExtensionCache(const headerSprintfExtension extensions) } /*@-sizeoftype@*/ - return xcalloc(i, sizeof(struct extensionCache)); + return xcalloc(i, sizeof(struct extensionCache_s)); /*@=sizeoftype@*/ } diff --git a/rpmdb/header_internal.h b/rpmdb/header_internal.h index f9e0198e9..de79b0901 100644 --- a/rpmdb/header_internal.h +++ b/rpmdb/header_internal.h @@ -68,8 +68,8 @@ struct headerToken { /** \ingroup header */ -typedef /*@abstract@*/ struct sprintfTag * sprintfTag; -struct sprintfTag { +typedef /*@abstract@*/ struct sprintfTag_s * sprintfTag; +struct sprintfTag_s { /*@null@*/ headerTagTagFunction ext; /*!< if NULL tag element is invalid */ int extNum; int_32 tag; @@ -82,8 +82,8 @@ struct sprintfTag { /** \ingroup header */ -typedef /*@abstract@*/ struct extensionCache * extensionCache; -struct extensionCache { +typedef /*@abstract@*/ struct extensionCache_s * extensionCache; +struct extensionCache_s { int_32 type; int_32 count; int avail; @@ -108,7 +108,7 @@ struct sprintfToken { /*@only@*/ sprintfToken format; int numTokens; } array; - struct sprintfTag tag; + struct sprintfTag_s tag; struct { /*@dependent@*/ char * string; int len; @@ -118,7 +118,7 @@ struct sprintfToken { int numIfTokens; /*@only@*/ /*@null@*/ sprintfToken elseFormat; int numElseTokens; - struct sprintfTag tag; + struct sprintfTag_s tag; } cond; } u; }; diff --git a/rpmdb/legacy.c b/rpmdb/legacy.c index 2c1fd3f61..b88cfbbc7 100644 --- a/rpmdb/legacy.c +++ b/rpmdb/legacy.c @@ -126,6 +126,7 @@ static int open_dso(const char * path, /*@null@*/ pid_t * pidp, /*@null@*/ size_ if (!poptParseArgvString(cmd, &ac, &av)) { av[ac-1] = path; av[ac] = NULL; + unsetenv("MALLOC_CHECK_"); xx = execve(av[0], (char *const *)av+1, environ); } _exit(127); diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index f79523a17..f9ebd5391 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -663,7 +663,7 @@ static void handler(int signum) /*@=incondefs@*/ /** - * Enable all signal handlers + * Enable all signal handlers. */ static int enableSignals(void) /*@globals caught, satbl, fileSystem @*/ @@ -726,7 +726,7 @@ static int checkSignals(void) } /** - * Disable all signal handlers + * Disable all signal handlers. */ static int disableSignals(void) /*@globals satbl, fileSystem @*/ @@ -748,7 +748,6 @@ static int disableSignals(void) return sigprocmask(SIG_SETMASK, &oldMask, NULL); } - /** * Block all signals, returning previous signal mask. */ @@ -3279,7 +3278,7 @@ static struct skipDir_s { static int skipDir(const char * dn) /*@*/ { - struct skipDir_s * sd = skipDirs;; + struct skipDir_s * sd = skipDirs; int dnlen; dnlen = strlen(dn); |