From 0ca7ac6a7d239e397d65840771960d830916318ac999b7389d91e8db6359f3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 9 Jun 2011 08:38:43 +0000 Subject: [PATCH] - change sigpipe fix so that the code really reads everything from the pipe - move desktop.attr to update-desktop-files OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=127 --- buildpipe.diff | 12 ++++++++++-- mimetype.diff | 24 ++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.spec | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 mimetype.diff diff --git a/buildpipe.diff b/buildpipe.diff index 81099ed..9493c95 100644 --- a/buildpipe.diff +++ b/buildpipe.diff @@ -1,5 +1,5 @@ --- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000 -+++ build/rpmfc.c 2011-06-08 10:00:38.000000000 +0000 ++++ build/rpmfc.c 2011-06-09 08:30:25.000000000 +0000 @@ -165,12 +165,14 @@ static int sigpipe_init(void) fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC)); /* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */ @@ -15,7 +15,15 @@ close(_sigpipe[0]); close(_sigpipe[1]); _sigpipe[0] = -1; -@@ -298,10 +300,9 @@ static StringBuf getOutputFrom(ARGV_t ar +@@ -290,6 +292,7 @@ static StringBuf getOutputFrom(ARGV_t ar + if (FD_ISSET(fromProg[0], &ibits)) { + int nbr = read(fromProg[0], buf, sizeof(buf)-1); + if (nbr < 0 && errno == EINTR) continue; ++ if (nbr == 0) break; /* EOF, we're done */ + if (nbr < 0) { + myerrno = errno; + break; +@@ -298,10 +301,9 @@ static StringBuf getOutputFrom(ARGV_t ar appendStringBuf(readBuff, buf); } diff --git a/mimetype.diff b/mimetype.diff new file mode 100644 index 0000000..886cf38 --- /dev/null +++ b/mimetype.diff @@ -0,0 +1,24 @@ +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig ++++ autodeps/linux.prov +@@ -11,6 +11,7 @@ solist=($(printf "%s\n" "${filelist[@]}" + pythonlist= + tcllist= + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) ++mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) + + # + # --- Alpha does not mark 64bit dependencies +@@ -59,6 +60,11 @@ done | sort -u + printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u + + # ++# --- mimetypes in .desktop files ++[ -x /usr/lib/rpm/mimetypes.prov -a -n "$mimetypelist" ] && ++ printf "%s\n" "${mimetypelist[@]}" | /usr/lib/rpm/mimetypes.prov | sort -u ++ ++# + # --- Mono exes/dlls + : ${MONO_PREFIX=/usr} + if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then diff --git a/rpm-python.spec b/rpm-python.spec index f9b1795..60aa95f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 6 +Release: 7 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index f364216..32484a7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 11 +Release: 13 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2