gnome-build r558 - in trunk: . src/backends/libgbf_am
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-build r558 - in trunk: . src/backends/libgbf_am
- Date: Fri, 2 May 2008 13:58:55 +0100 (BST)
Author: jhs
Date: Fri May 2 12:58:54 2008
New Revision: 558
URL: http://svn.gnome.org/viewvc/gnome-build?rev=558&view=rev
Log:
2008-05-02 Johannes Schmid <jhs gnome org>
* configure.in: Bumped version to 0.3.0
* src/backends/libgbf_am/gbf-am-project.c (package_is_valid),
(impl_get_config_packages):
Added a conveniece check for the returned packages
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/src/backends/libgbf_am/gbf-am-project.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri May 2 12:58:54 2008
@@ -1,7 +1,7 @@
AAC_PREREQ(2.52)
# Initialization and versioning
-AC_INIT(gnome-build, 0.2.3, http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-build)
+AC_INIT(gnome-build, 0.3.0, http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-build)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR(src/Makefile.am)
Modified: trunk/src/backends/libgbf_am/gbf-am-project.c
==============================================================================
--- trunk/src/backends/libgbf_am/gbf-am-project.c (original)
+++ trunk/src/backends/libgbf_am/gbf-am-project.c Fri May 2 12:58:54 2008
@@ -3866,6 +3866,22 @@
return result;
}
+static gboolean
+package_is_valid (const gchar* package)
+{
+ const gchar* c = package;
+ while (*c != '\0')
+ {
+ if (!g_ascii_isalnum (*c) &&
+ (*c != '_') && (*c != '-') && (*c != '.') && (*c != '+'))
+ {
+ return FALSE;
+ }
+ c++;
+ }
+ return TRUE;
+}
+
static GList *
impl_get_config_packages (GbfProject *project,
const gchar* module,
@@ -3901,15 +3917,10 @@
pkgs = g_strsplit (packages, ", ", -1);
for (pkg = pkgs; *pkg != NULL; ++pkg)
{
- gchar *version;
- if ((version = strchr (*pkg, ' ')))
- {
+ gchar* version;
+ if ((version = strchr (*pkg, ' ')))
*version = '\0';
- version++;
- result = g_list_append (result, *pkg);
-
- }
- else
+ if (package_is_valid (*pkg))
{
result = g_list_append (result, *pkg);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]