X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=rpm-chroot-hack.patch;fp=rpm-chroot-hack.patch;h=0000000000000000000000000000000000000000;hb=6fce50075952edfa510790ca6be81e6d3fb9e214;hp=472eb6df2277949697169b3a88370e9fc6987fba;hpb=e8194500fe8808a194e9ceeb3f8433e24464001a;p=packages%2Frpm.git diff --git a/rpm-chroot-hack.patch b/rpm-chroot-hack.patch deleted file mode 100644 index 472eb6d..0000000 --- a/rpm-chroot-hack.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- rpm-4.5/rpmio/rpmrpc.c~ 2009-10-16 01:18:18.566743349 +0300 -+++ rpm-4.5/rpmio/rpmrpc.c 2009-10-16 01:18:21.863999841 +0300 -@@ -179,5 +179,6 @@ - { - const char * lpath; - int ut = urlPath(path, &lpath); -+ int fdno; - - if (_rpmio_debug) -@@ -212,7 +213,17 @@ - if (mode == 0) - mode = 0644; - #endif -- return open(path, flags, mode); -+ fdno = open(path, flags, mode); -+ /* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */ -+ if (fdno < 0 && errno == ENOENT) { -+ const char *dbpath = rpmExpand("%{_dbpath}", "/", NULL); -+ const char *fn = strstr(path + 1, dbpath); -+ if (fn) -+ fdno = open(fn, flags, mode); -+ if (dbpath) -+ dbpath = _free(dbpath); -+ } -+ return fdno; - } - - /* XXX rpmdb.c: analogue to rename(2). */