diff options
author | Francois Pons <fpons@mandriva.com> | 2000-11-20 17:15:11 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-11-20 17:15:11 +0000 |
commit | e1faf7c7618f84e8cbd8b1c8ec9cd205df318f02 (patch) | |
tree | 5ae78eded75b8f104cbea87e76c5151b6912c25a | |
parent | 52e953b423ceb14f7001b2cd1e9760f8ea6760a0 (diff) | |
download | rpmtools-e1faf7c7618f84e8cbd8b1c8ec9cd205df318f02.tar rpmtools-e1faf7c7618f84e8cbd8b1c8ec9cd205df318f02.tar.gz rpmtools-e1faf7c7618f84e8cbd8b1c8ec9cd205df318f02.tar.bz2 rpmtools-e1faf7c7618f84e8cbd8b1c8ec9cd205df318f02.tar.xz rpmtools-e1faf7c7618f84e8cbd8b1c8ec9cd205df318f02.zip |
fixed big bug for execvl (thanks to francis)
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | parsehdlist.c | 7 |
2 files changed, 7 insertions, 2 deletions
@@ -7,7 +7,7 @@ FROMCC_STATIC = $(FROMCC:%=%_static) ALL = $(FROMC) $(FROMCC) ALL_STATIC = $(FROMC_STATIC) $(FROMCC_STATIC) CFLAGS = -Wall -g -LIBRPM = -lrpm -lrpmio -ldb1 -lz -lbz2 -I/usr/include/rpm -lpopt +LIBRPM = -lrpm -lrpmio -lz -lbz2 -I/usr/include/rpm -lpopt all: $(ALL) diff --git a/parsehdlist.c b/parsehdlist.c index 96b144c..7dc3296 100644 --- a/parsehdlist.c +++ b/parsehdlist.c @@ -2,6 +2,7 @@ #include <sys/wait.h> #include <sys/stat.h> #include <fcntl.h> +#include <errno.h> #include <rpm/rpmlib.h> #include <rpm/header.h> #include <stdio.h> @@ -208,9 +209,12 @@ int main(int argc, char **argv) close(fdno[1]); } else { dup2(fdno[1], STDOUT_FILENO); - execl("/usr/bin/packdrake", "/usr/bin/packdrake", "-c", argv[i]); + execl("/usr/bin/packdrake", "/usr/bin/packdrake", "-c", argv[i], NULL); + perror("packdrake: unable to run packdrake"); exit(2); } + } else { + fprintf(stderr, "packdrake: unable to create pipe for packdrake\n"); } } if (fdFileno(fd) < 0) fprintf(stderr, "parsehdlist: cannot open file %s\n", argv[i]); @@ -272,6 +276,7 @@ int main(int argc, char **argv) hash_in_name = hash(in_name); for (i = 0; i < count_headers; ++i) { if (headers[i].hash_name == hash_in_name && !strcmp(headers[i].name, in_name)) { + printf("found %s:%s\n", in_name, in_tag); if (!strncmp(in_tag, "provides", 8)) print_list(headers[i].header, RPMTAG_PROVIDENAME, "%2$s\n", ""); else if (!strncmp(in_tag, "requires", 8)) print_list_flags(headers[i].header, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION,"%2$s", ""); |