From: Tobias Ulmer Date: Fri, 21 Oct 2016 16:05:45 +0000 (+0200) Subject: result: rename to sources_list() X-Git-Tag: e2factory-2.3.15rc1~60 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=e092cf438280cb81d1daafa56c676b2f4f273518;p=e2factory.git result: rename to sources_list() Signed-off-by: Tobias Ulmer --- diff --git a/local/e2-fetch-sources.lua b/local/e2-fetch-sources.lua index bf6b8a9..e73f6c8 100644 --- a/local/e2-fetch-sources.lua +++ b/local/e2-fetch-sources.lua @@ -182,7 +182,7 @@ local function e2_fetch_source(arg) e2lib.logf(3, "is regarded as result: %s", srcresname) local res = result.results[srcresname] - for sourcename in res:my_sources_list():iter_sorted() do + for sourcename in res:sources_list():iter_sorted() do sel[sourcename] = true end elseif opts.result then diff --git a/local/e2-ls-project.lua b/local/e2-ls-project.lua index 8ed1626..1b43919 100644 --- a/local/e2-ls-project.lua +++ b/local/e2-ls-project.lua @@ -97,7 +97,7 @@ local function e2_ls_project(arg) local res = result.results[resultname] if res:isInstanceOf(result.result_class) then - for sourcename in res:my_sources_list():iter_sorted() do + for sourcename in res:sources_list():iter_sorted() do if not yet[sourcename] then table.insert(sources, sourcename) yet[sourcename] = true @@ -183,7 +183,7 @@ local function e2_ls_project(arg) console.infof(" \"%s\"\n", r) end if opts["dot-sources"] and res:isInstanceOf(result.result_class) then - for src in res:my_sources_list():iter_sorted() do + for src in res:sources_list():iter_sorted() do if opts.swap then console.infof(" \"%s-src\" %s \"%s\"\n", src, arrow, r) else diff --git a/local/e2build.lua b/local/e2build.lua index 9585bac..50cd1b9 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -697,7 +697,7 @@ function e2build.build_process_class:_install_sources(res, return_flags) bc = res:build_config() info = e2tool.info() - for sourcename in res:my_sources_list():iter_sorted() do + for sourcename in res:sources_list():iter_sorted() do e = err.new("installing source failed: %s", sourcename) destdir = e2lib.join(bc.T, "build") diff --git a/local/result.lua b/local/result.lua index 52479ad..b79277a 100644 --- a/local/result.lua +++ b/local/result.lua @@ -111,6 +111,13 @@ function result.basic_result:depends_list() self._type, self._name)) end +--- Return a string list of sources. +-- @return String list of source names. +function result.basic_result:sources_list() + error(err.new("called sources_list() of result base class, type %s name %s", + self._type, self._name)) +end + --- Return the complete and merged environment for this result. -- Does NOT include the builtin environment from build_config. -- @return Environment object @@ -362,7 +369,7 @@ function result.result_class:depends_list() return self._depends_list:copy() end -function result.result_class:my_sources_list() +function result.result_class:sources_list() return self._sources_list end @@ -479,7 +486,7 @@ function result.result_class:buildid() hash.hash_append(hc, self:get_type()) -- sources - for sourcename in self:my_sources_list():iter_sorted() do + for sourcename in self:sources_list():iter_sorted() do local src, sourceset src = source.sources[sourcename] @@ -552,7 +559,7 @@ function result.result_class:attribute_table(flagt) local t = {} flagt = flagt or {} - table.insert(t, { "sources", self:my_sources_list():unpack()}) + table.insert(t, { "sources", self:sources_list():unpack()}) table.insert(t, { "depends", self:depends_list():unpack()}) if flagt.chroot then table.insert(t, { "chroot", self:chroot_list():unpack()}) diff --git a/plugins/collect_project.lua b/plugins/collect_project.lua index e6494d6..a3d98aa 100644 --- a/plugins/collect_project.lua +++ b/plugins/collect_project.lua @@ -133,7 +133,7 @@ local function _build_collect_project(self, res, return_flags) dep:get_name(), dep:get_type()) end cp_chroot:insert_sl(dep:chroot_list()) - cp_sources:insert_sl(dep:my_sources_list()) + cp_sources:insert_sl(dep:sources_list()) end for sourcename in cp_sources:iter_sorted() do @@ -306,7 +306,7 @@ local function _build_collect_project(self, res, return_flags) string.format("### generated by e2factory for result %s ###\n", depname), string.format("CHROOT='%s'\n", dep:chroot_list():concat_sorted(" ")), string.format("DEPEND='%s'\n", dep:depends_list():concat_sorted(" ")), - string.format("SOURCE='%s'\n", dep:my_sources_list():concat_sorted(" ")), + string.format("SOURCE='%s'\n", dep:sources_list():concat_sorted(" ")), } local config = e2lib.join(destdir, "config") @@ -500,8 +500,8 @@ function collect_project_class:merged_env() return self._stdresult:merged_env() end -function collect_project_class:my_sources_list() - return self._stdresult:my_sources_list() +function collect_project_class:sources_list() + return self._stdresult:sources_list() end function collect_project_class:attribute_table(flagt)