aboutsummaryrefslogtreecommitdiffstats
path: root/parsehdlist.c
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-03-12 15:20:41 +0000
committerFrancois Pons <fpons@mandriva.com>2001-03-12 15:20:41 +0000
commitc344baaa1044129fce2c4c5d1e085151c3f47e80 (patch)
tree50200309d48e271da25d226c2e9a54fc8f366b66 /parsehdlist.c
parente2f72487d1078e0d7ab6b99233a5fb7afb7765a6 (diff)
downloadrpmtools-c344baaa1044129fce2c4c5d1e085151c3f47e80.tar
rpmtools-c344baaa1044129fce2c4c5d1e085151c3f47e80.tar.gz
rpmtools-c344baaa1044129fce2c4c5d1e085151c3f47e80.tar.bz2
rpmtools-c344baaa1044129fce2c4c5d1e085151c3f47e80.tar.xz
rpmtools-c344baaa1044129fce2c4c5d1e085151c3f47e80.zip
*** empty log message ***
Diffstat (limited to 'parsehdlist.c')
-rw-r--r--parsehdlist.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/parsehdlist.c b/parsehdlist.c
index 46bfe6b..6514db2 100644
--- a/parsehdlist.c
+++ b/parsehdlist.c
@@ -245,7 +245,6 @@ int main(int argc, char **argv)
close(fdno[0]);
close(fdno[1]);
} else {
-#if 1
int fda, fdn;
struct {
char header[4];
@@ -256,9 +255,14 @@ int main(int argc, char **argv)
char uncompress[40];
char trailer[4];
} buf;
- char *unpacker[21]; /* enough for 40 bytes above to never overbuf */
+ char *unpacker[22]; /* enough for 40 bytes above to never overbuf */
char *p = buf.uncompress;
int ip = 0;
+ char *ld_loader = getenv("LD_LOADER");
+
+ if (ld_loader && *ld_loader) {
+ unpacker[ip++] = ld_loader;
+ }
dup2(fdno[1], STDOUT_FILENO);
fda = open(argv[i], O_RDONLY);
@@ -285,10 +289,6 @@ int main(int argc, char **argv)
fdn = open("/dev/null", O_WRONLY);
dup2(fdn, STDERR_FILENO);
execvp(unpacker[0], unpacker);
-#else
- dup2(fdno[1], STDOUT_FILENO);
- execlp("packdrake", "packdrake", "-c", argv[i], NULL);
-#endif
exit(2);
}
} else {