4.0.4-alt97.M50.2
- Removed prehistoric multilib support.
This commit is contained in:
commit
07c1a647d4
@ -88,11 +88,6 @@ typedef struct AttrRec_s {
|
||||
static StringBuf check_fileList = NULL;
|
||||
static int check_fileListLen = 0;
|
||||
|
||||
/**
|
||||
*/
|
||||
/*@unchecked@*/
|
||||
static int multiLib = 0; /* MULTILIB */
|
||||
|
||||
/**
|
||||
* Package file tree walk data.
|
||||
*/
|
||||
@ -839,38 +834,6 @@ static int parseForRegexLang(const char * fileName, /*@out@*/ char ** lang)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
static int parseForRegexMultiLib(const char *fileName)
|
||||
/*@globals rpmGlobalMacroContext @*/
|
||||
/*@modifies rpmGlobalMacroContext @*/
|
||||
{
|
||||
static int initialized = 0;
|
||||
static int hasRegex = 0;
|
||||
static regex_t compiledPatt;
|
||||
|
||||
if (! initialized) {
|
||||
const char *patt;
|
||||
int rc = 0;
|
||||
|
||||
initialized = 1;
|
||||
patt = rpmExpand("%{?_multilibpatt}", NULL);
|
||||
if (!(patt && *patt))
|
||||
rc = 1;
|
||||
else if (regcomp(&compiledPatt, patt, REG_EXTENDED | REG_NOSUB))
|
||||
rc = -1;
|
||||
patt = _free(patt);
|
||||
if (rc)
|
||||
return rc;
|
||||
hasRegex = 1;
|
||||
}
|
||||
|
||||
if (! hasRegex || regexec(&compiledPatt, fileName, 0, NULL, 0))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/*@-exportlocal -exportheadervar@*/
|
||||
@ -882,7 +845,6 @@ VFA_t virtualFileAttributes[] = {
|
||||
{ "%exclude", RPMFILE_EXCLUDE },
|
||||
{ "%readme", RPMFILE_README },
|
||||
{ "%license", RPMFILE_LICENSE },
|
||||
{ "%multilib", 0 },
|
||||
|
||||
#if WHY_NOT
|
||||
{ "%spec", RPMFILE_SPEC },
|
||||
@ -949,8 +911,6 @@ static int parseForSimple(/*@unused@*/Spec spec, Package pkg, char * buf,
|
||||
if (!vfa->flag) {
|
||||
if (!strcmp(s, "%dir"))
|
||||
fl->isDir = 1; /* XXX why not RPMFILE_DIR? */
|
||||
else if (!strcmp(s, "%multilib"))
|
||||
fl->currentFlags |= multiLib;
|
||||
} else
|
||||
fl->currentFlags |= vfa->flag;
|
||||
/*@innerbreak@*/ break;
|
||||
@ -1132,7 +1092,6 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl,
|
||||
rpmGlobalMacroContext, fileSystem @*/
|
||||
{
|
||||
int _addDotSlash = !(isSrc || rpmExpandNumeric("%{?_noPayloadPrefix}"));
|
||||
uint_32 multiLibMask = 0;
|
||||
int apathlen = 0;
|
||||
int dpathlen = 0;
|
||||
int skipLen = 0;
|
||||
@ -1214,11 +1173,6 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl,
|
||||
/* Leave room for both dirname and basename NUL's */
|
||||
dpathlen += (strlen(flp->diskURL) + 2);
|
||||
|
||||
if (flp->flags & RPMFILE_MULTILIB_MASK)
|
||||
multiLibMask |=
|
||||
(1u << ((flp->flags & RPMFILE_MULTILIB_MASK))
|
||||
>> RPMFILE_MULTILIB_SHIFT);
|
||||
|
||||
/*
|
||||
* Make the header, the OLDFILENAMES will get converted to a
|
||||
* compressed file list write before we write the actual package to
|
||||
@ -1337,14 +1291,6 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl,
|
||||
|
||||
}
|
||||
|
||||
/* XXX This should be added always so that packages look alike.
|
||||
* XXX However, there is logic in files.c/depends.c that checks for
|
||||
* XXX existence (rather than value) that will need to change as well.
|
||||
*/
|
||||
if (multiLibMask)
|
||||
(void) headerAddEntry(h, RPMTAG_MULTILIBS, RPM_INT32_TYPE,
|
||||
&multiLibMask, 1);
|
||||
|
||||
if (_addDotSlash)
|
||||
(void) rpmlibNeedsFeature(h, "PayloadFilesHavePrefix", "4.0-1");
|
||||
|
||||
@ -1456,8 +1402,6 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl,
|
||||
CPIO_MAP_TYPE | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID;
|
||||
if (isSrc)
|
||||
fi->fmapflags[i] |= CPIO_FOLLOW_SYMLINKS;
|
||||
if (flp->flags & RPMFILE_MULTILIB_MASK)
|
||||
fi->fmapflags[i] |= CPIO_MULTILIB;
|
||||
|
||||
if (S_ISREG(flp->fl_mode) && flp->fl_nlink == 1)
|
||||
fl->totalFileSize += flp->fl_size;
|
||||
@ -1823,11 +1767,6 @@ static int addFile(FileList fl, const char * diskURL,
|
||||
flp->specdFlags = fl->currentSpecdFlags;
|
||||
flp->verifyFlags = fl->currentVerifyFlags;
|
||||
|
||||
if (multiLib
|
||||
&& !(flp->flags & RPMFILE_MULTILIB_MASK)
|
||||
&& !parseForRegexMultiLib(fileURL))
|
||||
flp->flags |= multiLib;
|
||||
|
||||
}
|
||||
|
||||
fl->fileListRecsUsed++;
|
||||
@ -1935,12 +1874,6 @@ static int processPackageFiles(Spec spec, Package pkg,
|
||||
AttrRec specialDocAttrRec = &arbuf;
|
||||
char *specialDoc = NULL;
|
||||
|
||||
#ifdef MULTILIB
|
||||
multiLib = rpmExpandNumeric("%{?_multilibno}");
|
||||
if (multiLib)
|
||||
multiLib = RPMFILE_MULTILIB(multiLib);
|
||||
#endif /* MULTILIB */
|
||||
|
||||
nullAttrRec(specialDocAttrRec);
|
||||
pkg->cpioList = NULL;
|
||||
|
||||
@ -2688,7 +2621,7 @@ done:
|
||||
|
||||
/**
|
||||
*/
|
||||
static int generateDepends(Spec spec, Package pkg, TFI_t cpioList, int multiLib)
|
||||
static int generateDepends(Spec spec, Package pkg, TFI_t cpioList)
|
||||
/*@globals rpmGlobalMacroContext,
|
||||
fileSystem, internalState @*/
|
||||
/*@modifies cpioList, rpmGlobalMacroContext,
|
||||
@ -2751,11 +2684,6 @@ static int generateDepends(Spec spec, Package pkg, TFI_t cpioList, int multiLib)
|
||||
if (fi && fi->fc > 0) {
|
||||
fileListBuf = newStringBuf();
|
||||
for (i = 0, fileListBytes = 0; i < fi->fc; i++) {
|
||||
if (fi->fmapflags && multiLib == 2) {
|
||||
if (!(fi->fmapflags[i] & CPIO_MULTILIB))
|
||||
continue;
|
||||
fi->fmapflags[i] &= ~CPIO_MULTILIB;
|
||||
}
|
||||
appendStringBuf(fileListBuf, fi->dnl[fi->dil[i]]);
|
||||
fileListBytes += strlen(fi->dnl[fi->dil[i]]);
|
||||
appendLineStringBuf(fileListBuf, fi->bnl[i]);
|
||||
@ -2917,11 +2845,6 @@ static int generateDepends(Spec spec, Package pkg, TFI_t cpioList, int multiLib)
|
||||
}
|
||||
|
||||
/* Parse dependencies into header */
|
||||
tagflags &= ~RPMSENSE_MULTILIB;
|
||||
if (multiLib > 1)
|
||||
tagflags |= RPMSENSE_MULTILIB;
|
||||
else
|
||||
tagflags &= ~RPMSENSE_MULTILIB;
|
||||
rc = parseRCPOT(spec, pkg, getStringBuf(readBuf), tag, 0, tagflags);
|
||||
readBuf = freeStringBuf(readBuf);
|
||||
|
||||
@ -2988,9 +2911,6 @@ static void printDepMsg(DepMsg_t * dm, int count, const char ** names,
|
||||
bingo = 2;
|
||||
rpmMessage(RPMMESS_NORMAL, " %s", *names);
|
||||
|
||||
if (hasFlags && isDependsMULTILIB(*flags))
|
||||
rpmMessage(RPMMESS_NORMAL, " (multilib)");
|
||||
|
||||
if (hasVersions && !(*versions != NULL && **versions != '\0'))
|
||||
continue;
|
||||
if (!(hasFlags && (*flags && RPMSENSE_SENSEMASK)))
|
||||
@ -3302,19 +3222,9 @@ int processBinaryFiles(Spec spec, int installSpecialDoc, int test)
|
||||
rc = processPackageFiles(spec, pkg, installSpecialDoc, test);
|
||||
if (rc) break;
|
||||
|
||||
/* XXX This should be added always so that packages look alike.
|
||||
* XXX However, there is logic in files.c/depends.c that checks for
|
||||
* XXX existence (rather than value) that will need to change as well.
|
||||
*/
|
||||
if (headerIsEntry(pkg->header, RPMTAG_MULTILIBS)) {
|
||||
rc = generateDepends(spec, pkg, pkg->cpioList, 1);
|
||||
if (rc) break;
|
||||
rc = generateDepends(spec, pkg, pkg->cpioList, 2);
|
||||
if (rc) break;
|
||||
} else {
|
||||
rc = generateDepends(spec, pkg, pkg->cpioList, 0);
|
||||
if (rc) break;
|
||||
}
|
||||
rc = generateDepends(spec, pkg, pkg->cpioList);
|
||||
if (rc) break;
|
||||
|
||||
/*@-noeffect@*/
|
||||
printDeps(pkg->header);
|
||||
/*@=noeffect@*/
|
||||
|
@ -503,7 +503,6 @@ static tags_struct tags_files_list[] = {
|
||||
{0, "ghost"},
|
||||
{0, "lang"},
|
||||
{0, "license"},
|
||||
{0, "multilib"},
|
||||
{0, "readme"},
|
||||
{0, "verify"},
|
||||
};
|
||||
|
@ -68,20 +68,11 @@ for SUBST in $SUBSTS ; do
|
||||
RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's, ,\ ,g'`"
|
||||
|
||||
ARCH_INSTALL_POST='%{nil}'
|
||||
MULTILIBNO=
|
||||
case "${ARCH}-${OS}" in
|
||||
sparc-linux) MULTILIBNO=1 ;;
|
||||
sparcv9-linux) MULTILIBNO=1 ;;
|
||||
sparc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-sparc64-linux; LIB=lib64; MULTILIBNO=2 ;;
|
||||
x86_64-linux) LIB=lib64; MULTILIBNO=2 ;;
|
||||
sparc64-linux) LIB=lib64 ;;
|
||||
x86_64-linux) LIB=lib64 ;;
|
||||
esac
|
||||
|
||||
if [ -n "$MULTILIBNO" ]; then
|
||||
MULTILIBSED='-e /^@MULTILIB/d -e s,@MULTILIBNO@,'$MULTILIBNO,
|
||||
else
|
||||
MULTILIBSED='-e /^@MULTILIBSTART@/,/^@MULTILIBEND@/d'
|
||||
fi
|
||||
|
||||
case $VENDOR in
|
||||
alt)
|
||||
VENDORSED='-e s,^@alt@,,'
|
||||
@ -108,7 +99,6 @@ for SUBST in $SUBSTS ; do
|
||||
-e "s,@LIB@,$LIB," \
|
||||
-e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
|
||||
-e "s,@DEFAULTDOCDIR@,$DEFAULTDOCDIR," \
|
||||
$MULTILIBSED \
|
||||
$VENDORSED \
|
||||
| grep -v '^@' \
|
||||
> ${PPD}/macros
|
||||
|
@ -67,7 +67,6 @@ typedef enum cpioMapFlags_e {
|
||||
CPIO_MAP_ADDDOT = (1 << 6),
|
||||
CPIO_ALL_HARDLINKS = (1 << 7), /*!< fail if hardlinks are missing. */
|
||||
CPIO_MAP_TYPE = (1 << 8), /*!< only for building. */
|
||||
CPIO_MULTILIB = (1 << 31) /*!< internal, only for building. */
|
||||
} cpioMapFlags;
|
||||
|
||||
#define CPIO_NEWC_MAGIC "070701"
|
||||
|
@ -231,9 +231,6 @@ alAddPackage(availableList al,
|
||||
int first, last, fileNum;
|
||||
int origNumDirs;
|
||||
int pkgNum;
|
||||
uint_32 multiLibMask = 0;
|
||||
uint_32 * fileFlags = NULL;
|
||||
uint_32 * pp = NULL;
|
||||
|
||||
if (al->size == al->alloced) {
|
||||
al->alloced += al->delta;
|
||||
@ -245,28 +242,9 @@ alAddPackage(availableList al,
|
||||
p->h = headerLink(h); /* XXX reference held by transaction set */
|
||||
p->depth = p->npreds = 0;
|
||||
memset(&p->tsi, 0, sizeof(p->tsi));
|
||||
p->multiLib = 0; /* MULTILIB */
|
||||
|
||||
(void) headerNVR(p->h, &p->name, &p->version, &p->release);
|
||||
|
||||
/* XXX This should be added always so that packages look alike.
|
||||
* XXX However, there is logic in files.c/depends.c that checks for
|
||||
* XXX existence (rather than value) that will need to change as well.
|
||||
*/
|
||||
if (hge(p->h, RPMTAG_MULTILIBS, NULL, (void **) &pp, NULL))
|
||||
multiLibMask = *pp;
|
||||
|
||||
if (multiLibMask) {
|
||||
for (i = 0; i < pkgNum - 1; i++) {
|
||||
if (!strcmp (p->name, al->list[i].name)
|
||||
&& hge(al->list[i].h, RPMTAG_MULTILIBS, NULL,
|
||||
(void **) &pp, NULL)
|
||||
&& !rpmVersionCompare(p->h, al->list[i].h)
|
||||
&& *pp && !(*pp & multiLibMask))
|
||||
p->multiLib = multiLibMask;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hge(h, RPMTAG_EPOCH, NULL, (void **) &p->epoch, NULL))
|
||||
p->epoch = NULL;
|
||||
|
||||
@ -310,7 +288,6 @@ alAddPackage(availableList al,
|
||||
} else {
|
||||
(void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, &numDirs);
|
||||
(void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
|
||||
(void) hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlags, NULL);
|
||||
|
||||
/* XXX FIXME: We ought to relocate the directory list here */
|
||||
|
||||
@ -359,8 +336,6 @@ alAddPackage(availableList al,
|
||||
dirMatch->files[dirMatch->numFiles].baseName =
|
||||
p->baseNames[fileNum];
|
||||
dirMatch->files[dirMatch->numFiles].pkgNum = pkgNum;
|
||||
dirMatch->files[dirMatch->numFiles].fileFlags =
|
||||
fileFlags[fileNum];
|
||||
dirMatch->numFiles++;
|
||||
}
|
||||
|
||||
@ -434,14 +409,6 @@ static void alMakeIndex(availableList al)
|
||||
k = 0;
|
||||
for (i = 0; i < al->size; i++) {
|
||||
for (j = 0; j < al->list[i].providesCount; j++) {
|
||||
|
||||
/* If multilib install, skip non-multilib provides. */
|
||||
if (al->list[i].multiLib &&
|
||||
!isDependsMULTILIB(al->list[i].provideFlags[j])) {
|
||||
ai->size--;
|
||||
continue;
|
||||
}
|
||||
|
||||
ai->index[k].package = al->list + i;
|
||||
ai->index[k].entry = al->list[i].provides[j];
|
||||
ai->index[k].entryLen = strlen(al->list[i].provides[j]);
|
||||
@ -781,18 +748,6 @@ int rpmtransAddPackage(rpmTransactionSet ts, Header h, FD_t fd,
|
||||
while((h2 = rpmdbNextIterator(mi)) != NULL) {
|
||||
if (rpmDigestCompare(h, h2) || rpmVersionCompare(h, h2))
|
||||
(void) removePackage(ts, rpmdbGetIteratorOffset(mi), alNum);
|
||||
else {
|
||||
uint_32 *p, multiLibMask = 0, oldmultiLibMask = 0;
|
||||
|
||||
if (hge(h2, RPMTAG_MULTILIBS, NULL, (void **) &p, NULL))
|
||||
oldmultiLibMask = *p;
|
||||
if (hge(h, RPMTAG_MULTILIBS, NULL, (void **) &p, NULL))
|
||||
multiLibMask = *p;
|
||||
if (oldmultiLibMask && multiLibMask
|
||||
&& !(oldmultiLibMask & multiLibMask)) {
|
||||
ts->addedPackages.list[alNum].multiLib = multiLibMask;
|
||||
}
|
||||
}
|
||||
}
|
||||
mi = rpmdbFreeIterator(mi);
|
||||
}
|
||||
@ -952,14 +907,6 @@ alAllFileSatisfiesDepend(const availableList al,
|
||||
strcmp(dirMatch->files[i].baseName, baseName))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* If a file dependency would be satisfied by a file
|
||||
* we are not going to install, skip it.
|
||||
*/
|
||||
if (al->list[dirMatch->files[i].pkgNum].multiLib &&
|
||||
!isFileMULTILIB(dirMatch->files[i].fileFlags))
|
||||
continue;
|
||||
|
||||
if (keyType)
|
||||
rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (added files)\n"),
|
||||
keyType, fileName);
|
||||
@ -1307,11 +1254,10 @@ exit:
|
||||
* @param psp dependency problems
|
||||
* @param h header to check
|
||||
* @param keyName dependency name
|
||||
* @param multiLib skip multilib colored dependencies?
|
||||
* @return 0 no problems found
|
||||
*/
|
||||
static int checkPackageDeps(rpmTransactionSet ts, problemsSet psp,
|
||||
Header h, const char * keyName, uint_32 multiLib)
|
||||
Header h, const char * keyName)
|
||||
/*@modifies ts, h, psp */
|
||||
{
|
||||
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
|
||||
@ -1350,11 +1296,6 @@ static int checkPackageDeps(rpmTransactionSet ts, problemsSet psp,
|
||||
if (keyName && strcmp(keyName, requires[i]))
|
||||
continue;
|
||||
|
||||
/* If this requirement comes from the core package only, not libraries,
|
||||
then if we're installing the libraries only, don't count it in. */
|
||||
if (multiLib && !isDependsMULTILIB(requireFlags[i]))
|
||||
continue;
|
||||
|
||||
keyDepend = printDepend("R",
|
||||
requires[i], requiresEVR[i], requireFlags[i]);
|
||||
|
||||
@ -1431,11 +1372,6 @@ static int checkPackageDeps(rpmTransactionSet ts, problemsSet psp,
|
||||
if (keyName && strcmp(keyName, conflicts[i]))
|
||||
continue;
|
||||
|
||||
/* If this requirement comes from the core package only, not libraries,
|
||||
then if we're installing the libraries only, don't count it in. */
|
||||
if (multiLib && !isDependsMULTILIB(conflictFlags[i]))
|
||||
continue;
|
||||
|
||||
keyDepend = printDepend("C", conflicts[i], conflictsEVR[i], conflictFlags[i]);
|
||||
|
||||
rc = unsatisfiedDepend(ts, "Conflicts", keyDepend,
|
||||
@ -1505,7 +1441,7 @@ static int checkPackageSet(rpmTransactionSet ts, problemsSet psp,
|
||||
(void) rpmdbPruneIterator(mi,
|
||||
ts->removedPackages, ts->numRemovedPackages, 1);
|
||||
while ((h = rpmdbNextIterator(mi)) != NULL) {
|
||||
if (checkPackageDeps(ts, psp, h, key, 0)) {
|
||||
if (checkPackageDeps(ts, psp, h, key)) {
|
||||
rc = 1;
|
||||
break;
|
||||
}
|
||||
@ -2226,7 +2162,7 @@ int rpmdepCheck(rpmTransactionSet ts,
|
||||
|
||||
rpmMessage(RPMMESS_DEBUG, "========== +++ %s-%s-%s\n" ,
|
||||
p->name, p->version, p->release);
|
||||
rc = checkPackageDeps(ts, ps, p->h, NULL, p->multiLib);
|
||||
rc = checkPackageDeps(ts, ps, p->h, NULL);
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
|
@ -56,7 +56,6 @@ struct availablePackage {
|
||||
int tree; /*!< Tree index. */
|
||||
struct tsortInfo_s tsi; /*!< Dependency tsort data. */
|
||||
|
||||
uint_32 multiLib; /* MULTILIB */
|
||||
/*@kept@*//*@null@*/ const void * key; /*!< Private data associated with a package (e.g. file name of package). */
|
||||
/*@null@*/ rpmRelocation * relocs;
|
||||
/*@null@*/ FD_t fd;
|
||||
@ -90,7 +89,6 @@ struct availableIndex {
|
||||
*/
|
||||
struct fileIndexEntry {
|
||||
int pkgNum; /*!< Containing package number. */
|
||||
int fileFlags; /* MULTILIB */
|
||||
/*@dependent@*/ /*@null@*/ const char * baseName; /*!< File basename. */
|
||||
} ;
|
||||
|
||||
|
@ -545,8 +545,6 @@ int fsmMapPath(FSM_t fsm)
|
||||
switch (fsm->action) {
|
||||
case FA_SKIP:
|
||||
break;
|
||||
case FA_SKIPMULTILIB: /* XXX RPMFILE_STATE_MULTILIB? */
|
||||
break;
|
||||
case FA_UNKNOWN:
|
||||
break;
|
||||
|
||||
@ -2142,7 +2140,6 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
|
||||
case FA_ERASE: return "erase";
|
||||
case FA_SKIPNSTATE: return "skipnstate";
|
||||
case FA_SKIPNETSHARED: return "skipnetshared";
|
||||
case FA_SKIPMULTILIB: return "skipmultilib";
|
||||
default: return "???";
|
||||
}
|
||||
/*@notreached@*/
|
||||
|
208
lib/psm.c
208
lib/psm.c
@ -356,191 +356,6 @@ static int rpmInstallLoadMacros(TFI_t fi, Header h)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, 1 on failure
|
||||
*/
|
||||
static int mergeFiles(TFI_t 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_SKIPMULTILIB) {
|
||||
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_SKIPMULTILIB)
|
||||
((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_SKIPMULTILIB)
|
||||
((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_SKIPMULTILIB)
|
||||
((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_SKIPMULTILIB)
|
||||
((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 1;
|
||||
/*@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_SKIPMULTILIB)
|
||||
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))
|
||||
{
|
||||
(void) hge(h, requireTags[i+1], NULL, (void **) &EVR, NULL);
|
||||
(void) 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++) {
|
||||
if (!newNames[j] || !isDependsMULTILIB(newFlags[j]))
|
||||
/*@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 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark files in database shared with this package as "replaced".
|
||||
* @param psm package state machine data
|
||||
@ -1460,10 +1275,7 @@ assert(psm->mi == NULL);
|
||||
|
||||
while ((psm->oh = rpmdbNextIterator(psm->mi))) {
|
||||
fi->record = rpmdbGetIteratorOffset(psm->mi);
|
||||
if (ts->transFlags & RPMTRANS_FLAG_MULTILIB)
|
||||
psm->oh = headerCopy(psm->oh);
|
||||
else
|
||||
psm->oh = NULL;
|
||||
psm->oh = NULL;
|
||||
/*@loopbreak@*/ break;
|
||||
}
|
||||
psm->mi = rpmdbFreeIterator(psm->mi);
|
||||
@ -1837,24 +1649,6 @@ assert(psm->mi == NULL);
|
||||
xx = headerAddEntry(fi->h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE,
|
||||
&installTime, 1);
|
||||
|
||||
if (ts->transFlags & RPMTRANS_FLAG_MULTILIB) {
|
||||
uint_32 multiLib, * newMultiLib, * p;
|
||||
|
||||
if (hge(fi->h, RPMTAG_MULTILIBS, NULL,
|
||||
(void **) &newMultiLib, NULL) &&
|
||||
hge(psm->oh, RPMTAG_MULTILIBS, NULL,
|
||||
(void **) &p, NULL))
|
||||
{
|
||||
multiLib = *p;
|
||||
multiLib |= *newMultiLib;
|
||||
xx = hme(psm->oh, RPMTAG_MULTILIBS, RPM_INT32_TYPE,
|
||||
&multiLib, 1);
|
||||
}
|
||||
rc = mergeFiles(fi, psm->oh, fi->h);
|
||||
if (rc) break;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If this package has already been installed, remove it from
|
||||
* the database before adding the new one.
|
||||
|
@ -164,7 +164,7 @@ struct psm_s {
|
||||
TFI_t fi; /*!< transaction element file info */
|
||||
FD_t cfd; /*!< Payload file handle. */
|
||||
FD_t fd; /*!< Repackage file handle. */
|
||||
Header oh; /*!< Repackage/multilib header. */
|
||||
Header oh; /*!< Repackage header. */
|
||||
/*@null@*/
|
||||
rpmdbMatchIterator mi;
|
||||
/*@observer@*/
|
||||
|
17
lib/rpmlib.h
17
lib/rpmlib.h
@ -396,7 +396,7 @@ typedef enum rpmTag_e {
|
||||
RPMTAG_PAYLOADFORMAT = 1124,
|
||||
RPMTAG_PAYLOADCOMPRESSOR = 1125,
|
||||
RPMTAG_PAYLOADFLAGS = 1126,
|
||||
RPMTAG_MULTILIBS = 1127,
|
||||
// ___TAG_MULTILIBS = 1127,
|
||||
RPMTAG_INSTALLTID = 1128,
|
||||
RPMTAG_REMOVETID = 1129,
|
||||
RPMTAG_SHA1RHN = 1130, /*!< internal - obsolete */
|
||||
@ -453,15 +453,9 @@ typedef enum rpmfileAttrs_e {
|
||||
RPMFILE_README = (1 << 8), /*!< from %%readme */
|
||||
RPMFILE_EXCLUDE = (1 << 9) /*!< from %%exclude */
|
||||
} rpmfileAttrs;
|
||||
#define RPMFILE_MULTILIB_SHIFT 9
|
||||
#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.
|
||||
*/
|
||||
@ -489,7 +483,7 @@ typedef enum rpmsenseFlags_e {
|
||||
RPMSENSE_TRIGGERIN = (1 << 16), /*!< %triggerin dependency. */
|
||||
RPMSENSE_TRIGGERUN = (1 << 17), /*!< %triggerun dependency. */
|
||||
RPMSENSE_TRIGGERPOSTUN = (1 << 18), /*!< %triggerpostun dependency. */
|
||||
RPMSENSE_MULTILIB = (1 << 19),
|
||||
// ___SENSE_MULTILIB = (1 << 19),
|
||||
RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */
|
||||
RPMSENSE_SCRIPT_BUILD = (1 << 21), /*!< %build build dependency. */
|
||||
RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */
|
||||
@ -510,8 +504,6 @@ typedef enum rpmsenseFlags_e {
|
||||
#define RPMSENSE_TRIGGER \
|
||||
(RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN)
|
||||
|
||||
#define isDependsMULTILIB(_dflags) ((_dflags) & RPMSENSE_MULTILIB)
|
||||
|
||||
#define _ALL_REQUIRES_MASK (\
|
||||
RPMSENSE_INTERP | \
|
||||
RPMSENSE_SCRIPT_PRE | \
|
||||
@ -1227,11 +1219,10 @@ typedef enum fileAction_e {
|
||||
FA_ERASE, /*!< ... to be removed. */
|
||||
FA_SKIPNSTATE, /*!< ... untouched, state "not installed". */
|
||||
FA_SKIPNETSHARED, /*!< ... untouched, state "netshared". */
|
||||
FA_SKIPMULTILIB /*!< ... untouched. @todo state "multilib" ???. */
|
||||
} fileAction;
|
||||
|
||||
#define XFA_SKIPPING(_a) \
|
||||
((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPMULTILIB)
|
||||
((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED)
|
||||
|
||||
/**
|
||||
* File types.
|
||||
@ -1424,7 +1415,7 @@ typedef enum rpmtransFlags_e {
|
||||
/*@-enummemuse@*/
|
||||
RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), /*!< @todo Document. */
|
||||
/*@=enummemuse@*/
|
||||
RPMTRANS_FLAG_MULTILIB = (1 << 8), /*!< @todo Document. */
|
||||
// ___TRANS_FLAG_MULTILIB = (1 << 8), /*!< @todo Document. */
|
||||
RPMTRANS_FLAG_DIRSTASH = (1 << 9), /*!< from --dirstash */
|
||||
RPMTRANS_FLAG_REPACKAGE = (1 << 10), /*!< from --repackage */
|
||||
|
||||
|
@ -299,7 +299,6 @@ static fileTypes whatis(uint_16 mode)
|
||||
|
||||
/**
|
||||
* Relocate files in header.
|
||||
* @todo multilib file dispositions need to be checked.
|
||||
* @param ts transaction set
|
||||
* @param fi transaction element file info
|
||||
* @param alp available package
|
||||
@ -366,7 +365,6 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi,
|
||||
validType, validRelocations, numValid);
|
||||
validRelocations = hfd(validRelocations, validType);
|
||||
}
|
||||
/* XXX FIXME multilib file actions need to be checked. */
|
||||
return headerLink(origH);
|
||||
}
|
||||
|
||||
@ -514,19 +512,6 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi,
|
||||
fileTypes ft;
|
||||
int fnlen;
|
||||
|
||||
/*
|
||||
* If only adding libraries of different arch into an already
|
||||
* installed package, skip all other files.
|
||||
*/
|
||||
if (alp->multiLib && !isFileMULTILIB((fFlags[i]))) {
|
||||
if (actions) {
|
||||
actions[i] = FA_SKIPMULTILIB;
|
||||
rpmMessage(RPMMESS_DEBUG, _("excluding multilib path %s%s\n"),
|
||||
dirNames[dirIndexes[i]], baseNames[i]);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
len = reldel +
|
||||
strlen(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1;
|
||||
if (len >= fileAlloced) {
|
||||
@ -1562,8 +1547,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
|
||||
if (ts->transFlags & RPMTRANS_FLAG_NOTRIGGERS)
|
||||
ts->transFlags |= _noTransTriggers;
|
||||
|
||||
/* XXX MULTILIB is broken, as packages can and do execute /sbin/ldconfig. */
|
||||
if (ts->transFlags & (RPMTRANS_FLAG_JUSTDB | RPMTRANS_FLAG_MULTILIB))
|
||||
if (ts->transFlags & RPMTRANS_FLAG_JUSTDB)
|
||||
ts->transFlags |= (_noTransScripts | _noTransTriggers);
|
||||
|
||||
ts->notify = notify;
|
||||
@ -1667,8 +1651,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
|
||||
mi = rpmdbFreeIterator(mi);
|
||||
}
|
||||
|
||||
/* XXX multilib should not display "already installed" problems */
|
||||
if (!(ts->ignoreSet & RPMPROB_FILTER_REPLACEPKG) && !alp->multiLib) {
|
||||
if (!(ts->ignoreSet & RPMPROB_FILTER_REPLACEPKG)) {
|
||||
rpmdbMatchIterator mi;
|
||||
char b[80];
|
||||
|
||||
@ -2068,8 +2051,6 @@ assert(alp == fi->ap);
|
||||
fi->h = headerFree(fi->h);
|
||||
}
|
||||
fi->h = headerLink(h);
|
||||
if (alp->multiLib)
|
||||
ts->transFlags |= RPMTRANS_FLAG_MULTILIB;
|
||||
|
||||
assert(alp == fi->ap);
|
||||
if (psmStage(psm, PSM_PKGINSTALL)) {
|
||||
|
@ -86,13 +86,6 @@
|
||||
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
|
||||
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
|
||||
|
||||
@MULTILIBSTART@
|
||||
#---------------------------------------------------------------------
|
||||
# Multilibs
|
||||
%_multilibno @MULTILIBNO@
|
||||
%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
|
||||
@MULTILIBEND@
|
||||
|
||||
#==============================================================================
|
||||
# ---- Build policy macros.
|
||||
#
|
||||
|
@ -3451,11 +3451,6 @@ msgstr ""
|
||||
msgid "%5d relocate %s -> %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/transaction.c:524
|
||||
#, c-format
|
||||
msgid "excluding multilib path %s%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/transaction.c:587
|
||||
#, c-format
|
||||
msgid "excluding %s %s\n"
|
||||
|
5
po/ru.po
5
po/ru.po
@ -2913,11 +2913,6 @@ msgstr "%5d
|
||||
msgid "%5d relocate %s -> %s\n"
|
||||
msgstr "%5d ÐÅÒÅÍÅÝÅÎÉÅ %s -> %s\n"
|
||||
|
||||
#: lib/transaction.c:527
|
||||
#, c-format
|
||||
msgid "excluding multilib path %s%s\n"
|
||||
msgstr "ÉÓËÌÀÞÁÅÔÓÑ ÍÎÏÇÏÂÉÂÌÉÏÔÅÞÎÙÊ ÐÕÔØ %s%s\n"
|
||||
|
||||
#: lib/transaction.c:590
|
||||
#, c-format
|
||||
msgid "excluding %s %s\n"
|
||||
|
@ -985,7 +985,6 @@ void initrpm(void) {
|
||||
REGISTER_ENUM(RPMSENSE_TRIGGERIN);
|
||||
REGISTER_ENUM(RPMSENSE_TRIGGERUN);
|
||||
REGISTER_ENUM(RPMSENSE_TRIGGERPOSTUN);
|
||||
REGISTER_ENUM(RPMSENSE_MULTILIB);
|
||||
REGISTER_ENUM(RPMSENSE_SCRIPT_PREP);
|
||||
REGISTER_ENUM(RPMSENSE_SCRIPT_BUILD);
|
||||
REGISTER_ENUM(RPMSENSE_SCRIPT_INSTALL);
|
||||
@ -1001,7 +1000,6 @@ void initrpm(void) {
|
||||
REGISTER_ENUM(RPMTRANS_FLAG_NODOCS);
|
||||
REGISTER_ENUM(RPMTRANS_FLAG_ALLFILES);
|
||||
REGISTER_ENUM(RPMTRANS_FLAG_KEEPOBSOLETE);
|
||||
REGISTER_ENUM(RPMTRANS_FLAG_MULTILIB);
|
||||
|
||||
REGISTER_ENUM(RPMPROB_FILTER_IGNOREOS);
|
||||
REGISTER_ENUM(RPMPROB_FILTER_IGNOREARCH);
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Name: %rpm_name
|
||||
Version: %rpm_version
|
||||
Release: alt97.M50.1
|
||||
Release: alt97.M50.2
|
||||
|
||||
%define ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
|
||||
%define get_dep() %(rpm -q --qf '%%{NAME} >= %%|SERIAL?{%%{SERIAL}:}|%%{VERSION}-%%{RELEASE}' %1 2>/dev/null || echo '%1 >= unknown')
|
||||
@ -547,6 +547,9 @@ fi
|
||||
%endif #with contrib
|
||||
|
||||
%changelog
|
||||
* Tue Mar 10 2009 Alexey Tourbin <at@altlinux.ru> 4.0.4-alt97.M50.2
|
||||
- Removed prehistoric multilib support.
|
||||
|
||||
* Mon Mar 09 2009 Alexey Tourbin <at@altlinux.ru> 4.0.4-alt97.M50.1
|
||||
- alt97.M50 release series is for branch 5.0, alt98 is for Sisyphus.
|
||||
- Updated %%config algorithm to avoid unnecessary *.rpmnew, *.rpmsave,
|
||||
|
Loading…
x
Reference in New Issue
Block a user