Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm.git;a=commitdiff;h=c2f5c3757de6fc5af638d7faa4656f0c9083e64c

commit c2f5c3757de6fc5af638d7faa4656f0c9083e64c
Author: Priyank <[EMAIL PROTECTED]>
Date:   Thu Mar 6 12:30:43 2008 +0530

gfpm-repomgr: Fixed a major bug where gfpm didn't save some parts of the config 
file resulting in an inconsistent configuration.

diff --git a/src/gfpm-repomanager.c b/src/gfpm-repomanager.c
index 6eede20..c97e482 100644
--- a/src/gfpm-repomanager.c
+++ b/src/gfpm-repomanager.c
@@ -644,20 +644,9 @@ gfpm_repomgr_populate_repolist (void)
fwutil_trim (line);
if (!strlen(line))
continue;
-               else if (line[0] == '#' && line[1] != 'I')
-               {
-                       if (flag == FALSE)
-                       {
-                               repolist->header = g_list_append 
(repolist->header, (gpointer) g_strdup(line));
-                       }
-                       else
-                       {
-                               repo_r->footer = g_list_append (repo_r->footer, 
(gpointer) g_strdup(line));
-                       }
-                       continue;
-               }
-               else if (sscanf(line, "Include = %s", str))
+               else if (line[0] == 'I' && line[1] == 'n')
{
+                       sscanf (line, "Include = %s", str);
if (flag == FALSE)
flag = TRUE;
repo_r = (gfpm_repo_t*)malloc(sizeof(gfpm_repo_t));
@@ -674,8 +663,9 @@ gfpm_repomgr_populate_repolist (void)
repolist->list = g_list_append (repolist->list, (gpointer)repo_r);
n++;
}
-               else if (sscanf(line, "#Include = %s", str))
+               else if (line[0] == '#' && line[1] == 'I')
{
+                       sscanf (line, "#Include = %s", str);
if (flag == FALSE)
flag = TRUE;
repo_r = (gfpm_repo_t*)malloc(sizeof(gfpm_repo_t));
@@ -692,6 +682,18 @@ gfpm_repomgr_populate_repolist (void)
repolist->list = g_list_append (repolist->list, (gpointer)repo_r);
n++;
}
+               else
+               {
+                       if (flag == FALSE)
+                       {
+                               repolist->header = g_list_append 
(repolist->header, (gpointer) g_strdup(line));
+                       }
+                       else
+                       {
+                               repo_r->footer = g_list_append (repo_r->footer, 
(gpointer) g_strdup(line));
+                       }
+                       continue;
+               }
}
repolist->n = n;
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to