[zypp-devel] sat-solver and solvable:mediadir
I found out that the satsolver Python bindings return a bool object ("True") if solvable:mediadir is not existing in the solv file. This happens with the solv files generated from buildservice repositories like http://download.opensuse.org/repositories/home:/janblunck/openSUSE_Factory/. Is solvable:mediadir a required field and therefore a bug in repo2solv? Thanks, Jan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Mar 13, 2009 at 11:45:47AM +0100, Jan Blunck wrote:
I found out that the satsolver Python bindings return a bool object ("True") if solvable:mediadir is not existing in the solv file. This happens with the solv files generated from buildservice repositories like http://download.opensuse.org/repositories/home:/janblunck/openSUSE_Factory/.
Is solvable:mediadir a required field and therefore a bug in repo2solv?
No. You're not really supposed to access it, you should use solvable_get_location() to retrieve the location. (It's not available in the bindings, though. Too bad.) Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Mar 13, Michael Schroeder wrote:
On Fri, Mar 13, 2009 at 11:45:47AM +0100, Jan Blunck wrote:
I found out that the satsolver Python bindings return a bool object ("True") if solvable:mediadir is not existing in the solv file.
Still this needs to be fixed in the bindings than. Getting the value of an existing attribute should return None (in the Python case) when the attibutes value is void.
Is solvable:mediadir a required field and therefore a bug in repo2solv?
No. You're not really supposed to access it, you should use solvable_get_location() to retrieve the location. (It's not available in the bindings, though. Too bad.)
From looking at solvable_get_location() I see that this is basically what I do now as a workaround.
Thanks, Jan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Jan Blunck
On Fri, Mar 13, Michael Schroeder wrote:
On Fri, Mar 13, 2009 at 11:45:47AM +0100, Jan Blunck wrote:
I found out that the satsolver Python bindings return a bool object ("True") if solvable:mediadir is not existing in the solv file.
Still this needs to be fixed in the bindings than. Getting the value of an existing attribute should return None (in the Python case) when the attibutes value is void.
Can you please provide a .solv file showing this error ? sat-solver/bindings/testdata contain .solv files were 'dumpsolv' shows solvable:mediadir: (void) So the attribute is present but empty, denoting a boolean 'true'. Looks like a bug in generating the .solv file to me... Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Fri, 27 Mar 2009, Klaus Kaempf wrote:
Can you please provide a .solv file showing this error ?
sat-solver/bindings/testdata contain .solv files were 'dumpsolv' shows solvable:mediadir: (void)
So the attribute is present but empty, denoting a boolean 'true'. Looks like a bug in generating the .solv file to me...
No, that's correct. This is why you should use the function in the C files to access the location, as the encoding is a bit involved. In this case the void attribute for mediadir means use the architecture of the package as directory. (That's the most often used subdirs for susetags repos). Encoding it this way takes up zero space per solvable. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Michael Matz
Hi,
On Fri, 27 Mar 2009, Klaus Kaempf wrote:
Can you please provide a .solv file showing this error ?
sat-solver/bindings/testdata contain .solv files were 'dumpsolv' shows solvable:mediadir: (void)
So the attribute is present but empty, denoting a boolean 'true'. Looks like a bug in generating the .solv file to me...
No, that's correct. This is why you should use the function in the C files to access the location, as the encoding is a bit involved.
Well, the bindings now provide a 'location' attribute.
In this case the void attribute for mediadir means use the architecture of the package as directory. (That's the most often used subdirs for susetags repos). Encoding it this way takes up zero space per solvable.
This raises the question about other exceptions from the rule. Is there a list of "there's a special function providing access" attributes ? Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Mon, 30 Mar 2009, Klaus Kaempf wrote:
In this case the void attribute for mediadir means use the architecture of the package as directory. (That's the most often used subdirs for susetags repos). Encoding it this way takes up zero space per solvable.
This raises the question about other exceptions from the rule. Is there a list of "there's a special function providing access" attributes ?
Not that I know of. Currently it's only the location of a solvable. Of course the localized strings also need special handling as do the filelists, but the latter is taken care of by the data iterator and the former by solvable_lookup_str_poollang and solvable_lookup_str_lang. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Mon, Mar 30, 2009 at 12:52:11PM +0200, Michael Matz wrote:
Hi,
On Mon, 30 Mar 2009, Klaus Kaempf wrote:
In this case the void attribute for mediadir means use the architecture of the package as directory. (That's the most often used subdirs for susetags repos). Encoding it this way takes up zero space per solvable.
This raises the question about other exceptions from the rule. Is there a list of "there's a special function providing access" attributes ?
Not that I know of. Currently it's only the location of a solvable.
The source rpm name is also encoded in a special way, but there is no retrieve function (yet). Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Mon, 30 Mar 2009, Michael Schroeder wrote:
This raises the question about other exceptions from the rule. Is there a list of "there's a special function providing access" attributes ?
Not that I know of. Currently it's only the location of a solvable.
The source rpm name is also encoded in a special way,
Hmm, how could I forget that... Yes. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Michael Schroeder
No. You're not really supposed to access it, you should use solvable_get_location() to retrieve the location. (It's not available in the bindings, though. Too bad.)
It is now as 'solvable.location()', returning a two-element tuple of [path (string), medianr (int)] Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (4)
-
Jan Blunck
-
Klaus Kaempf
-
Michael Matz
-
Michael Schroeder