Mailinglist Archive: yast-devel (77 mails)
| < Previous | Next > |
Re: [yast-devel] Re: [opensuse-factory] System Ugrade: Previously Used Repositories
- From: Ladislav Slezak <lslezak@xxxxxxx>
- Date: Thu, 15 Jan 2009 17:40:29 +0100
- Message-id: <496F66FD.6080408@xxxxxxx>
Martin Vidner napsal(a):
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@xxxxxxx
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx
On Wed, Jan 14, 2009 at 01:53:29PM +0100, Lukas Ocilka wrote:[...]
Martin Vidner 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
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@xxxxxxx
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx
| < Previous | Next > |