close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 13 years ago

Closed 13 years ago

#1378 closed doubt (fixed)

ExportPackage?

Reported by: Jorge Owned by: Víctor de Buen Remiro
Priority: high Milestone: Mantainance
Component: Kernel Version: head
Severity: critical Keywords:
Cc:

Description

Is there any function to export a locally installed package to a zip file? This is usefull to move packages from one machine to other.

If this function is not available it is requested the implementation of one with the followinf prototype:

Real TolPackage::Client::ExportPackage( Text pkg.ver, Text dir.dest );

pkg.ver must be installed locally, dir.dest is a directory where the resulting zip will be copied.

Change History (3)

comment:1 Changed 13 years ago by Víctor de Buen Remiro

Could you test if this code makes that?

Text pkg.ver = "BysPrior.2.1";
Text dir.dest = "c:/tmp/";

Text dir.loc = ReplaceSlash(TolPackage::Client::_.localRoot);
Text pkg.loc = dir.loc+pkg.ver;
Text zip.loc = pkg.loc+".zip";
Text zip.dest = dir.dest+pkg.ver+".zip";

//Ensures that local.oza is locally created
Real TolPackage::Client::LocalInfo(pkg.ver);

//Compacts the package as a ZIP file
Real PackArchive::PackFull("ZipArchive", pkg.loc, False);

//Moves the ZIP file to destination directory
Real OSFilMove(zip.loc, zip.dest);

comment:2 Changed 13 years ago by Jorge

Tested on Linux, it creates a zip file with this content:

BysPrior.2.1.oza
info.oza

It was also verified the instalation with LocalInstallPackage

comment:3 Changed 13 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: newclosed

(In [3964]) Fixes #1378

Note: See TracTickets for help on using tickets.