summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-10-28 22:17:47 +0000
committerjbj <devnull@localhost>2001-10-28 22:17:47 +0000
commit966fabbc441b5d859ecda64fe926be3912603fe5 (patch)
treea8cc37298737e3d0af890e13d3e0a33e2f4014f3 /build
parentc1d367a0941b3778a84252691bbd294a0a8be4b7 (diff)
downloadlibrpm-tizen-966fabbc441b5d859ecda64fe926be3912603fe5.tar.gz
librpm-tizen-966fabbc441b5d859ecda64fe926be3912603fe5.tar.bz2
librpm-tizen-966fabbc441b5d859ecda64fe926be3912603fe5.zip
- memory indices for dependency check are typedef'd and abstract'd.
- no-brainer refcounts for fi object, debug the mess. - dump the header early in transaction, recreate fi before installing. CVS patchset: 5137 CVS date: 2001/10/28 22:17:47
Diffstat (limited to 'build')
-rw-r--r--build/buildio.h2
-rw-r--r--build/pack.c8
-rw-r--r--build/rpmspec.h11
-rw-r--r--build/spec.c13
4 files changed, 22 insertions, 12 deletions
diff --git a/build/buildio.h b/build/buildio.h
index e36ee7eb9..e25f64a36 100644
--- a/build/buildio.h
+++ b/build/buildio.h
@@ -16,7 +16,7 @@
typedef /*@abstract@*/ struct cpioSourceArchive_s {
unsigned int cpioArchiveSize;
FD_t cpioFdIn;
-/*@dependent@*/ TFI_t cpioList;
+ TFI_t cpioList;
/*@only@*/ struct rpmlead * lead; /* XXX FIXME: exorcize lead/arch/os */
} * CSA_t;
diff --git a/build/pack.c b/build/pack.c
index a06dc4006..347d4af1c 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -778,7 +778,9 @@ int packageBinaries(Spec spec)
csa->cpioArchiveSize = 0;
/*@-type@*/ /* LCL: function typedefs */
csa->cpioFdIn = fdNew("init (packageBinaries)");
- csa->cpioList = pkg->cpioList;
+ /*@-assignexpose -newreftrans@*/
+/*@i@*/ csa->cpioList = pkg->cpioList;
+ /*@=assignexpose =newreftrans@*/
rc = writeRPM(&pkg->header, fn, RPMLEAD_BINARY,
csa, spec->passPhrase, NULL);
@@ -817,7 +819,9 @@ int packageSources(Spec spec)
csa->cpioArchiveSize = 0;
/*@-type@*/ /* LCL: function typedefs */
csa->cpioFdIn = fdNew("init (packageSources)");
- csa->cpioList = spec->sourceCpioList;
+ /*@-assignexpose -newreftrans@*/
+/*@i@*/ csa->cpioList = spec->sourceCpioList;
+ /*@=assignexpose =newreftrans@*/
rc = writeRPM(&spec->sourceHeader, fn, RPMLEAD_SOURCE,
csa, spec->passPhrase, &(spec->cookie));
diff --git a/build/rpmspec.h b/build/rpmspec.h
index dfe575758..ed59ed212 100644
--- a/build/rpmspec.h
+++ b/build/rpmspec.h
@@ -124,8 +124,9 @@ struct SpecStruct {
int numSources;
int noSource;
-/*@refcounted@*/ Header sourceHeader;
-/*@owned@*/ void * sourceCpioList;
+/*@refcounted@*/
+ Header sourceHeader;
+ TFI_t sourceCpioList;
/*@dependent@*/ /*@null@*/ MacroContext macros;
@@ -141,9 +142,9 @@ struct SpecStruct {
* The structure used to store values for a package.
*/
struct PackageStruct {
-/*@refcounted@*/ Header header;
-
-/*@owned@*/ void * cpioList;
+/*@refcounted@*/
+ Header header;
+ TFI_t cpioList;
/*@owned@*/ struct Source * icon;
diff --git a/build/spec.c b/build/spec.c
index bf7f2b4b5..6a7b4ae14 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -16,6 +16,7 @@ extern int specedit;
#define SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}
/*@access Header @*/ /* compared with NULL */
+/*@access TFI_t @*/ /* compared with NULL */
/**
* @return NULL always
@@ -159,10 +160,12 @@ Package freePackage(Package pkg)
pkg->fileList = freeStringBuf(pkg->fileList);
pkg->fileFile = _free(pkg->fileFile);
if (pkg->cpioList) {
- void * fi = pkg->cpioList;
+ TFI_t fi = pkg->cpioList;
pkg->cpioList = NULL;
-/*@i@*/ freeFi((TFI_t)fi);
+ freeFi(fi);
+ /*@-refcounttrans@*/ /* FIX: fi needs to be only */
fi = _free(fi);
+ /*@=refcounttrans@*/
}
pkg->specialDoc = freeStringBuf(pkg->specialDoc);
@@ -505,10 +508,12 @@ Spec freeSpec(Spec spec)
spec->sourceHeader = headerFree(spec->sourceHeader);
if (spec->sourceCpioList) {
- void * fi = spec->sourceCpioList;
+ TFI_t fi = spec->sourceCpioList;
spec->sourceCpioList = NULL;
-/*@i@*/ freeFi(fi);
+ freeFi(fi);
+ /*@-refcounttrans@*/ /* FIX: fi needs to be only */
fi = _free(fi);
+ /*@=refcounttrans@*/
}
spec->buildRestrictions = headerFree(spec->buildRestrictions);