ALT Linux Bugzilla
– Attachment 6283 Details for
Bug 22431
сорит ошибками при установке
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
suppress-Unknown-media-type
altbug22431.patch (text/plain), 2.48 KB, created by
Gleb F-Malinovskiy
on 2015-05-14 17:41:12 MSK
(
hide
)
Description:
suppress-Unknown-media-type
Filename:
MIME Type:
Creator:
Gleb F-Malinovskiy
Created:
2015-05-14 17:41:12 MSK
Size:
2.48 KB
patch
obsolete
>diff --git a/shared-mime-info-1.4-suppress-Unknown-media-type-if-from-filetrigger.patch b/shared-mime-info-1.4-suppress-Unknown-media-type-if-from-filetrigger.patch >new file mode 100644 >index 0000000..ed3a280 >--- /dev/null >+++ b/shared-mime-info-1.4-suppress-Unknown-media-type-if-from-filetrigger.patch >@@ -0,0 +1,41 @@ >+From 668ac161beaeecb8c93f90dbdff806a77cc5ef36 Mon Sep 17 00:00:00 2001 >+From: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> >+Date: Thu, 14 May 2015 14:35:19 +0300 >+Subject: [PATCH] update-mime-database.c: suppress 'Unknown media type in type' >+ warnings ... >+ >+... if program is run from rpm filetrigger. >+ >+See-Also: https://bugzilla.altlinux.org/show_bug.cgi?id=22431 >+See-Also: https://bugs.freedesktop.org/show_bug.cgi?id=16816 >+--- >+ update-mime-database.c | 11 +++++++++++ >+ 1 file changed, 11 insertions(+) >+ >+--- a/update-mime-database.c >++++ b/update-mime-database.c >+@@ -170,6 +170,16 @@ static Match *match_new(void); >+ >+ static TreeMagic *tree_magic_new(xmlNode *node, Type *type, GError **error); >+ >++static int rpm_filetrigger(void) >++{ >++ static int from_rpm_filetrigger = -1; >++ >++ if (from_rpm_filetrigger < 0) >++ from_rpm_filetrigger = getenv("ALT_RPM_FILETRIGGER") ? 1: 0; >++ >++ return from_rpm_filetrigger; >++} >++ >+ static void g_log_handler (const gchar *log_domain, >+ GLogLevelFlags log_level, >+ const gchar *message, >+@@ -264,6 +274,7 @@ static Type *get_type(const char *name, GError **error) >+ return type; >+ } >+ >++ if (!rpm_filetrigger()) >+ g_warning("Unknown media type in type '%s'", name); >+ >+ return type; >diff --git a/shared-mime-info.filetrigger b/shared-mime-info.filetrigger >index 7f93b37..481350e 100755 >--- a/shared-mime-info.filetrigger >+++ b/shared-mime-info.filetrigger >@@ -1,4 +1,5 @@ > #!/bin/sh -e > > export XDG_DATA_DIRS=/usr/share >+export ALT_RPM_FILETRIGGER=1 > grep -qs '^/usr/share/mime/packages/.*\.xml$' && update-mime-database -n /usr/share/mime ||: >diff --git a/shared-mime-info.spec b/shared-mime-info.spec >index fff4c34..35aa54d 100644 >--- a/shared-mime-info.spec >+++ b/shared-mime-info.spec >@@ -12,6 +12,7 @@ Url: http://www.freedesktop.org/wiki/Software/%name > Source: http://www.freedesktop.org/~hadess/%name-%version.tar.xz > Source2: %name.filetrigger > Patch: %name-0.19-alt-cachedir-param.patch >+Patch1: %name-1.4-suppress-Unknown-media-type-if-from-filetrigger.patch > > Requires: rpm-build-xdg > >@@ -51,6 +52,7 @@ format and merging them together. > %prep > %setup > %patch >+%patch1 -p1 > > rm -f freedesktop.org.xml >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22431
: 6283