]> git.e2factory.org Git - e2factory.git/commitdiff
result: rename to sources_list()
authorTobias Ulmer <tu@emlix.com>
Fri, 21 Oct 2016 16:05:45 +0000 (18:05 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2-fetch-sources.lua
local/e2-ls-project.lua
local/e2build.lua
local/result.lua
plugins/collect_project.lua

index bf6b8a9f8ee5f776abe79fd1bd8cf725ce6cbb9d..e73f6c884bf7097617e183d8fd4e4197284f74cb 100644 (file)
@@ -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
index 8ed16260c02dd86389de9ea061917e67d458ec47..1b43919e1d4e3b5b6b53de152052f9b4bf955621 100644 (file)
@@ -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
index 9585bac1b05d424b02e0b893246b4870b5659e15..50cd1b9c45bbbbe7447a324a5d34cf55efb25094 100644 (file)
@@ -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")
index 52479ad03cdb38e30d13943d9a385c409c443ffd..b79277ad494d27fb022cb6bc16e9ffc695f2a0db 100644 (file)
@@ -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()})
index e6494d62f1672cc2886adfb1ea5a634a1dd2f37c..a3d98aa31048b29ceb895391c4a359b707dbd2d5 100644 (file)
@@ -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)