aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--parsehdlist.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5032bf4..6954d3a 100644
--- a/Makefile
+++ b/Makefile
@@ -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", "");