RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 16-Jul-2017 21:05:29 Branch: rpm-5_4 Handle: 2017071619052800 Modified files: (Branch: rpm-5_4) rpm/lib .cvsignore Makefile.am manifest.c rpminstall.c Log: - sanity. Summary: Revision Changes Path 1.15.4.4 +1 -1 rpm/lib/.cvsignore 2.203.2.20 +1 -1 rpm/lib/Makefile.am 2.26.6.4 +3 -1 rpm/lib/manifest.c 1.229.2.10 +11 -2 rpm/lib/rpminstall.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/lib/.cvsignore ============================================================================ $ cvs diff -u -r1.15.4.3 -r1.15.4.4 .cvsignore --- rpm/lib/.cvsignore 4 Mar 2017 19:32:39 -0000 1.15.4.3 +++ rpm/lib/.cvsignore 16 Jul 2017 19:05:28 -0000 1.15.4.4 @@ -21,7 +21,7 @@ *_json_printer.h *_reader.h *_verifier.h +rpmtag_builder.h.E popt-1.14-1.i386.rpm tmp thdr - @@ . patch -p0 <<'@@ .' Index: rpm/lib/Makefile.am ============================================================================ $ cvs diff -u -r2.203.2.19 -r2.203.2.20 Makefile.am --- rpm/lib/Makefile.am 4 Mar 2017 19:33:58 -0000 2.203.2.19 +++ rpm/lib/Makefile.am 16 Jul 2017 19:05:28 -0000 2.203.2.20 @@ -178,7 +178,7 @@ rpmtag_json_parser.h \ rpmtag.fbs.d \ rpmtag.bfbs -BUILT_SOURCES += $(FLATCC_RPMTAG_FILES) +#BUILT_SOURCES += $(FLATCC_RPMTAG_FILES) $(FLATCC_RPMTAG_FILES): $(top_srcdir)/rpmdb/rpmtag.fbs $(FLATCC) $< $(CPP) $@ > $@.E @@ . patch -p0 <<'@@ .' Index: rpm/lib/manifest.c ============================================================================ $ cvs diff -u -r2.26.6.3 -r2.26.6.4 manifest.c --- rpm/lib/manifest.c 16 May 2017 18:29:10 -0000 2.26.6.3 +++ rpm/lib/manifest.c 16 Jul 2017 19:05:28 -0000 2.26.6.4 @@ -169,7 +169,9 @@ nav = NULL; for (i = 0; i < ac; i++) { struct stat sb, *st = &sb; - if (Stat(av[i], st) == 0 && S_ISREG(st->st_mode) && st->st_size > 0) { + int xx = Stat(av[i], st); + /* XXX FIXME: st->st_size > 0, but st->st_size == -1 for URL's. */ + if (xx == 0 && S_ISREG(st->st_mode) && st->st_size != 0) { if (nav == NULL) rpmlog(RPMLOG_DEBUG, "=== %s\n", fdGetOPath(xfd)); @@ . patch -p0 <<'@@ .' Index: rpm/lib/rpminstall.c ============================================================================ $ cvs diff -u -r1.229.2.9 -r1.229.2.10 rpminstall.c --- rpm/lib/rpminstall.c 9 Jun 2017 04:39:11 -0000 1.229.2.9 +++ rpm/lib/rpminstall.c 16 Jul 2017 19:05:28 -0000 1.229.2.10 @@ -6,6 +6,7 @@ #include <rpmio.h> #include <rpmiotypes.h> +#include <rpmurl.h> #include <poptIO.h> #include <rpmtag.h> @@ -122,17 +123,18 @@ void * rc = NULL; const char * filename = (const char *)key; static FD_t fd = NULL; + urltype ut; int xx; switch (what) { case RPMCALLBACK_INST_OPEN_FILE: if (filename == NULL || filename[0] == '\0') return NULL; + ut = urlPath(filename, NULL); fd = Fopen(filename, "r%{?_rpmgio}"); /* XXX Retry once to handle http:// server timeout reopen's. */ if (Ferror(fd)) { - int ut = urlPath(filename, NULL); if (ut == URL_IS_HTTP || ut == URL_IS_HTTPS) { /* XXX HACK: Fclose(fd) no workie here. */ fd = Fopen(filename, "r%{?_rpmgio}"); @@ -150,7 +152,14 @@ fd = fdLink(fd, "persist (showProgress)"); #if defined(POSIX_FADV_WILLNEED) - (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED); + switch (ut) { + default: + break; + case URL_IS_PATH: + case URL_IS_UNKNOWN: + (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED); + break; + } #endif return (void *)fd; @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org