[Frugalware-git] frugal-mono-tools: *find force options

bouleetbil bouleetbil at frogdev.info
Mon Aug 30 12:18:01 CEST 2010


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

commit 10c06df505ab3af932383f75be16a9504c72457e
Author: bouleetbil <bouleetbil at frogdev.info>
Date:   Mon Aug 30 12:41:39 2010 +0000

*find force options

diff --git a/frugal-mono-tools/PacmanG2.cs b/frugal-mono-tools/PacmanG2.cs
index dcef987..4da1976 100644
--- a/frugal-mono-tools/PacmanG2.cs
+++ b/frugal-mono-tools/PacmanG2.cs
@@ -104,7 +104,7 @@ namespace frugalmonotools
package.pkgversion=extractVersionPackage(tmpname);
package.pkgdescription=_getDescription(package.pkgname+"-"+package.pkgversion,repo);
package.pkggroup="";
-				package.force=false;
+				package.force=_PackageForce(package.pkgname+"-"+package.pkgversion,repo);
//TODO extract group from file desc and extract version from name
packages.Add(package);
}
@@ -115,6 +115,18 @@ namespace frugalmonotools
return _getDescription(Package, repo);

}
+		private bool _PackageForce(string Package,string repo)
+		{
+			string filedesc = ROOT_PATH+PACMANG2_BDD+"/"+repo+"/"+Package+"/desc";
+			string content = Outils.ReadFile(filedesc);
+			string[] lines = content.Split('\n');
+			foreach (string line in lines)
+            {
+				if (line=="%FORCE%")
+					return true;
+			}
+			return false;
+		}
private static string _getDescription(string Package,string repo)
{
string filedesc = ROOT_PATH+PACMANG2_BDD+"/"+repo+"/"+Package+"/desc";


More information about the Frugalware-git mailing list