[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#638024: [apt] APT::Default-Release considers equivalent suite names differently ("testing" != "wheezy")



Le 2011-08-16 13:03, David Kalnischkies a écrit :
On Tue, Aug 16, 2011 at 18:28, Filipus Klutiero<chealer@gmail.com>  wrote:
The value of APT::Default-Release depends on what suite codenames are in APT
sources. If a source specifies the distribution as "testing", then setting
APT::Default-Release to "wheezy" will not work as expected. Instead, APT
will complain that "wheezy" wasn't found in sources.list.
E:The value 'wheezy' is invalid for APT::Default-Release as such a release
is not available in the sources
It should not, can you provide an example sources.list?

the code in apt-pkg/policy.cc Init() reads:
if ((F->Archive != 0&&  vm.ExpressionMatches(DefRel, F.Archive()) == true) ||
     (F->Codename != 0&&  vm.ExpressionMatches(DefRel, F.Codename()) == true) ||
     (F->Version != 0&&  vm.ExpressionMatches(DefRel, F.Version()) == true))

Archive, Codename and Version refer to the data extracted from the fields
in the {In,}Release files (there Archive is called Suite nowadays).
I couldn't reproduce the problem I described. I'm sorry, I must have been confused.

I struggled to find what could have confused me and eventually found this abnormal behavior, which must be related to whatever confused me: If you start with a testing/unstable mix that uses "wheezy" as codename in Default-Release but "testing" in APT sources, this works well. However, if you change the sources to read "wheezy" instead of "testing", instead of ensuring that the Default-Release will keep working as expected, this triggers the error message above when launching APT. However, this disappears as soon as package indices are updated.

So: either APT should consider equivalent names as the same, or the error message should hint that package indices should be updated.



Reply to: