Martin Vidner napsal(a):
On Wed, Jan 14, 2009 at 01:53:29PM +0100, Lukas Ocilka wrote:
On Wed, Jan 14, 2009 at 01:15:12PM +0100, Lukas Ocilka wrote: [...] HTTP::Get("myurl", Directory::tmpdir + "/myurl.out"); // (yast2-transfer) Yes, this solution looks quite simple but the "myurl" might be a bit
Martin Vidner wrote: tricky if it is not a HTTP-based repository. NFS needs to be mounted first, CD/DVD too, what about Samba? (etc.) And additionally, the repository uses "URL" + "Product Path".
Duh, I forgot about that, you're right. So we just want an equivalent of the above Get that works with all Zypp media and does not require a repo set-up.
That should be possible using three Pkg:: commands: /* this adds a temporary repository in memory without metadata download/refresh */ integer tmp_repo = Pkg::RepositoryAdd($["enabled" : false, "autorefresh" : false, "base_urls" : [ "URL" ], "prod_dir" : "/") /* download optional repo_update.xml file */ /* it should be signed for security reasons */ string downloaded_file = Pkg::SourceProvideDigestedFile(tmp_repo, 1 /*the first medium*/, "repo_update.xml", true /* optional */) if (downloaded_file != nil) { /* process the repo update file here - update the URLs */ } /* clean up */ Pkg::SourceDelete(tmp_repo); -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org