Skip to content

Commit

Permalink
Fixed missing key <channel_name> in channel <channel_list> issue (#2668)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille authored Jul 13, 2023
1 parent f555765 commit 134e2dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libmamba/src/core/prefix_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <unordered_map>
#include <utility>

#include "mamba/core/channel.hpp"
#include "mamba/core/output.hpp"
#include "mamba/core/prefix_data.hpp"
#include "mamba/core/util.hpp"
Expand Down Expand Up @@ -159,6 +160,12 @@ namespace mamba
nlohmann::json j;
infile >> j;
auto prec = PackageInfo(std::move(j));
// Some versions of micromamba constructor generate repodata_record.json
// and conda-meta json files with channel names while mamba expects
// PackageInfo channels to be platform urls. This fixes the issue described
// in https://github.com/mamba-org/mamba/issues/2665
const Channel& channel = m_channel_context.make_channel(prec.channel);
prec.channel = channel.platform_url(prec.subdir);
m_package_records.insert({ prec.name, std::move(prec) });
}
} // namespace mamba

0 comments on commit 134e2dd

Please sign in to comment.