diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-02-05 10:08:44 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-02-05 10:08:44 +0200 |
commit | e1ca3be052b4f0bbc417489c3f97a00323630469 (patch) | |
tree | 5e21fa537b979942375931d12a9e8ed5c31ae885 /lib | |
parent | 5786cf78db37d9b129470cefdce5c0faf2c5c183 (diff) | |
download | librpm-tizen-e1ca3be052b4f0bbc417489c3f97a00323630469.tar.gz librpm-tizen-e1ca3be052b4f0bbc417489c3f97a00323630469.tar.bz2 librpm-tizen-e1ca3be052b4f0bbc417489c3f97a00323630469.zip |
Rip the horrible (ia64) autorelocate kludgery. RIP.
- we don't support relocated x86 on ppc in qemu either...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psm.c | 33 | ||||
-rw-r--r-- | lib/rpmal.c | 6 | ||||
-rw-r--r-- | lib/rpmfi.c | 55 | ||||
-rw-r--r-- | lib/rpmte.c | 1 | ||||
-rw-r--r-- | lib/rpmte_internal.h | 1 |
5 files changed, 0 insertions, 96 deletions
@@ -682,39 +682,6 @@ static rpmRC runScript(rpmpsm psm, Header h, rpm_tag_t stag, ? 1 : 0); } -#if __ia64__ - /* XXX This assumes that all interpreters are elf executables. */ - if ((a != NULL && a[0] == 'i' && a[1] != '\0' && a[2] == '8' && a[3] == '6') - && strcmp(argv[0], "/sbin/ldconfig")) - { - char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL); - const char * errstr; - char * newPath; - char * t; - - newPath = headerSprintf(h, fmt, rpmTagTable, rpmHeaderFormats, &errstr); - fmt = _free(fmt); - - /* XXX On ia64, change leading /emul/ix86 -> /emul/ia32, ick. */ - if (newPath != NULL && *newPath != '\0' - && strlen(newPath) >= (sizeof("/emul/i386")-1) - && newPath[0] == '/' && newPath[1] == 'e' && newPath[2] == 'm' - && newPath[3] == 'u' && newPath[4] == 'l' && newPath[5] == '/' - && newPath[6] == 'i' && newPath[8] == '8' && newPath[9] == '6') - { - newPath[7] = 'a'; - newPath[8] = '3'; - newPath[9] = '2'; - } - - t = alloca(strlen(newPath) + strlen(argv[0]) + 1); - *t = '\0'; - (void) stpcpy( stpcpy(t, newPath), argv[0]); - newPath = _free(newPath); - argv[0] = t; - } -#endif - if (hge(h, RPMTAG_INSTPREFIXES, &ipt, (rpm_data_t *) &prefixes, &numPrefixes)) { freePrefixes = 1; } else if (hge(h, RPMTAG_INSTALLPREFIX, NULL, (rpm_data_t *) &oldPrefix, NULL)) { diff --git a/lib/rpmal.c b/lib/rpmal.c index a0956cd7b..7a47b6fe9 100644 --- a/lib/rpmal.c +++ b/lib/rpmal.c @@ -409,12 +409,6 @@ fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, (int) pkgNum, tscolor); { DN = rpmfiDN(fi); -#if defined(__ia64__) -/* XXX Make sure that autorelocated file dependencies are satisfied. */ -#define DNPREFIX "/emul/ia32-linux" - if (!strncmp(DN, DNPREFIX, sizeof(DNPREFIX)-1)) - DN += sizeof(DNPREFIX)-1; -#endif /* XXX: reference to within rpmfi, must not be freed */ dieNeedle->dirName = (char *) DN; } diff --git a/lib/rpmfi.c b/lib/rpmfi.c index 155201d65..b1e012695 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -633,7 +633,6 @@ Header relocateFileList(const rpmts ts, rpmfi fi, uint32_t * dirIndexes; uint32_t * newDirIndexes; rpm_count_t fileCount, dirCount, numValid; - uint32_t mydColor = rpmExpandNumeric("%{?_autorelocate_dcolor}"); uint32_t * fFlags = NULL; uint32_t * fColors = NULL; uint32_t * dColors = NULL; @@ -954,11 +953,6 @@ dColors[j] |= fColors[i]; for (i = dirCount - 1; i >= 0; i--) { for (j = numRelocations - 1; j >= 0; j--) { - /* XXX Don't autorelocate uncolored directories. */ - if (j == p->autorelocatex - && (dColors[i] == 0 || !(dColors[i] & mydColor))) - continue; - if (relocations[j].oldPath == NULL) /* XXX can't happen */ continue; len = strcmp(relocations[j].oldPath, "/") @@ -1280,57 +1274,8 @@ if (fi->actions == NULL) && !headerIsSource(h) && !headerIsEntry(h, RPMTAG_ORIGBASENAMES)) { - char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL); - const char * errstr; - char * newPath; Header foo; - /* XXX error handling. */ - newPath = headerSprintf(h, fmt, rpmTagTable, rpmHeaderFormats, &errstr); - fmt = _free(fmt); - -#if __ia64__ - /* XXX On ia64, change leading /emul/ix86 -> /emul/ia32, ick. */ - if (newPath != NULL && *newPath != '\0' - && strlen(newPath) >= (sizeof("/emul/i386")-1) - && newPath[0] == '/' && newPath[1] == 'e' && newPath[2] == 'm' - && newPath[3] == 'u' && newPath[4] == 'l' && newPath[5] == '/' - && newPath[6] == 'i' && newPath[8] == '8' && newPath[9] == '6') - { - newPath[7] = 'a'; - newPath[8] = '3'; - newPath[9] = '2'; - } -#endif - - /* XXX Make sure autoreloc is not already specified. */ - i = p->nrelocs; - if (newPath != NULL && *newPath != '\0' && p->relocs != NULL) - for (i = 0; i < p->nrelocs; i++) { -/* XXX {old,new}Path might be NULL */ - if (strcmp(p->relocs[i].oldPath, "/")) - continue; - if (strcmp(p->relocs[i].newPath, newPath)) - continue; - break; - } - - /* XXX test for incompatible arch triggering autorelocation is dumb. */ - if (newPath != NULL && *newPath != '\0' && i == p->nrelocs - && p->archScore == 0) - { - - p->relocs = - xrealloc(p->relocs, (p->nrelocs + 2) * sizeof(*p->relocs)); - p->relocs[p->nrelocs].oldPath = xstrdup("/"); - p->relocs[p->nrelocs].newPath = xstrdup(newPath); - p->autorelocatex = p->nrelocs; - p->nrelocs++; - p->relocs[p->nrelocs].oldPath = NULL; - p->relocs[p->nrelocs].newPath = NULL; - } - newPath = _free(newPath); - /* XXX DYING */ if (fi->actions == NULL) fi->actions = xcalloc(fi->fc, sizeof(*fi->actions)); diff --git a/lib/rpmte.c b/lib/rpmte.c index 48c172503..3de5d1e25 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -155,7 +155,6 @@ static void addTE(rpmts ts, rpmte p, Header h, p->relocs[i].oldPath = NULL; p->relocs[i].newPath = NULL; } - p->autorelocatex = -1; p->key = key; p->fd = NULL; diff --git a/lib/rpmte_internal.h b/lib/rpmte_internal.h index 95e43d94e..2101b6d95 100644 --- a/lib/rpmte_internal.h +++ b/lib/rpmte_internal.h @@ -60,7 +60,6 @@ struct rpmte_s { fnpyKey key; /*!< (TR_ADDED) Retrieval key. */ rpmRelocation * relocs; /*!< (TR_ADDED) Payload file relocations. */ int nrelocs; /*!< (TR_ADDED) No. of relocations. */ - int autorelocatex; /*!< (TR_ADDED) Auto relocation entry index. */ FD_t fd; /*!< (TR_ADDED) Payload file descriptor. */ union { |