]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- rel 63; set also LC_COLLATE=C before doing magic_file() check; fixes problem with...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 29 Feb 2012 15:39:42 +0000 (15:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-libmagic-locale.patch -> 1.1.2.2
    rpm.spec -> 1.837.2.42.2.49.2.119

rpm-libmagic-locale.patch
rpm.spec

index b25740706d5cabcfb457387128d50daf270a1c39..68f8d726fe13d4453bc8d85cb9c22bafe77feaf8 100644 (file)
@@ -1,22 +1,35 @@
---- rpm-4.5/lib/rpmfc.c.org    2010-10-06 20:47:04.748417761 +0200
-+++ rpm-4.5/lib/rpmfc.c        2010-10-06 20:48:13.364041124 +0200
-@@ -1356,8 +1356,18 @@
+--- rpm-4.5/lib/rpmfc.c.org    2012-02-29 16:32:05.655058968 +0100
++++ rpm-4.5/lib/rpmfc.c        2012-02-29 16:36:22.430972834 +0100
+@@ -1114,9 +1114,31 @@
            /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */
            else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1))
                ftype = "";
 -          else
 +          else {
-+              char *old_loc = setlocale(LC_CTYPE, NULL);
-+              if (old_loc) {
-+                      old_loc = xstrdup(old_loc);
++              char *old_ctype = setlocale(LC_CTYPE, NULL);
++              char *old_collate = setlocale(LC_COLLATE, NULL);
++
++              if (old_ctype) {
++                      old_ctype = xstrdup(old_ctype);
 +                      setlocale(LC_CTYPE, "C");
 +              }
++              if (old_collate) {
++                      old_ctype = xstrdup(old_collate);
++                      setlocale(LC_COLLATE, "C");
++              }
++
                ftype = magic_file(ms, s);
-+              if (old_loc) {
-+                      setlocale(LC_CTYPE, old_loc);
-+                      _free(old_loc);
++              if (old_ctype) {
++                      setlocale(LC_CTYPE, old_ctype);
++                      _free(old_ctype);
++              }
++              if (old_collate) {
++                      setlocale(LC_COLLATE, old_collate);
++                      _free(old_collate);
 +              }
 +          }
++
            if (ftype == NULL) {
                xx = RPMERR_EXEC;
+               rpmError(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"),
index 9c1e5da621b7be94b8d3598f1a987c3b27a61e2c..0a8a77a10bb93cbc7c71353a00f866e24b889da3 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -57,7 +57,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       4.5
-Release:       62
+Release:       63
 License:       LGPL
 Group:         Base
 Source0:       %{name}-%{version}.tar.gz
This page took 0.161111 seconds and 4 git commands to generate.