return 0;
}
-#ifdef DYING
-/**
- * Copy file data from h to newH.
- * @param fi transaction element file info
- * @param h header from
- * @param newH header to
- * @return 0 on success
- */
-/*@-boundswrite@*/
-static rpmRC mergeFiles(rpmfi fi, Header h, Header newH)
- /*@modifies h @*/
-{
- HGE_t hge = (HGE_t)fi->hge;
- HME_t hme = (HME_t)fi->hme;
- HFD_t hfd = (fi->hfd ? fi->hfd : headerFreeData);
- fileAction * actions = fi->actions;
- int i, j, k, fc, xx;
- rpmTagType type = 0;
- int_32 count = 0;
- int_32 dirNamesCount, dirCount;
- void * data, * newdata;
- int_32 * dirIndexes, * newDirIndexes;
- uint_32 * fileSizes, fileSize;
- const char ** dirNames;
- const char ** newDirNames;
- static rpmTag mergeTags[] = {
- RPMTAG_FILESIZES,
- RPMTAG_FILESTATES,
- RPMTAG_FILEMODES,
- RPMTAG_FILERDEVS,
- RPMTAG_FILEMTIMES,
- RPMTAG_FILEMD5S,
- RPMTAG_FILELINKTOS,
- RPMTAG_FILEFLAGS,
- RPMTAG_FILEUSERNAME,
- RPMTAG_FILEGROUPNAME,
- RPMTAG_FILEVERIFYFLAGS,
- RPMTAG_FILEDEVICES,
- RPMTAG_FILEINODES,
- RPMTAG_FILELANGS,
- RPMTAG_BASENAMES,
- 0,
- };
- static rpmTag requireTags[] = {
- RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION, RPMTAG_REQUIREFLAGS,
- RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, RPMTAG_PROVIDEFLAGS,
- RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTVERSION, RPMTAG_CONFLICTFLAGS
- };
-
- xx = hge(h, RPMTAG_SIZE, NULL, (void **) &fileSizes, NULL);
- fileSize = *fileSizes;
- xx = hge(newH, RPMTAG_FILESIZES, NULL, (void **) &fileSizes, &count);
- for (i = 0, fc = 0; i < count; i++)
- if (actions[i] != FA_SKIPCOLOR) {
- fc++;
- fileSize += fileSizes[i];
- }
- xx = hme(h, RPMTAG_SIZE, RPM_INT32_TYPE, &fileSize, 1);
-
- /*@-sizeoftype@*/
- for (i = 0; mergeTags[i]; i++) {
- if (!hge(newH, mergeTags[i], &type, (void **) &data, &count))
- continue;
- switch (type) {
- case RPM_CHAR_TYPE:
- case RPM_INT8_TYPE:
- newdata = xcalloc(fc, sizeof(int_8));
- for (j = 0, k = 0; j < count; j++)
- if (actions[j] != FA_SKIPCOLOR)
- ((int_8 *) newdata)[k++] = ((int_8 *) data)[j];
- xx = headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
- free (newdata);
- /*@switchbreak@*/ break;
- case RPM_INT16_TYPE:
- newdata = xcalloc(fc, sizeof(int_16));
- for (j = 0, k = 0; j < count; j++)
- if (actions[j] != FA_SKIPCOLOR)
- ((int_16 *) newdata)[k++] = ((int_16 *) data)[j];
- xx = headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
- free (newdata);
- /*@switchbreak@*/ break;
- case RPM_INT32_TYPE:
- newdata = xcalloc(fc, sizeof(int_32));
- for (j = 0, k = 0; j < count; j++)
- if (actions[j] != FA_SKIPCOLOR)
- ((int_32 *) newdata)[k++] = ((int_32 *) data)[j];
- xx = headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
- free (newdata);
- /*@switchbreak@*/ break;
- case RPM_STRING_ARRAY_TYPE:
- newdata = xcalloc(fc, sizeof(char *));
- for (j = 0, k = 0; j < count; j++)
- if (actions[j] != FA_SKIPCOLOR)
- ((char **) newdata)[k++] = ((char **) data)[j];
- xx = headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
- free (newdata);
- /*@switchbreak@*/ break;
- default:
- rpmError(RPMERR_DATATYPE, _("Data type %d not supported\n"),
- (int) type);
- return RPMRC_FAIL;
- /*@notreached@*/ /*@switchbreak@*/ break;
- }
- data = hfd(data, type);
- }
- /*@=sizeoftype@*/
- xx = hge(newH, RPMTAG_DIRINDEXES, NULL, (void **) &newDirIndexes, &count);
- xx = hge(newH, RPMTAG_DIRNAMES, NULL, (void **) &newDirNames, NULL);
- xx = hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
- xx = hge(h, RPMTAG_DIRNAMES, NULL, (void **) &data, &dirNamesCount);
-
- dirNames = xcalloc(dirNamesCount + fc, sizeof(*dirNames));
- for (i = 0; i < dirNamesCount; i++)
- dirNames[i] = ((char **) data)[i];
- dirCount = dirNamesCount;
- newdata = xcalloc(fc, sizeof(*newDirIndexes));
- for (i = 0, k = 0; i < count; i++) {
- if (actions[i] == FA_SKIPCOLOR)
- continue;
- for (j = 0; j < dirCount; j++)
- if (!strcmp(dirNames[j], newDirNames[newDirIndexes[i]]))
- /*@innerbreak@*/ break;
- if (j == dirCount)
- dirNames[dirCount++] = newDirNames[newDirIndexes[i]];
- ((int_32 *) newdata)[k++] = j;
- }
- xx = headerAddOrAppendEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE, newdata, fc);
- if (dirCount > dirNamesCount)
- xx = headerAddOrAppendEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
- dirNames + dirNamesCount,
- dirCount - dirNamesCount);
- data = hfd(data, -1);
- newDirNames = hfd(newDirNames, -1);
- free (newdata);
- free (dirNames);
-
- for (i = 0; i < 9; i += 3) {
- const char **Names, **EVR, **newNames, **newEVR;
- rpmTagType nnt, nvt, rnt;
- uint_32 *Flags, *newFlags;
- int Count = 0, newCount = 0;
-
- if (!hge(newH, requireTags[i], &nnt, (void **) &newNames, &newCount))
- continue;
-
- xx = hge(newH, requireTags[i+1], &nvt, (void **) &newEVR, NULL);
- xx = hge(newH, requireTags[i+2], NULL, (void **) &newFlags, NULL);
- if (hge(h, requireTags[i], &rnt, (void **) &Names, &Count))
- {
- xx = hge(h, requireTags[i+1], NULL, (void **) &EVR, NULL);
- xx = hge(h, requireTags[i+2], NULL, (void **) &Flags, NULL);
- for (j = 0; j < newCount; j++)
- for (k = 0; k < Count; k++)
- if (!strcmp (newNames[j], Names[k])
- && !strcmp (newEVR[j], EVR[k])
- && (newFlags[j] & RPMSENSE_SENSEMASK) ==
- (Flags[k] & RPMSENSE_SENSEMASK))
- {
- newNames[j] = NULL;
- /*@innerbreak@*/ break;
- }
- }
- for (j = 0, k = 0; j < newCount; j++) {
-#ifdef DYING
- if (!newNames[j] || !isDependsMULTILIB(newFlags[j]))
-#else
- if (!newNames[j])
-#endif
- /*@innercontinue@*/ continue;
- if (j != k) {
- newNames[k] = newNames[j];
- newEVR[k] = newEVR[j];
- newFlags[k] = newFlags[j];
- }
- k++;
- }
- if (k) {
- xx = headerAddOrAppendEntry(h, requireTags[i],
- RPM_STRING_ARRAY_TYPE, newNames, k);
- xx = headerAddOrAppendEntry(h, requireTags[i+1],
- RPM_STRING_ARRAY_TYPE, newEVR, k);
- xx = headerAddOrAppendEntry(h, requireTags[i+2], RPM_INT32_TYPE,
- newFlags, k);
- }
- newNames = hfd(newNames, nnt);
- newEVR = hfd(newEVR, nvt);
- Names = hfd(Names, rnt);
- }
- return RPMRC_OK;
-}
-/*@=boundswrite@*/
-#endif
-
/**
* Mark files in database shared with this package as "replaced".
* @param psm package state machine data
while ((psm->oh = rpmdbNextIterator(psm->mi))) {
fi->record = rpmdbGetIteratorOffset(psm->mi);
-#ifdef DYING
- if (rpmtsFlags(ts) & RPMTRANS_FLAG_MULTILIB)
- psm->oh = headerCopy(psm->oh);
- else
-#endif
psm->oh = NULL;
/*@loopbreak@*/ break;
}
xx = headerAddEntry(fi->h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE,
&installTime, 1);
-#ifdef DYING
- if (rpmtsFlags(ts) & RPMTRANS_FLAG_MULTILIB) {
- uint_32 multiLib, * newMultiLib, * p;
-
- if (hge(fi->h, RPMTAG_MULTILIBMASK, NULL,
- (void **) &newMultiLib, NULL) &&
- hge(psm->oh, RPMTAG_MULTILIBMASK, NULL,
- (void **) &p, NULL))
- {
- multiLib = *p;
- multiLib |= *newMultiLib;
- xx = hme(psm->oh, RPMTAG_MULTILIBMASK, RPM_INT32_TYPE,
- &multiLib, 1);
- }
- rc = mergeFiles(fi, psm->oh, fi->h);
- if (rc) break;
- }
-#endif
-
/*
* If this package has already been installed, remove it from
* the database before adding the new one.
RPMTAG_PAYLOADFORMAT = 1124,
RPMTAG_PAYLOADCOMPRESSOR = 1125,
RPMTAG_PAYLOADFLAGS = 1126,
- RPMTAG_MULTILIBMASK = 1127,
+/*@-enummemuse@*/
+ RPMTAG_MULTILIBMASK = 1127, /*!< internal - obsolete */
+/*@=enummemuse@*/
RPMTAG_INSTALLTID = 1128,
RPMTAG_REMOVETID = 1129,
/*@-enummemuse@*/
RPMFILE_UNPATCHED = (1 << 10), /*!< placeholder (SuSE) */
RPMFILE_PUBKEY = (1 << 11), /*!< from %%pubkey */
} rpmfileAttrs;
-#define RPMFILE_MULTILIB_SHIFT 12
-#define RPMFILE_MULTILIB(N) ((N) << RPMFILE_MULTILIB_SHIFT)
-#define RPMFILE_MULTILIB_MASK RPMFILE_MULTILIB(7)
#define RPMFILE_ALL ~(RPMFILE_NONE)
-/* XXX Check file flags for multilib marker. */
-#define isFileMULTILIB(_fflags) ((_fflags) & RPMFILE_MULTILIB_MASK)
-
/**
* Dependency Attributes.
*/
RPMSENSE_TRIGGERIN = (1 << 16), /*!< %triggerin dependency. */
RPMSENSE_TRIGGERUN = (1 << 17), /*!< %triggerun dependency. */
RPMSENSE_TRIGGERPOSTUN = (1 << 18), /*!< %triggerpostun dependency. */
- RPMSENSE_MULTILIB = (1 << 19),
+ /* (1 << 19) unused. */
RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */
RPMSENSE_SCRIPT_BUILD = (1 << 21), /*!< %build build dependency. */
RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */
#define RPMSENSE_TRIGGER \
(RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN)
-#define isDependsMULTILIB(_dflags) ((_dflags) & RPMSENSE_MULTILIB)
-
#define _ALL_REQUIRES_MASK (\
RPMSENSE_INTERP | \
RPMSENSE_SCRIPT_PRE | \
/*@-enummemuse@*/
RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), /*!< @todo Document. */
/*@=enummemuse@*/
- RPMTRANS_FLAG_MULTILIB = (1 << 8), /*!< @todo Document. */
+ /* (1 << 8) unused. */
RPMTRANS_FLAG_DIRSTASH = (1 << 9), /*!< from --dirstash */
RPMTRANS_FLAG_REPACKAGE = (1 << 10), /*!< from --repackage */