configure, app: encourage packagers to set custom bug tracker.

We get a lot of packaging bugs for third-party builds in our tracker,
especially since our debug tool now opens directly our bug tracker.
It would be preferred if third-party packagers were to make a first
filtering of bugs and only reported once they knew for sure that the bug
is in core code, and not in packaging.

Our configure script will now propose a --with-bug-report-url option
allowing to set a different web address. This address will be the one
opening in the debug dialog.
This commit is contained in:
Jehan 2018-05-14 05:33:14 +02:00
parent 84f224d614
commit 20f20dd7b1
2 changed files with 47 additions and 8 deletions

View File

@ -329,14 +329,23 @@ gimp_critical_dialog_response (GtkDialog *dialog,
case GIMP_CRITICAL_RESPONSE_URL: case GIMP_CRITICAL_RESPONSE_URL:
{ {
const gchar *url; const gchar *url;
gchar *temp = g_ascii_strdown (BUG_REPORT_URL, -1);
/* Only accept custom web links. */
if (g_str_has_prefix (temp, "http://") ||
g_str_has_prefix (temp, "https://"))
url = BUG_REPORT_URL;
else
/* XXX Ideally I'd find a way to prefill the bug report
* through the URL or with POST data. But I could not find
* any. Anyway since we may soon ditch bugzilla to follow
* GNOME infrastructure changes, I don't want to waste too
* much time digging into it.
*/
url = PACKAGE_BUGREPORT;
g_free (temp);
/* XXX Ideally I'd find a way to prefill the bug report
* through the URL or with POST data. But I could not find
* any. Anyway since we may soon ditch bugzilla to follow
* GNOME infrastructure changes, I don't want to waste too
* much time digging into it.
*/
url = "https://bugzilla.gnome.org/enter_bug.cgi?product=GIMP";
browser_open_url (url, NULL); browser_open_url (url, NULL);
} }
break; break;

View File

@ -2312,6 +2312,34 @@ else
fi fi
AM_CONDITIONAL(HAVE_DESKTOP_FILE_VALIDATE, test "x$DESKTOP_FILE_VALIDATE" != "xno") AM_CONDITIONAL(HAVE_DESKTOP_FILE_VALIDATE, test "x$DESKTOP_FILE_VALIDATE" != "xno")
####################
# Set bug report URL
####################
# Allowing third-party packagers to set their own bugtracker URL, in
# order to filter first packaging bugs from core bugs.
AC_ARG_WITH(bug-report-url,
[ --with-bug-report-url URL used by the debug dialog to report bugs],,
[with_bug_report_url="$PACKAGE_BUGREPORT"])
if test "x$with_bug_report_url" = "x"; then
with_bug_report_url="$PACKAGE_BUGREPORT"
fi
AC_DEFINE_UNQUOTED(BUG_REPORT_URL, "$with_bug_report_url",
[The URL to open in order to report bugs])
override_bug_report_url=
if test "x$with_bug_report_url" = "x$PACKAGE_BUGREPORT"; then
override_bug_report_url="
NOTE: if you plan on packaging GIMP for distribution, it is recommended
to override the bug report URL with option:
--with-bug-report-url=https://example.com/
so that you can filter packaging bugs from core bugs before
reporting upstream.
"
fi
###################################### ######################################
# Checks for gtk-doc and docbook-tools # Checks for gtk-doc and docbook-tools
@ -2829,7 +2857,9 @@ Tests:
Use xvfb-run $have_xvfb_run Use xvfb-run $have_xvfb_run
Test appdata $have_appstream_util Test appdata $have_appstream_util
Test desktop file $have_desktop_file_validate Test desktop file $have_desktop_file_validate
$have_recommended_xgettext$have_recommended_gtk$warning_vector_icons_windows$warning_glib_networking$warning_gcc"
Bug report URL: $with_bug_report_url
$override_bug_report_url$have_recommended_xgettext$have_recommended_gtk$warning_vector_icons_windows$warning_glib_networking$warning_gcc"
if test "x$required_deps" = "x"; then if test "x$required_deps" = "x"; then
AC_OUTPUT AC_OUTPUT