summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--build/rpmfc.c14
-rw-r--r--elfutils/po/elfutils.pot2
-rw-r--r--macros.in7
-rw-r--r--rpm.spec.in5
-rw-r--r--tools/rpmdeps.c12
6 files changed, 31 insertions, 10 deletions
diff --git a/CHANGES b/CHANGES
index 384b20c0c..708c687c9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -27,6 +27,7 @@
- fix: option conflict error message (#77373).
- add AC_SYS_LARGFILE throughout.
- statically link rpmdeps against (internal) libfmagic.
+ - use rpmdeps rather than find-{requires,provides}.
4.0.4 -> 4.1:
- loosely wire beecrypt library into rpm.
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 668a15b01..af506ed12 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -51,7 +51,7 @@ static StringBuf getOutputFrom(/*@null@*/ const char * dir, ARGV_t argv,
/*@globals fileSystem, internalState@*/
/*@modifies fileSystem, internalState@*/
{
- int progPID;
+ pid_t child, reaped;
int toProg[2];
int fromProg[2];
int status;
@@ -68,7 +68,7 @@ static StringBuf getOutputFrom(/*@null@*/ const char * dir, ARGV_t argv,
fromProg[0] = fromProg[1] = 0;
(void) pipe(fromProg);
- if (!(progPID = fork())) {
+ if (!(child = fork())) {
(void) close(toProg[1]);
(void) close(fromProg[0]);
@@ -82,6 +82,9 @@ static StringBuf getOutputFrom(/*@null@*/ const char * dir, ARGV_t argv,
(void) chdir(dir);
}
+ rpmMessage(RPMMESS_DEBUG, _("\texecv(%s) pid %d\n"),
+ argv[0], (unsigned)getpid());
+
unsetenv("MALLOC_CHECK_");
(void) execvp(argv[0], (char *const *)argv);
/* XXX this error message is probably not seen. */
@@ -89,7 +92,7 @@ static StringBuf getOutputFrom(/*@null@*/ const char * dir, ARGV_t argv,
argv[0], strerror(errno));
_exit(RPMERR_EXEC);
}
- if (progPID < 0) {
+ if (child < 0) {
rpmError(RPMERR_FORK, _("Couldn't fork %s: %s\n"),
argv[0], strerror(errno));
return NULL;
@@ -172,7 +175,10 @@ top:
/*@=type@*/
/* Collect status from prog */
- (void)waitpid(progPID, &status, 0);
+ reaped = waitpid(child, &status, 0);
+ rpmMessage(RPMMESS_DEBUG, _("\twaitpid(%d) rc %d status %x\n"),
+ (unsigned)child, (unsigned)reaped, status);
+
if (failNonZero && (!WIFEXITED(status) || WEXITSTATUS(status))) {
rpmError(RPMERR_EXEC, _("%s failed\n"), argv[0]);
return NULL;
diff --git a/elfutils/po/elfutils.pot b/elfutils/po/elfutils.pot
index 924f260b2..b6a9666c0 100644
--- a/elfutils/po/elfutils.pot
+++ b/elfutils/po/elfutils.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-11-19 13:42-0500\n"
+"POT-Creation-Date: 2002-11-20 10:07-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/macros.in b/macros.in
index 42cab0571..431bc6fa7 100644
--- a/macros.in
+++ b/macros.in
@@ -1,7 +1,7 @@
#/*! \page config_macros Default configuration: @RPMCONFIGDIR@/macros
# \verbatim
#
-# $Id: macros.in,v 1.127 2002/11/12 20:09:04 jbj Exp $
+# $Id: macros.in,v 1.128 2002/11/20 15:13:03 jbj Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
@@ -130,13 +130,12 @@ package or when debugging this package. \
%_defaultdocdir %{_usr}/doc
# Path to scripts to autogenerate package dependencies.
-%__find_provides @FINDPROVIDES@
-%__find_requires @FINDREQUIRES@
+%__find_provides @RPMCONFIGDIR@/rpmdeps --provides
+%__find_requires @RPMCONFIGDIR@/rpmdeps --requires
#%__find_prereq ???
#%__find_conflicts ???
#%__find_obsoletes ???
-%__file_z_n %{__file} -z -n -m @RPMCONFIGDIR@/magic
%__perl_provides @RPMCONFIGDIR@/perl.prov
%__perl_requires @RPMCONFIGDIR@/perl.req
diff --git a/rpm.spec.in b/rpm.spec.in
index 8187294b5..3a83b4205 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -16,7 +16,7 @@ Name: rpm
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
-Release: 0.11
+Release: 0.12
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
Copyright: GPL
@@ -483,6 +483,9 @@ exit 0
%{__prefix}/include/popt.h
%changelog
+* Wed Nov 20 2002 Jeff Johnson <jbj@redhat.com> 4.2-0.12
+- use rpmdeps rather than find-{requires,provides}.
+
* Tue Nov 19 2002 Jeff Johnson <jbj@redhat.com> 4.2-0.11
- fix: option conflict error message (#77373).
- add AC_SYS_LARGFILE throughout.
diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c
index 5a570dc66..cca7f5336 100644
--- a/tools/rpmdeps.c
+++ b/tools/rpmdeps.c
@@ -87,6 +87,14 @@ int i;
xx = argvSort(av, NULL);
+ wid = 1;
+ for (i = 0; i < ac; i++) {
+ size_t nw;
+ nw = strlen(av[i]);
+ if (nw > wid)
+ wid = nw;
+ }
+
/* Output of file(1) in sb_stdout. */
sb_stdout = newStringBuf();
fm->magicfile = default_magicfile;
@@ -99,6 +107,9 @@ int i;
*fm->obp = '\0';
fm->nob = sizeof(fm->obuf);
xx = fmagicProcess(fm, av[i], wid);
+
+ rpmMessage(RPMMESS_DEBUG, "%s\n", fm->obuf);
+
appendLineStringBuf(sb_stdout, fm->obuf);
}
@@ -125,6 +136,7 @@ rpmfcPrint(buf, fc, NULL);
fc = rpmfcFree(fc);
xav = argvFree(xav);
+ ec = 0;
exit:
optCon = rpmcliFini(optCon);