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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30