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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21530 - (show annotations) (download)
Mon Jan 17 18:19:18 2011 UTC (10 years, 1 month ago) by blino
File size: 1649 byte(s)
adapt release patch
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/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,16 @@
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, "Cauldron"))
21 {
22 - *product = xstrdup("Fedora");
23 - *version = xstrdup("rawhide");
24 + *product = xstrdup("Mageia");
25 + *version = xstrdup("Cauldron");
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 + strbuf_append_str(buf_product, "Mageia");
36
37 const char *r = strstr(release, "release");
38 const char *space = r ? strchr(r, ' ') : NULL;
39

  ViewVC Help
Powered by ViewVC 1.1.28