]>
Commit | Line | Data |
---|---|---|
f02308f2 MB |
1 | diff -urN rpm-5.1.4/lib/rpmfc.c rpm-5.1.4.new/lib/rpmfc.c |
2 | --- rpm-5.1.4/lib/rpmfc.c 2008-07-29 19:36:38.000000000 +0200 | |
3 | +++ rpm-5.1.4.new/lib/rpmfc.c 2008-07-29 19:43:42.000000000 +0200 | |
4 | @@ -527,6 +527,8 @@ | |
835ea24d MB |
5 | { "troff or preprocessor input", RPMFC_MANPAGE|RPMFC_INCLUDE }, |
6 | { "GNU Info", RPMFC_MANPAGE|RPMFC_INCLUDE }, | |
7 | ||
07050e78 | 8 | + { "Desktop Entry", RPMFC_DESKTOP_FILE|RPMFC_INCLUDE }, |
835ea24d MB |
9 | + |
10 | { "perl script text", RPMFC_PERL|RPMFC_INCLUDE }, | |
11 | { "Perl5 module source text", RPMFC_PERL|RPMFC_MODULE|RPMFC_INCLUDE }, | |
12 | ||
f02308f2 | 13 | @@ -875,6 +877,10 @@ |
835ea24d MB |
14 | xx = rpmfcHelper(fc, 'P', "java", fc->noautoprov, fc->noautoprov_c); |
15 | if (fc->findreq) | |
16 | xx = rpmfcHelper(fc, 'R', "java", fc->noautoreq, fc->noautoreq_c); | |
17 | + } else | |
18 | + if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) { | |
19 | + if (fc->findprov) | |
20 | + xx = rpmfcHelper(fc, 'P', "mimetype", fc->noautoprov, fc->noautoprov_c); | |
21 | } | |
22 | ||
23 | return 0; | |
f02308f2 | 24 | @@ -957,7 +963,7 @@ |
835ea24d MB |
25 | /*@unchecked@*/ |
26 | static struct rpmfcApplyTbl_s rpmfcApplyTable[] = { | |
27 | { rpmfcELF, RPMFC_ELF }, | |
f02308f2 MB |
28 | - { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO) }, |
29 | + { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO|RPMFC_DESKTOP_FILE) }, | |
835ea24d MB |
30 | { NULL, 0 } |
31 | }; | |
f02308f2 MB |
32 | |
33 | @@ -1311,6 +1317,9 @@ | |
835ea24d MB |
34 | else if (_suffix(s, ".php")) |
35 | ftype = "PHP script text"; | |
36 | ||
835ea24d MB |
37 | + else if (_suffix(s, ".desktop")) |
38 | + ftype = "Desktop Entry"; | |
39 | + | |
40 | /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */ | |
41 | else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1)) | |
42 | ftype = ""; | |
f02308f2 MB |
43 | diff -urN rpm-5.1.4/lib/rpmfc.h rpm-5.1.4.new/lib/rpmfc.h |
44 | --- rpm-5.1.4/lib/rpmfc.h 2008-07-29 19:36:38.000000000 +0200 | |
45 | +++ rpm-5.1.4.new/lib/rpmfc.h 2008-07-29 19:44:27.000000000 +0200 | |
46 | @@ -28,7 +28,8 @@ | |
47 | #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32) | |
48 | /* (1 << 3) leaks into package headers, reserved */ | |
835ea24d | 49 | |
f02308f2 MB |
50 | - /* bits 4-7 unused */ |
51 | + /* bits 4-6 unused */ | |
52 | + RPMFC_DESKTOP_FILE = (1 << 7), | |
53 | RPMFC_PKGCONFIG = (1 << 8), | |
54 | RPMFC_LIBTOOL = (1 << 9), | |
55 | RPMFC_BOURNE = (1 << 10), | |
56 | diff -urN rpm-5.1.4/macros.in rpm-5.1.4.new/macros.in | |
57 | --- rpm-5.1.4/macros.in 2008-07-29 19:36:38.000000000 +0200 | |
58 | +++ rpm-5.1.4.new/macros.in 2008-07-29 19:45:45.000000000 +0200 | |
59 | @@ -1617,6 +1617,16 @@ | |
60 | %__mono_requires %{nil} | |
835ea24d | 61 | |
f02308f2 | 62 | #------------------------------------------------------------------------ |
835ea24d MB |
63 | +# mimetype(...) configuration. |
64 | +# | |
65 | +# Path to script to autogenerate mimetype(foo) provides, based on MimeType | |
66 | +# key from desktop files. | |
67 | +# | |
68 | +# Note: Used if _use_internal_dependency_generator is non-zero. The | |
69 | +# helper is also used by %{_uselibrpm}/rpmdeps --provides | |
70 | +%__mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides | |
71 | + | |
f02308f2 MB |
72 | +#------------------------------------------------------------------------ |
73 | # executable(...) configuration. | |
74 | # | |
75 | # Path to scripts to autogenerate executable(foo) script dependencies, |