Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-mono-tools.git;a=commitdiff;h=49a08930e91cf6b69eef010873047cb450483e23

commit 49a08930e91cf6b69eef010873047cb450483e23
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Mon Aug 30 13:56:22 2010 +0000

*load ignorepkg
*don't load all info on startup (more quickly)

diff --git a/frugal-mono-tools/Debug.cs b/frugal-mono-tools/Debug.cs
index f1c252e..d56422b 100644
--- a/frugal-mono-tools/Debug.cs
+++ b/frugal-mono-tools/Debug.cs
@@ -20,7 +20,7 @@ namespace frugalmonotools
{
public static class Debug
{
-               public static Boolean ModeDebug = false;
+               public static Boolean ModeDebug = true;
public static Boolean ModeDebugGraphique = false;
public static FEN_Debug winDebug;

diff --git a/frugal-mono-tools/MainWindow.cs b/frugal-mono-tools/MainWindow.cs
index 03dfbab..fa30d92 100644
--- a/frugal-mono-tools/MainWindow.cs
+++ b/frugal-mono-tools/MainWindow.cs
@@ -602,7 +602,7 @@ public partial class MainWindow : Gtk.Window
protected virtual void OnBTNSearchClicked (object sender, System.EventArgs e)
{
try{
-                       List<Package> 
packages=MainClass.pacmanG2.Search(SAI_pkg.Text,MainClass.pacmanG2.repoSelected);
+                       List<Package> 
packages=MainClass.pacmanG2.Search(SAI_pkg.Text,MainClass.pacmanG2.repoSelected,true);
pkgListStore.Clear();
foreach (Package package in packages)
{
diff --git a/frugal-mono-tools/PacmanG2.cs b/frugal-mono-tools/PacmanG2.cs
index 4da1976..5aea036 100644
--- a/frugal-mono-tools/PacmanG2.cs
+++ b/frugal-mono-tools/PacmanG2.cs
@@ -57,6 +57,7 @@ namespace frugalmonotools
//public
public string repoSelected="";
public List<string> fwRepo = new List<string>();
+               public List<string> ignorePkg = new List<string>();
public const string repoInstalled= "Installed";

private void EnumRepoProc(string section, string lParam)
@@ -68,6 +69,8 @@ namespace frugalmonotools
public PacmanG2 ()
{
try{
+                               //load ignore pkg
+                               _ReadIgnorePkg();
EnumRepoProcDelegate _cd_db = new EnumRepoProcDelegate(EnumRepoProc);
if (pacman_initialize(ROOT_PATH)!=pm_errno)
{
@@ -78,14 +81,38 @@ namespace frugalmonotools
}
catch{}
}
-
+               private void _ReadIgnorePkg(){
+                       try{
+                               string filedesc = cch_pacmanconf;
+                               string content = Outils.ReadFile(filedesc);
+                               string[] lines = content.Split('\n');
+                               foreach (string line in lines)
+                   {
+                                       if (Regex.Matches(line, 
"IgnorePkg").Count>0)
+                                       {
+                                               string []contentspkg 
=line.Split('=');
+                                               if (contentspkg.Length==0 
)return;
+                                               string pkgs= contentspkg[1];
+                                               string []pkgsIgnore 
=pkgs.Split(' ');
+                                               foreach (string pkgIgnore in 
pkgsIgnore)
+                               {
+                                                       
ignorePkg.Add(pkgIgnore.Trim());
+                                               }
+                                               break;
+                                       }
+
+                               }
+                       }
+                       catch{}
+               }
+
public void SelectRepo(string repo)
{
if (repo==repoInstalled) repo ="local";
repoSelected=repo;
}

-               public List<Package> Search(string strSearch,string repo)
+               public List<Package> Search(string strSearch,string repo,bool 
readInfo)
{
if (repo==repoInstalled) repo ="local";
//don't use pacman more quickly to use .net directly
diff --git a/frugal-mono-tools/Update.cs b/frugal-mono-tools/Update.cs
index cc3b67e..5cfe1ca 100644
--- a/frugal-mono-tools/Update.cs
+++ b/frugal-mono-tools/Update.cs
@@ -84,7 +84,7 @@ namespace frugalmonotools

private static void addList(List<packageCheck> pkgs,string repo)
{
-                       List<Package> 
packages=MainClass.pacmanG2.Search("*",repo);
+                       List<Package> 
packages=MainClass.pacmanG2.Search("*",repo,false);
foreach (Package package in packages)
{
if(repo=="local")
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to