[zypp-devel] using libzypp as user and also in /$MYROOT (libzypp-bindings / libzypp)
Hi ! I'm using libzypp / libzypp-bindings-python to query packages available in an http-rpmmd-repo. I started with initializeTarget(zypp.Pathname("/tmp/a")) created my repoinfo, but then mymanager.addRepository(myrepoinfo) fails because it wants to write to /etc/zypp. How can I change this behaviour ? AFAIK /etc/zypp is stored in configPath. But found no "setConfigPath". Did I miss something? Or is this not possible with libzypp ? Best regards Jan-Simon -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Mon, 1 Sep 2008, Jan-Simon Möller wrote:
I'm using libzypp / libzypp-bindings-python to query packages available in an http-rpmmd-repo.
I started with
initializeTarget(zypp.Pathname("/tmp/a"))
created my repoinfo, but then
mymanager.addRepository(myrepoinfo)
fails because it wants to write to /etc/zypp. How can I change this behaviour ? AFAIK /etc/zypp is stored in configPath. But found no "setConfigPath". Did I miss something? Or is this not possible with libzypp ?
Create a new zypp.conf (replace at least configdir with a user-writable dir). Point the zypp apps to your own zypp.conf with the ZYPP_CONF environment variable: % ZYPP_CONF=/tmp/zypp.conf build-dir/myapp Ciao, Michael.
Am Montag 01 September 2008 17:07:53 schrieb Michael Matz:
Create a new zypp.conf (replace at least configdir with a user-writable dir). Point the zypp apps to your own zypp.conf with the ZYPP_CONF environment variable:
% ZYPP_CONF=/tmp/zypp.conf build-dir/myapp
Hi Michael! Tnx a lot, thats what I was looking for - lets see if I get it running now ;). Best regards Jan-Simon -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Mon, Sep 01, Michael Matz wrote:
Hi,
On Mon, 1 Sep 2008, Jan-Simon M?ler wrote:
I'm using libzypp / libzypp-bindings-python to query packages available in an http-rpmmd-repo.
I started with
initializeTarget(zypp.Pathname("/tmp/a"))
created my repoinfo, but then
mymanager.addRepository(myrepoinfo)
fails because it wants to write to /etc/zypp. How can I change this behaviour ? AFAIK /etc/zypp is stored in configPath. But found no "setConfigPath". Did I miss something? Or is this not possible with libzypp ?
Create a new zypp.conf (replace at least configdir with a user-writable dir). Point the zypp apps to your own zypp.conf with the ZYPP_CONF environment variable:
% ZYPP_CONF=/tmp/zypp.conf build-dir/myapp
Without a new ZYPP_CONF: Besides /etc/zypp/repos.d, the repomanager may also want to download metadata, create solv files, etc... You can redirect the repomanager to use a different root directory: rootdir = zypp.Pathname("/tmp/a") repoManagerOptions = zypp.RepoManagerOptions( rootdir ) mymanager = zypp.RepoManager( repoManagerOptions ) -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Michael Andres napsal(a):
On Mon, Sep 01, Michael Matz wrote:
Hi,
On Mon, 1 Sep 2008, Jan-Simon M?ler wrote:
I'm using libzypp / libzypp-bindings-python to query packages available in an http-rpmmd-repo.
I started with
initializeTarget(zypp.Pathname("/tmp/a"))
created my repoinfo, but then
mymanager.addRepository(myrepoinfo)
fails because it wants to write to /etc/zypp. How can I change this behaviour ? AFAIK /etc/zypp is stored in configPath. But found no "setConfigPath". Did I miss something? Or is this not possible with libzypp ? Create a new zypp.conf (replace at least configdir with a user-writable dir). Point the zypp apps to your own zypp.conf with the ZYPP_CONF environment variable:
% ZYPP_CONF=/tmp/zypp.conf build-dir/myapp
Without a new ZYPP_CONF:
Besides /etc/zypp/repos.d, the repomanager may also want to download metadata, create solv files, etc... You can redirect the repomanager to use a different root directory:
rootdir = zypp.Pathname("/tmp/a") repoManagerOptions = zypp.RepoManagerOptions( rootdir ) mymanager = zypp.RepoManager( repoManagerOptions )
Yes, in this way it uses zypper with root prefix (which can be run as user), you can inspire by its code. JR -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Am Montag 01 September 2008 17:52:52 schrieb Michael Andres:
Without a new ZYPP_CONF:
Besides /etc/zypp/repos.d, the repomanager may also want to download metadata, create solv files, etc... You can redirect the repomanager to use a different root directory:
rootdir = zypp.Pathname("/tmp/a") repoManagerOptions = zypp.RepoManagerOptions( rootdir ) mymanager = zypp.RepoManager( repoManagerOptions )
Thanks, it works! Now i'm only stuck with the signature check (see other mail). best regards Jan-Simon -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (4)
-
Jan-Simon Möller
-
josef reidinger
-
Michael Andres
-
Michael Matz