Skip to content

Commit

Permalink
respect channel specific pins when updating
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Jun 30, 2021
1 parent 3572383 commit ee85a21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/source/tools/mermaid.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import codecs
import os
import posixpath
from errno import ENOENT
from hashlib import sha1
from subprocess import PIPE, Popen
from tempfile import _get_default_tempdir
Expand All @@ -32,7 +33,6 @@
from sphinx.util.fileutil import copy_asset
from sphinx.util.i18n import search_image_for_language
from sphinx.util.osutil import ensuredir
from errno import ENOENT

logger = logging.getLogger(__name__)

Expand Down
18 changes: 8 additions & 10 deletions src/core/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ namespace mamba
// This is checking if SOLVER_ERASE and SOLVER_INSTALL are set
// which are the flags for SOLVER_UPDATE
MatchSpec ms(job);

if (!ms.channel.empty() && job_flag & SOLVER_INSTALL)
{
add_channel_specific_job(ms, job_flag);
}

if (((job_flag & SOLVER_UPDATE) ^ SOLVER_UPDATE) == 0)
{
// ignoring update specs here for now
Expand All @@ -160,16 +166,8 @@ namespace mamba
else
m_remove_specs.emplace_back(job);
}
if (!ms.channel.empty())
{
if (job_flag & SOLVER_ERASE)
{
throw std::runtime_error("Cannot erase a channel-specific package. (" + job
+ ")");
}
add_channel_specific_job(ms, job_flag);
}
else if (job_flag & SOLVER_INSTALL && force_reinstall)

if (job_flag & SOLVER_INSTALL && force_reinstall)
{
add_reinstall_job(ms, job_flag);
}
Expand Down

0 comments on commit ee85a21

Please sign in to comment.