- bump rpm and popt versions to insure "newer".

- change default behavior to resolve file conflicts as LIFO.
- add --fileconflicts to recover rpm traditional behavior.
- prefer elf64 over elf32 files, everywhere and always (#126853).

CVS patchset: 7354
CVS date: 2004/07/05 15:24:17
This commit is contained in:
jbj 2004-07-05 15:24:17 +00:00
parent bc600c50e3
commit 07444608bc
4 changed files with 43 additions and 22 deletions

12
CHANGES
View File

@ -5,9 +5,9 @@
- conditional build support/unification (jajcus,malekith,qboosh,wiget@PLD).
- fix: readelf.c breakage on some non x86 arches (qboosh@PLD).
- find-lang.sh: implemented --with-kde (finds KDE help files);
add --all-name option (finds every lang file); drop defattr()
- add --all-name option (finds every lang file); drop defattr()
from *.lang files (arekm,mkochano,pascalek,wiget@PLD).
= add type to tag array.
- add type to tag array.
4.3.1 -> 4.3.2:
- use /etc/selinux/targeted/contexts/files/file_contexts for now.
@ -40,7 +40,7 @@
- add aurora/sparc patches (#124469).
- use poll(2) if available, avoid borked aurora/sparc select (#124574).
4.2.2 -> 4.3:
4.2.3 -> 4.3:
- upgrade to zlib-1.2.beta7.
- fix: short option help missing string terminator.
- permit secondary tag match patterns with RPMQV_ALL.
@ -79,6 +79,12 @@
- endian neutral rpmdb join keys (finally).
- fix: dev package build on s390x hack around.
4.2.2 -> 4.2.3:
- bump rpm and popt versions to insure "newer".
- change default behavior to resolve file conflicts as LIFO.
- add --fileconflicts to recover rpm traditional behavior.
- prefer elf64 over elf32 files, everywhere and always (#126853).
4.2.1 -> 4.2.2:
- unify signal handling in librpmio, use condvar to deliver signal.
- make peace with libtool-1.5, autoconf-2.59, automake-1.8.

View File

@ -14,7 +14,21 @@ extern time_t get_date(const char * p, void * now); /* XXX expedient lies */
/*@=redecl@*/
/*@unchecked@*/
struct rpmInstallArguments_s rpmIArgs;
struct rpmInstallArguments_s rpmIArgs = {
0, /* transFlags */
/* probFilter */
(RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
0, /* installInterfaceFlags */
0, /* eraseInterfaceFlags */
0, /* qva_flags */
0, /* rbtid */
0, /* numRelocations */
0, /* noDeps */
0, /* incldocs */
NULL, /* relocations */
NULL, /* prefix */
NULL /* rootdir */
};
#define POPT_RELOCATE -1021
#define POPT_EXCLUDEPATH -1022
@ -191,6 +205,9 @@ struct poptOption rpmInstallPoptTable[] = {
N_("skip files with leading component <path> "),
N_("<path>") },
{ "fileconflicts", '\0', POPT_BIT_CLR, &rpmIArgs.probFilter,
(RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
N_("detect file conflicts between packages"), NULL},
{ "force", '\0', 0, NULL, RPMCLI_POPT_FORCE,
N_("short hand for --replacepkgs --replacefiles"), NULL},
@ -297,7 +314,7 @@ struct poptOption rpmInstallPoptTable[] = {
N_("save erased package files by repackaging"), NULL},
{ "replacefiles", '\0', POPT_BIT_SET, &rpmIArgs.probFilter,
(RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES),
N_("install even if the package replaces installed files"), NULL},
N_("ignore file conflicts between packages"), NULL},
{ "replacepkgs", '\0', POPT_BIT_SET,
&rpmIArgs.probFilter, RPMPROB_FILTER_REPLACEPKG,
N_("reinstall if the package is already present"), NULL},

View File

@ -188,22 +188,23 @@ static int handleInstInstalledFiles(const rpmts ts,
continue;
if (rpmfiCompare(otherFi, fi)) {
int rConflicts;
rConflicts = reportConflicts;
/* Resolve file conflicts to prefer Elf64 (if not forced). */
if (tscolor != 0 && FColor != 0 && FColor != oFColor
&& reportConflicts)
if (tscolor != 0 && FColor != 0 && FColor != oFColor)
{
if (oFColor & 0x2) {
fi->actions[fileNum] = FA_SKIP;
reportConflicts = 0;
rConflicts = 0;
} else
if (FColor & 0x2) {
fi->actions[fileNum] = FA_CREATE;
reportConflicts = 0;
rConflicts = 0;
}
}
if (reportConflicts) {
if (rConflicts) {
rpmpsAppend(ps, RPMPROB_FILE_CONFLICT,
rpmteNEVR(p), rpmteKey(p),
rpmfiDN(fi), rpmfiBN(fi),
@ -559,33 +560,35 @@ static void handleOverlappedFiles(const rpmts ts,
assert(otherFi != NULL);
/* Mark added overlapped non-identical files as a conflict. */
if (rpmfiCompare(otherFi, fi)) {
int rConflicts;
rConflicts = reportConflicts;
/* Resolve file conflicts to prefer Elf64 (if not forced) ... */
if (tscolor != 0 && reportConflicts) {
if (tscolor != 0) {
if (FColor & 0x2) {
/* ... last Elf64 file is installed ... */
if (!XFA_SKIPPING(fi->actions[i]))
otherFi->actions[otherFileNum] = FA_SKIP;
fi->actions[i] = FA_CREATE;
reportConflicts = 0;
rConflicts = 0;
} else
if (oFColor & 0x2) {
/* ... first Elf64 file is installed ... */
if (XFA_SKIPPING(fi->actions[i]))
otherFi->actions[otherFileNum] = FA_CREATE;
fi->actions[i] = FA_SKIP;
reportConflicts = 0;
rConflicts = 0;
} else
if (FColor == 0 && oFColor == 0) {
/* ... otherwise, do both, last in wins. */
otherFi->actions[otherFileNum] = FA_CREATE;
fi->actions[i] = FA_CREATE;
reportConflicts = 0;
rConflicts = 0;
}
done = 1;
}
if (reportConflicts) {
if (rConflicts) {
rpmpsAppend(ps, RPMPROB_NEW_FILE_CONFLICT,
rpmteNEVR(p), rpmteKey(p),
fn, NULL,

View File

@ -101,7 +101,7 @@ static struct poptOption optionsTable[] = {
#endif /* IAM_RPMEIU */
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0,
N_("Common options for all rpm modes:"),
N_("Common options for all rpm modes and executables:"),
NULL },
POPT_AUTOALIAS
@ -409,7 +409,7 @@ int main(int argc, const char ** argv)
#if defined(IAM_RPMEIU)
if (!( bigMode == MODE_INSTALL ) &&
(ia->probFilter & (RPMPROB_FILTER_REPLACEPKG | RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES | RPMPROB_FILTER_OLDPACKAGE)))
(ia->probFilter & (RPMPROB_FILTER_REPLACEPKG | RPMPROB_FILTER_OLDPACKAGE)))
argerror(_("only installation, upgrading, rmsource and rmspec may be forced"));
if (bigMode != MODE_INSTALL && (ia->probFilter & RPMPROB_FILTER_FORCERELOCATE))
argerror(_("files may only be relocated during package installation"));
@ -434,11 +434,6 @@ int main(int argc, const char ** argv)
argerror(_("--percent may only be specified during package "
"installation"));
if (bigMode != MODE_INSTALL &&
(ia->probFilter & (RPMPROB_FILTER_REPLACEOLDFILES|RPMPROB_FILTER_REPLACENEWFILES)))
argerror(_("--replacefiles may only be specified during package "
"installation"));
if (bigMode != MODE_INSTALL && (ia->probFilter & RPMPROB_FILTER_REPLACEPKG))
argerror(_("--replacepkgs may only be specified during package "
"installation"));