Changeset 69a6d05 in tol
- Timestamp:
- Oct 6, 2010, 5:47:23 PM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- c1fdad2
- Parents:
- a75ca51
- File:
-
- 1 edited
-
tol/stdlib/general/TolPackage/client.tol (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/general/TolPackage/client.tol
ra75ca51 r69a6d05 34 34 ////////////////////////////////////////////////////////////////////////////// 35 35 { 36 Real numIns = Card(TolPackage::Client::@Repository::_.instances); 37 Real numPck = Card(TolPackage::Client::@Repository::_.allPackages); 38 //WriteLn("TRACE [TolPackage::Client::LastCompatible] numIns="<<Card(numIns)); 39 //WriteLn("TRACE [TolPackage::Client::LastCompatible] numPck="<<Card(numPck)); 40 Set pkgSel = Select(TolPackage::Client::@Repository::_.allPackages, 41 Real(TolPackage::@PackageInfo a) 36 Set pkgLst = GetDir(TolPackage::Client::_.localRoot)[2]; 37 Set pkgSel = Select(pkgLst,Real(Text pkgNamVer) 42 38 { 43 And( 44 a->name == package, 45 Version>=a->minTolVersion) 39 TextBeginWith( pkgNamVer, package+".") 46 40 }); 47 If(!Card(pkgSel),"",41 Text If(!Card(pkgSel),"", 48 42 { 49 Set pkgSort = Sort(pkgSel,Real(TolPackage::@PackageInfo a, 50 TolPackage::@PackageInfo b) 51 { 52 Compare(b->name.version, a->name.version) 53 }); 54 pkgSort[1]->name.version 43 Set pkgSort = Sort(pkgSel, Real(Text a, Text b) { Compare(b, a) }); 44 pkgSort[1] 55 45 }) 56 46 }; … … 95 85 @Repository r = @Repository::Get(repository, True); 96 86 r::Exist(package.version) 87 }; 88 89 ////////////////////////////////////////////////////////////////////////////// 90 Text _.autodoc.member.InstallFromLocalZip = 91 "Instala un paquete desde un archivo local comprimido con extensión .zip"; 92 Real InstallFromLocalZip(Text pkg.path.zip) 93 ////////////////////////////////////////////////////////////////////////////// 94 { 95 Real OSFilCopy(pkg.path.zip, _.localRoot); 96 Text pkg.name.zip = GetFileName(pkg.path.zip); 97 Text pkg.name = Replace(pkg.name.zip,".zip",""); 98 Real PackArchive::UnpackFull("ZipArchive",_.localRoot+pkg.name); 99 Real OSFilRemove(_.localRoot+pkg.name.zip); 100 FileExist(_.localRoot+pkg.name+"/"+pkg.name+".oza") 97 101 }; 98 102
Note: See TracChangeset
for help on using the changeset viewer.
