Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 59999 Details for
Bug 15689
CFLAGS cause griefs - Fix bugbuddy reporting
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to enable bug buddy to report C(XX)FLAGS
bug-buddy-ebuild.patch (text/plain), 4.60 KB, created by
Nathaniel McCallum (RETIRED)
on 2005-05-27 23:51:04 UTC
(
hide
)
Description:
Patch to enable bug buddy to report C(XX)FLAGS
Filename:
MIME Type:
Creator:
Nathaniel McCallum (RETIRED)
Created:
2005-05-27 23:51:04 UTC
Size:
4.60 KB
patch
obsolete
>diff -Nru /usr/local/portage/gnome-extra/bug-buddy/bug-buddy-2.10.0.ebuild bug-buddy/bug-buddy-2.10.0.ebuild >--- /usr/local/portage/gnome-extra/bug-buddy/bug-buddy-2.10.0.ebuild 2005-05-08 23:03:46.000000000 -0400 >+++ bug-buddy/bug-buddy-2.10.0.ebuild 2005-05-28 02:41:31.000000000 -0400 >@@ -2,7 +2,7 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-x86/gnome-extra/bug-buddy/bug-buddy-2.10.0.ebuild,v 1.6 2005/05/09 03:03:46 agriffis Exp $ > >-inherit gnome2 >+inherit gnome2 eutils > > DESCRIPTION="Bug Report helper for Gnome" > HOMEPAGE="http://www.gnome.org/" >@@ -40,4 +40,13 @@ > unpack ${A} > cd ${S} > gnome2_omf_fix gnome-doc-utils.make docs/Makefile.in >+ epatch ${FILESDIR}/gentoo_cflags-2.10.0.patch >+} >+ >+src_install() { >+ gnome2_src_install >+ >+ # flags search tool >+ exeinto /usr/libexec/ >+ doexe ${FILESDIR}/bug-buddy-2.10.0-report_cflags.patch > } >diff -Nru /usr/local/portage/gnome-extra/bug-buddy/files/bug-buddy-2.10.0-report_cflags.patch bug-buddy/files/bug-buddy-2.10.0-report_cflags.patch >--- /usr/local/portage/gnome-extra/bug-buddy/files/bug-buddy-2.10.0-report_cflags.patch 1969-12-31 19:00:00.000000000 -0500 >+++ bug-buddy/files/bug-buddy-2.10.0-report_cflags.patch 2005-05-28 02:37:51.000000000 -0400 >@@ -0,0 +1,45 @@ >+diff -Nru bug-buddy-2.10.0.old/src/bugzilla.c bug-buddy-2.10.0/src/bugzilla.c >+--- bug-buddy-2.10.0.old/src/bugzilla.c 2005-02-10 06:01:10.000000000 -0500 >++++ bug-buddy-2.10.0/src/bugzilla.c 2005-05-28 02:34:51.000000000 -0400 >+@@ -1509,7 +1509,8 @@ >+ generate_email_text (gboolean include_headers) >+ { >+ GString *email; >+- char *subject, *body, *s, *debug_info, *version, *severity; >++ char *subject, *body, *s, *debug_info, *version, *severity, *gentoo_cmd = NULL; >++ gint gentoo_retval = 0; >+ >+ email = g_string_new (NULL); >+ >+@@ -1530,8 +1531,30 @@ >+ g_string_append_printf (email, "Subject: %s\n\n", subject); >+ >+ get_distro_name(); >+- if (druid_data.distro) >++ if (druid_data.distro) { >+ g_string_append_printf (email, "Distribution: %s\n", druid_data.distro); >++ >++ /* Make sure gentoo users get their C(XX)FLAGS in the bug report */ >++ if (g_str_has_prefix (druid_data.distro, "Gentoo")) { >++ >++ /* Get CFLAGS */ >++ gentoo_cmd = g_strdup_printf ("/usr/libexec/getbuildflags.py -c %s\n", druid_data.product->name); >++ g_spawn_command_line_sync (gentoo_cmd, &s, NULL, &gentoo_retval, NULL); >++ if (gentoo_retval == 0) >++ g_string_append_printf (email, s); >++ gentoo_retval = 0; >++ g_free(gentoo_cmd); >++ g_free(s); >++ /* Get CXXFLAGS */ >++ gentoo_cmd = g_strdup_printf ("/usr/libexec/getbuildflags.py -cxx %s\n", druid_data.product->name); >++ g_spawn_command_line_sync (gentoo_cmd, &s, NULL, &gentoo_retval, NULL); >++ if (gentoo_retval == 0) >++ g_string_append_printf (email, s); >++ gentoo_retval = 0; >++ g_free(gentoo_cmd); >++ g_free(s); >++ } >++ } >+ if (druid_data.product->bts->submit_type == BUGZILLA_SUBMIT_DEBIAN) { >+ /* This is what gnome.org and ximian.com use */ >+ g_string_append_printf (email, "Package: %s\n", druid_data.product->name); >diff -Nru /usr/local/portage/gnome-extra/bug-buddy/files/getbuildflags.py bug-buddy/files/getbuildflags.py >--- /usr/local/portage/gnome-extra/bug-buddy/files/getbuildflags.py 1969-12-31 19:00:00.000000000 -0500 >+++ bug-buddy/files/getbuildflags.py 2005-05-28 02:25:16.000000000 -0400 >@@ -0,0 +1,57 @@ >+#!/usr/bin/env python >+ >+import sys >+import os >+ >+def usage(): >+ print "getbuildflags [-c|-cxx] <package_name>" >+ sys.exit(1) >+ >+# Check our arguments >+if not len(sys.argv) > 2: >+ usage() >+if sys.argv[1] == "-c": >+ filename = "CFLAGS" >+elif sys.argv[1] == "-cxx": >+ filename = "CXXFLAGS" >+else: >+ usage() >+sys.argv[2] = sys.argv[2].lower() >+ >+# Search for the package >+import portage >+vt = portage.vartree() >+packages = [] >+for package in vt.getallcpv(): >+ if sys.argv[2] in package: >+ packages.append(package) >+if len(packages) > 1: >+ old_packages = [] >+ old_packages.extend(packages) >+ packages = [] >+ for package in old_packages: >+ if sys.argv[2] == portage.catpkgsplit(package)[1]: >+ packages.append(package) >+ del old_packages >+if len(packages) > 1: >+ print "Error, package name '%s' not specific enough!" % sys.argv[2] >+ print packages >+ sys.exit(1) >+elif len(packages) < 1: >+ print "Package not installed!" >+ sys.exit(1) >+ >+package = packages[0] >+ >+# Get the flags >+try: >+ f = open(os.path.join(portage.root, portage.VDB_PATH, package, filename)) >+ flags = "Built with %s: " % filename + f.read().strip() >+ f.close() >+except IOError: >+ if portage.settings.has_key(filename): >+ flags = "System %s" % filename + portage.settings[filename] >+ else: >+ flags = "%s unknown!" % filename >+print flags >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15689
: 59999