mirror of https://github.com/mamba-org/mamba.git
keep track_features around in PackageInfo class
This commit is contained in:
parent
3572383165
commit
7a7c4ae175
|
@ -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
|
||||
|
@ -32,7 +33,6 @@ from sphinx.util import logging
|
|||
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__)
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ namespace mamba
|
|||
std::size_t timestamp = 0;
|
||||
std::string md5;
|
||||
std::string sha256;
|
||||
std::string track_features;
|
||||
std::vector<std::string> depends;
|
||||
std::vector<std::string> constrains;
|
||||
};
|
||||
|
|
|
@ -151,6 +151,17 @@ namespace mamba
|
|||
{
|
||||
constrains[i] = pool_dep2str(pool, q.elements[i]);
|
||||
}
|
||||
queue_empty(&q);
|
||||
solvable_lookup_idarray(s, SOLVABLE_TRACK_FEATURES, &q);
|
||||
if (q.count)
|
||||
{
|
||||
std::vector<std::string> tmp_tf(q.count);
|
||||
for (int i = 0; i < q.count; ++i)
|
||||
{
|
||||
track_features += pool_id2str(pool, q.elements[i]);
|
||||
track_features += (i == q.count - 1) ? "" : ",";
|
||||
}
|
||||
}
|
||||
queue_free(&q);
|
||||
}
|
||||
|
||||
|
@ -176,6 +187,7 @@ namespace mamba
|
|||
assign_or(j, "license", license, ""s);
|
||||
assign_or(j, "md5", md5, ""s);
|
||||
assign_or(j, "sha256", sha256, ""s);
|
||||
assign_or(j, "track_features", track_features, ""s);
|
||||
|
||||
if (j.contains("depends"))
|
||||
{
|
||||
|
@ -218,6 +230,7 @@ namespace mamba
|
|||
j["build_string"] = build_string;
|
||||
j["build_number"] = build_number;
|
||||
j["license"] = license;
|
||||
j["track_features"] = track_features;
|
||||
if (!md5.empty())
|
||||
{
|
||||
j["md5"] = md5;
|
||||
|
|
Loading…
Reference in New Issue