Index: tol/stdlib/general/TolPackage/client.tol
===================================================================
--- tol/stdlib/general/TolPackage/client.tol	(revision 13eebd963c56390295f26e77b1107ff72d2d3ac5)
+++ tol/stdlib/general/TolPackage/client.tol	(revision 837719de75ae72fec96296b0dfa326793c84e3fa)
@@ -102,4 +102,21 @@
   Real _trace("DoRequirements", "End", 1);
   True
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+Text _.autodoc.member.LocalInfo = 
+"Devuelve la información local disponible acerca de un paquete.";
+Set LocalInfo(Text name.version)
+//////////////////////////////////////////////////////////////////////////////
+{
+  Text root = TolPackage::Client::_.localRoot+"/"+name.version+"/";
+  Text info.path=root+"info.oza";
+  Real If(!OSFilExist(info.path), 
+  { 
+    Set pkgCnt = Ois.Load(root+name.version+".oza")[1];
+    TolPackage::PackageInfo.Build(pkgCnt[1], root, UnknownDate)
+  });
+  Ois.Load(info.path)[1]
 };
 
@@ -126,25 +143,15 @@
   Real _trace("LocalLastCompatible", "package='"<<package+"'", 1);
   Set pkgLst = GetDir(TolPackage::Client::_.localRoot)[2];
-  Text vsi.path = _.localRoot+"/VersSyncInfo.oza";
-  Real If(!FileExist(vsi.path), RemoteUpdateVersSyncInfo(false));
-  Set vsi = If(!FileExist(vsi.path), Copy(Empty), { Include(vsi.path) });
   Set pkgSel = Select(pkgLst,Real(Text pkgNamVer)
   {
-    WriteLn("_trace LocalLastCompatible 2 checking version ="<<pkgNamVer);
+    Real _trace("LocalLastCompatible", "checking version ="<<pkgNamVer, 5);
     Real ok1 = TextBeginWith(pkgNamVer, package);
     If(!ok1, False,
     {
-      Real idx = FindIndexByName(vsi, pkgNamVer);
-      If(idx<=0, True,
-      {
-        Real ok2 = And(
-         Compare.VersionString(vsi[idx]->te_min_tol_version,TolPackage::_.currentTolVersion)<=0,
-         Compare.VersionString(vsi[idx]->te_max_tol_version,TolPackage::_.currentTolVersion)>=0);
-      //WriteLn("_trace LocalLastCompatible 3 min="<<vsi[idx]->te_min_tol_version);
-      //WriteLn("_trace LocalLastCompatible 4 cur="<<TolPackage::_.currentTolVersion);
-      //WriteLn("_trace LocalLastCompatible 5 max="<<vsi[idx]->te_max_tol_version);
-      //WriteLn("_trace LocalLastCompatible 6 ok2="<<ok2);
+      Set info = TolPackage::Client::LocalInfo(pkgNamVer);
+      Real ok2 = And(
+       Compare.VersionString(info::_.autodoc.minTolVersion,TolPackage::_.currentTolVersion)<=0,
+       Compare.VersionString(info::_.autodoc.maxTolVersion,TolPackage::_.currentTolVersion)>=0);
         ok2
-      }) 
     })
   });
@@ -198,7 +205,11 @@
 {
   Real _trace("LocalInstallPackage", "Begin", 1);
+  Real _trace("LocalInstallPackage", "pkg.path.zip='"+pkg.path.zip+"'", 5);
   Real OSFilCopy(pkg.path.zip, _.localRoot);
   Text pkg.name.zip = GetFileName(pkg.path.zip);
+  Real _trace("LocalInstallPackage", "pkg.name.zip='"+pkg.name.zip+"'", 5);
   Text pkg.name = Replace(pkg.name.zip,".zip","");
+  Real _trace("LocalInstallPackage", "pkg.name='"+pkg.name+"'", 5);
+  Real OSDirRemove(_.localRoot+pkg.name);
   Real PackArchive::UnpackFull("ZipArchive",_.localRoot+pkg.name,True);
   Real _trace("LocalInstallPackage", "End", 1);
@@ -652,11 +663,6 @@
       Date If(found, 
       {
-        Date gmt = Copy(NowGmt);
-        Date loc = Copy(Now);
-        Real lag = Round(DateDif(S(0),loc,gmt)/10)*10;
-        Text oza = TolPackage::Client::_.localRoot+pkg+"/"+pkg+".oza";
-        Date release.loc = FileTime(oza);
-        Date release.gmt = Succ(release.loc,S(0),lag);
-        _.versSyncInfo[found]->dh_release_date_local := release.gmt
+        Set info = LocalInfo(pkg);
+        _.versSyncInfo[found]->dh_release_date_local := info::_.autodoc.releaseDate
       });
       True
@@ -703,12 +709,8 @@
           Compare.VersionString(b, a) });
         Text ver = ord[1];
-        Date gmt = Copy(NowGmt);
-        Date loc = Copy(Now);
-        Real lag = Round(DateDif(S(0),loc,gmt)/10)*10;
-        Text oza = TolPackage::Client::_.localRoot+ver+"/"+ver+".oza";
-        Date release.loc = FileTime(oza);
-        Date release.gmt = Succ(release.loc,S(0),lag);
-        Date _.packSyncInfo[found]->co_last_version_local := ver;
-        Date _.packSyncInfo[found]->dh_release_date_local := release.gmt;
+        Set info = LocalInfo(ver);
+        Date _.packSyncInfo[found]->co_last_version_local := 
+          pkg+"."<<info::_.autodoc.version.high+"."<<info::_.autodoc.version.low;
+        Date _.packSyncInfo[found]->dh_release_date_local := info::_.autodoc.releaseDate;
         True
       });
@@ -717,7 +719,12 @@
     Set _.packForUpdate := Select(_.packSyncInfo, Real(TolPackage::@PackageSynchro pkg)
     {
-      Real need = And(pkg->co_last_version_local != "",
-          pkg->co_last_version_local == pkg->co_last_version_remote,  
-          pkg->dh_release_date_local <  pkg->dh_release_date_remote);
+      Real _trace("RemoteUpdateVersSyncInfo", "pkg="<<pkg, 5);
+      Real need = Case(
+        pkg->co_last_version_local == "", False,
+        pkg->co_last_version_local != pkg->co_last_version_remote, False,
+        pkg->dh_release_date_local == TheBegin, False,
+        DateDif(S(0),pkg->dh_release_date_remote,pkg->dh_release_date_local) <= 2, False,
+        1==1, True);
+      Real _trace("RemoteUpdateVersSyncInfo", "need="<<need, 5);
       If(And(showWarnings,need),
       {
Index: tol/stdlib/general/TolPackage/common.tol
===================================================================
--- tol/stdlib/general/TolPackage/common.tol	(revision 13eebd963c56390295f26e77b1107ff72d2d3ac5)
+++ tol/stdlib/general/TolPackage/common.tol	(revision 837719de75ae72fec96296b0dfa326793c84e3fa)
@@ -120,3 +120,122 @@
     Unique(SetConcat(aux))
   }) 
-}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+Text _.autodoc.member.PackageInfo.Extract = 
+"Extrae la información documental de un paquete.";
+Set PackageInfo.Extract(NameBlock pkg)
+//////////////////////////////////////////////////////////////////////////////
+{
+  Set info = [[
+    Text _.autodoc.name            = pkg::_.autodoc.name;
+    Text _.autodoc.brief           = pkg::_.autodoc.brief;
+    Text _.autodoc.description     = pkg::_.autodoc.description;
+    Text _.autodoc.url             = pkg::_.autodoc.url;
+    Set  _.autodoc.keys            = pkg::_.autodoc.keys;
+    Set  _.autodoc.authors         = pkg::_.autodoc.authors;
+    Text _.autodoc.minTolVersion   = pkg::_.autodoc.minTolVersion;
+    Text _.autodoc.maxTolVersion   = pkg::_.autodoc.maxTolVersion;
+    Real _.autodoc.version.high    = pkg::_.autodoc.version.high;
+    Real _.autodoc.version.low     = pkg::_.autodoc.version.low;
+    Date _.autodoc.releaseDate     = pkg::_.autodoc.releaseDate;
+    Set  _.autodoc.dependencies    = pkg::_.autodoc.dependencies;
+    Set  _.autodoc.nonTolResources = pkg::_.autodoc.nonTolResources;
+    Text _.autodoc.versionControl  = pkg::_.autodoc.versionControl;
+    Text _.autodoc.extra_info      = pkg::_.autodoc.extra_info
+  ]];
+  Real SetIndexByName(info);
+  info
+};
+
+//////////////////////////////////////////////////////////////////////////////
+Text _.autodoc.member.PackageInfo.AutoFill = 
+"Rellena automaticamente algunos campos de información documental del "
+"paquete añadiendo los miembros que falten y cambiando su valor si es "
+"necesario.";
+Set PackageInfo.AutoFill(NameBlock pkg, Date releaseDate)
+//////////////////////////////////////////////////////////////////////////////
+{
+  Text name = Name(pkg);
+  Text name.version = name+"."<<
+    pkg::_.autodoc.version.high+"."<<pkg::_.autodoc.version.low;
+  Set dep = TolPackage::GetDeepDependencies(name, True);
+
+  Real If(!ObjectExist("Text", "pkg::_.autodoc.name"),
+  {
+    AddMember(pkg,{Text _.autodoc.name = name })
+  },
+  {
+    Text pkg::_.autodoc.name := name;
+    True
+  });
+  Real If(!ObjectExist("Set", "pkg::_.autodoc.dependencies"),
+  {
+    AddMember(pkg,{Set _.autodoc.dependencies = dep })
+  },
+  {
+    Set pkg::_.autodoc.dependencies := dep;
+    True
+  });
+  Real If(!ObjectExist("Date","pkg::_.autodoc.releaseDate"),
+  {
+    Real AddMember(pkg,{Date _.autodoc.releaseDate = releaseDate})
+  },
+  {
+    Date pkg::_.autodoc.releaseDate := releaseDate;
+    True
+  });
+  Real If(!ObjectExist("Set", "pkg::_.autodoc.authors"),
+  {
+    AddMember(pkg,{Set _.autodoc.authors = Copy(Empty) })
+  });
+  Real If(!ObjectExist("Set", "pkg::_.autodoc.keys"),
+  {
+    AddMember(pkg,{Set _.autodoc.keys = Copy(Empty) })
+  });
+  Real If(!ObjectExist("Set", "pkg::_.autodoc.nonTolResources"),
+  {
+    AddMember(pkg,{Set _.autodoc.nonTolResources = Copy(Empty) })
+  });
+  Real If(!ObjectExist("Text", "pkg::_.autodoc.versionControl"),
+  {
+    AddMember(pkg,{Text _.autodoc.versionControl = "" })
+  });
+  Real If(!ObjectExist("Text", "pkg::_.autodoc.maxTolVersion"),
+  {
+    Real AddMember(pkg,{Text _.autodoc.maxTolVersion = "v999999999999999999" })
+  });
+  Real If(!ObjectExist("Text", "pkg::_.autodoc.extra_info"),
+  {
+    Real AddMember(pkg,{Text _.autodoc.extra_info = "" })
+  });
+  PackageInfo.Extract(pkg)
+};
+
+//////////////////////////////////////////////////////////////////////////////
+Text _.autodoc.member.PackageInfo.Build = 
+"Builds the info.oza file with documental information about a loaded "
+"package.";
+Real PackageInfo.Build(NameBlock pkg, Text dirPath, Date releaseDate_)    
+//////////////////////////////////////////////////////////////////////////////
+{
+  Date releaseDate = Date If(""<<releaseDate_!="Unknown",
+  {
+    releaseDate_
+  },
+  {
+    Text name = Name(pkg);
+    Text name.version = name+"."<<
+     pkg::_.autodoc.version.high+"."<<pkg::_.autodoc.version.low;
+    Date gmt = Copy(NowGmt);
+    Date loc = Copy(Now);
+    Real lag = Round(DateDif(S(0),loc,gmt)/10)*10;
+    Text oza = dirPath+name.version+".oza";
+    Date local = FileTime(oza);
+    Succ(local,S(0),lag)
+  });
+  Set info = PackageInfo.AutoFill(pkg,releaseDate);
+  Real OSDirMake(dirPath);
+  Real Ois.Store(info,dirPath+"info.oza")
+};
+
Index: tol/stdlib/general/TolPackage/server.tol
===================================================================
--- tol/stdlib/general/TolPackage/server.tol	(revision 13eebd963c56390295f26e77b1107ff72d2d3ac5)
+++ tol/stdlib/general/TolPackage/server.tol	(revision 837719de75ae72fec96296b0dfa326793c84e3fa)
@@ -94,4 +94,5 @@
   })
 };
+
 
 
@@ -114,4 +115,5 @@
 //////////////////////////////////////////////////////////////////////////////
 {
+  Date release.gmt = Copy(NowGmt);
   Text _MID = "[BuildPackage] ";
   WriteLn(_MID+sourceRoot+name+" -> "+destination);
@@ -119,13 +121,13 @@
      sourceRoot+name+"/"+name+".tol\",True)");
   NameBlock pkg = pkgCnt[1];
-  Text name.version = TolPackage::GetCurrentNameVersion(name,True);
-  Set dependencies = TolPackage::GetDeepDependencies(name, True);
-  Set nonTolResources=If(!ObjectExist("Set",name+"::_.autodoc.nonTolResources"),
-    Copy(Empty),pkg::_.autodoc.nonTolResources);
-
+  Text name.version = name+"."<<
+    pkg::_.autodoc.version.high+"."<<pkg::_.autodoc.version.low;
   Text ppRoot_ = destination+name.version;
   Text ppRoot = ppRoot_+"/";
+  Real TolPackage::PackageInfo.Build(pkg,ppRoot,release.gmt);
+  Set nonTolResources = pkg::_.autodoc.nonTolResources;
+
+  Real OSDirMake(ppRoot);
   Real Ois.Store(pkgCnt,ppRoot+name.version+".oza");
-  Real OSDirMake(ppRoot);
 
   Real cleanResource(Text dest)
@@ -143,4 +145,5 @@
     True
   };
+
   Real processResourceText(Text resource)
   {
@@ -164,7 +167,5 @@
     Eval("processResource"+gra+"(res)")
   });
-  Text ppr = ReplaceSlash(ppRoot_);
-  Set dep = TolPackage::GetDeepDependencies(name, True);
-  
+  Text ppr = ReplaceSlash(ppRoot_); 
   Real PackArchive::PackFull("ZipArchive", ppr, removeDir);
   ppRoot_+".zip"
@@ -190,10 +191,4 @@
   Text oza = root+pkg.name+"/"+pkg.name+".oza";
   Set pkgCnt = Include(oza);
-  Date gmt = Copy(NowGmt);
-  Date loc = Copy(Now);
-  Real lag = Round(DateDif(S(0),loc,gmt)/10)*10;
-  Date release.loc = FileTime(oza);
-  Date release.gmt = Succ(release.loc,S(0),lag);
-  
   NameBlock pkg = pkgCnt[1];
   Text name = Name(pkgCnt[1]);
@@ -234,26 +229,17 @@
   },
   {
-    Set dep = TolPackage::GetDeepDependencies(name, True);
-    Set aut = If(!ObjectExist("Set","pkg::_.autodoc.authors"),
-      Copy(Empty),
-      pkg::_.autodoc.authors);
-    Set key = If(!ObjectExist("Set","pkg::_.autodoc.keys"),
-      Copy(Empty),
-      pkg::_.autodoc.keys);
-    Set res = If(!ObjectExist("Set","pkg::_.autodoc.nonTolResources"),
-      Copy(Empty),
-      pkg::_.autodoc.nonTolResources);
-    Text verCnt = If(!ObjectExist("Text","pkg::_.autodoc.versionControl"),"",
-      ReplaceTable(pkg::_.autodoc.versionControl,[[
+    Set dep = pkg::_.autodoc.dependencies;
+    Set aut = pkg::_.autodoc.authors;
+    Set key = pkg::_.autodoc.keys;
+    Set res = pkg::_.autodoc.nonTolResources;
+    Text verCnt = ReplaceTable(pkg::_.autodoc.versionControl,[[
       [["\n","<BR>"]],
       [["'","\""]] ,
-      [[";",","]] ]]));
+      [[";",","]] ]]);
     Text bl_contents = EncodeBase64FromFile(pkg.path.zip);
     Real nu_bytes = FileBytes(pkg.path.zip);
     Real id_format = 1;
-    Text te_max_tol_version = "v999999999999999999";
+    Text te_max_tol_version = pkg::_.autodoc.maxTolVersion;
     Text te_extra_info = "";
-    Text If(ObjectExist("Text", "pkg::_.autodoc.maxTolVersion"),
-      te_max_tol_version := pkg::_.autodoc.maxTolVersion);
   //Text exist.query = 
     Text insert.query = "
@@ -274,5 +260,5 @@
      "'"<<TolPackage::Server::SqlFormatSetOfText(pkg::_.autodoc.authors)+"', \n"+
      "'"<<pkg::_.autodoc.minTolVersion+"', \n"+
-     "'"<<FormatDate(release.gmt,"%c%Y-%m-%d %h:%i:%s")+"', \n"+
+     "'"<<FormatDate(pkg::_.autodoc.releaseDate,"%c%Y-%m-%d %h:%i:%s")+"', \n"+
      "'"<<TolPackage::Server::SqlFormatSetOfText(dep)+"', \n"+
      "'"<<TolPackage::Server::FormatSet(res)+"', \n"+
