From 88d089d92eafca3aefc3dc824c0dd04f4a7d437a Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 30 Nov 2012 15:59:45 +0100 Subject: [PATCH] Open src.rpm files in file-roller instead of PackageKit --- 0001-Add-mime-type-for-source-RPMs.patch | 30 ++++++++++++++++++++++++ file-roller-defaults.list | 1 + shared-mime-info.spec | 10 ++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 0001-Add-mime-type-for-source-RPMs.patch diff --git a/0001-Add-mime-type-for-source-RPMs.patch b/0001-Add-mime-type-for-source-RPMs.patch new file mode 100644 index 0000000..94167ec --- /dev/null +++ b/0001-Add-mime-type-for-source-RPMs.patch @@ -0,0 +1,30 @@ +From 4462b30c5b9592f134ce7d4fb7b7139f58c92a78 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Fri, 30 Nov 2012 15:50:49 +0100 +Subject: [PATCH] Add mime-type for source RPMs + +--- + freedesktop.org.xml.in | 7 +++++++ + tests/foo-0.1-1.fc18.src.rpm | Bin 0 -> 2393 bytes + tests/list | 2 ++ + 3 files changed, 9 insertions(+) + create mode 100644 tests/foo-0.1-1.fc18.src.rpm + +diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in +index e67e2c7..8f1e5ba 100644 +--- a/freedesktop.org.xml.in ++++ b/freedesktop.org.xml.in +@@ -2936,6 +2936,13 @@ command to generate the output files. + + + ++ ++ <_comment>Source RPM package ++ ++ ++ ++ ++ + + <_comment>Ruby script + diff --git a/file-roller-defaults.list b/file-roller-defaults.list index fad7535..19a428e 100644 --- a/file-roller-defaults.list +++ b/file-roller-defaults.list @@ -92,3 +92,4 @@ application/x-zip-compressed=gnome-file-roller.desktop; application/x-zoo=gnome-file-roller.desktop; application/zip=gnome-file-roller.desktop; application/x-archive=gnome-file-roller.desktop; +application/x-source-rpm=gnome-file-roller.desktop; diff --git a/shared-mime-info.spec b/shared-mime-info.spec index 4bf2e9b..7df7271 100644 --- a/shared-mime-info.spec +++ b/shared-mime-info.spec @@ -1,7 +1,7 @@ Summary: Shared MIME information database Name: shared-mime-info Version: 1.0 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: System Environment/Base URL: http://freedesktop.org/Software/shared-mime-info @@ -11,7 +11,7 @@ Source1: defaults.list # for i in `cat /home/hadess/Projects/jhbuild/totem/data/mime-type-list.txt | grep -v real | grep -v ^#` ; do if grep MimeType /home/hadess/Projects/jhbuild/rhythmbox/data/rhythmbox.desktop.in.in | grep -q "$i;" ; then echo "$i=rhythmbox.desktop;totem.desktop;" >> totem-defaults.list ; else echo "$i=totem.desktop;" >> totem-defaults.list ; fi ; done ; for i in `cat /home/hadess/Projects/jhbuild/totem/data/uri-schemes-list.txt | grep -v ^#` ; do echo "x-scheme-handler/$i=totem.desktop;" >> totem-defaults.list ; done Source2: totem-defaults.list # Generated with: -# for i in `grep MimeType= /usr/share/applications/gnome-file-roller.desktop | sed 's/MimeType=//' | sed 's/;/ /g'` ; do if ! `grep -q $i defaults.list` ; then echo $i=gnome-file-roller.desktop\; >> file-roller-defaults.list ; fi ; done +# for i in `grep MimeType= /usr/share/applications/gnome-file-roller.desktop | sed 's/MimeType=//' | sed 's/;/ /g'` ; do if ! `grep -q $i defaults.list` application/x-source-rpm ; then echo $i=gnome-file-roller.desktop\; >> file-roller-defaults.list ; fi ; done Source3: file-roller-defaults.list # Generated with: # for i in `grep MimeType= /usr/share/applications/shotwell-viewer.desktop | sed 's/MimeType=//' | sed 's/;/ /g'` ; do echo $i=shotwell-viewer.desktop\; >> shotwell-viewer-defaults.list ; done @@ -20,6 +20,8 @@ Source4: shotwell-viewer-defaults.list # Work-around for https://bugs.freedesktop.org/show_bug.cgi?id=40354 Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch +Patch1: 0001-Add-mime-type-for-source-RPMs.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libxml2-devel BuildRequires: glib2-devel @@ -41,6 +43,7 @@ and looking up the correct MIME type in a database. %prep %setup -q %patch0 -p1 -b .ooo-zip +%patch1 -p1 %build @@ -86,6 +89,9 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/* %{_mandir}/man*/* %changelog +* Fri Nov 30 2012 Bastien Nocera 1.0-6 +- Open src.rpm files in file-roller instead of PackageKit + * Mon Nov 05 2012 Bastien Nocera 1.0-6 - Rebuild file-roller's default list