/[packages]/cauldron/abrt/current/SOURCES/abrt-1.1.13-mandriva-release.patch
ViewVC logotype

Contents of /cauldron/abrt/current/SOURCES/abrt-1.1.13-mandriva-release.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21273 - (show annotations) (download)
Mon Jan 17 13:41:48 2011 UTC (13 years, 2 months ago) by blino
File size: 1821 byte(s)
imported package abrt
1 --- lib/Utils/DebugDump.cpp
2 +++ lib/Utils/DebugDump.cpp
3 @@ -330,7 +330,7 @@ void CDebugDump::Create(const char *pDir, uid_t uid)
4 SaveText(FILENAME_KERNEL, buf.release);
5 SaveText(FILENAME_ARCHITECTURE, buf.machine);
6 std::string release;
7 - LoadTextFile("/etc/redhat-release", release);
8 + LoadTextFile("/etc/mandriva-release", release);
9 const char *release_ptr = release.c_str();
10 unsigned len_1st_str = strchrnul(release_ptr, '\n') - release_ptr;
11 release.erase(len_1st_str); /* usually simply removes trailing '\n' */
12
13 --- lib/Utils/parse_release.cpp.mandriva-release 2010-07-19 17:44:32.000000000 +0200
14 +++ lib/Utils/parse_release.cpp 2010-08-10 12:19:41.000000000 +0200
15 @@ -26,19 +26,19 @@
16 // caller is reposible for freeing *product* and *version*
17 void parse_release(const char *release, char** product, char** version)
18 {
19 - if (strstr(release, "Rawhide"))
20 + if (strstr(release, "Cooker"))
21 {
22 - *product = xstrdup("Fedora");
23 - *version = xstrdup("rawhide");
24 + *product = xstrdup("Mandriva Linux");
25 + *version = xstrdup("cooker");
26 VERB3 log("%s: version:'%s' product:'%s'", __func__, *version, *product);
27 return;
28 }
29
30 struct strbuf *buf_product = strbuf_new();
31 - if (strstr(release, "Fedora"))
32 - strbuf_append_str(buf_product, "Fedora");
33 - else if (strstr(release, "Red Hat Enterprise Linux"))
34 - strbuf_append_str(buf_product, "Red Hat Enterprise Linux ");
35 + if (strstr(release, "Mandriva"))
36 + strbuf_append_str(buf_product, "Mandriva Linux");
37 + else if (strstr(release, "Mandriva Linux"))
38 + strbuf_append_str(buf_product, "Mandriva Linux ");
39
40 const char *r = strstr(release, "release");
41 const char *space = r ? strchr(r, ' ') : NULL;
42

  ViewVC Help
Powered by ViewVC 1.1.30