[PATCH v2 compass-ci] src/lib/job.cr: delete os_mount in common_dir for upload rpm

[why] rpm has no much to do with os_mount. Signed-off-by: Li Ping <1477412247@qq.com> --- src/lib/job.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 0b4bee4..a30c969 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -274,7 +274,11 @@ class Job tmp_os_mount = pkg_style["os_mount"]? == nil ? "#{os_mount}" : pkg_style["os_mount"] mount_type = tmp_os_mount == "cifs" ? "nfs" : tmp_os_mount.dup - common_dir = "#{mount_type}/#{tmp_os}/#{tmp_os_arch}/#{tmp_os_version}" + if @hash["rpmbuild-pkg"]? + common_dir = "#{tmp_os}/#{tmp_os_arch}/#{tmp_os_version}" + else + common_dir = "#{mount_type}/#{tmp_os}/#{tmp_os_arch}/#{tmp_os_version}" + end return common_dir end -- 2.23.0

On Thu, Mar 04, 2021 at 02:33:59PM +0800, Li Ping wrote:
[why] rpm has no much to do with os_mount.
Signed-off-by: Li Ping <1477412247@qq.com> --- src/lib/job.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 0b4bee4..a30c969 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -274,7 +274,11 @@ class Job
tmp_os_mount = pkg_style["os_mount"]? == nil ? "#{os_mount}" : pkg_style["os_mount"]
这老代码好别扭,可以优化一下吗?
mount_type = tmp_os_mount == "cifs" ? "nfs" : tmp_os_mount.dup
需要 .dup 吗? Thanks, Fengguang

On Thu, Mar 04, 2021 at 05:03:36PM +0800, Wu Fengguang wrote:
On Thu, Mar 04, 2021 at 02:33:59PM +0800, Li Ping wrote:
[why] rpm has no much to do with os_mount.
Signed-off-by: Li Ping <1477412247@qq.com> --- src/lib/job.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 0b4bee4..a30c969 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -274,7 +274,11 @@ class Job
tmp_os_mount = pkg_style["os_mount"]? == nil ? "#{os_mount}" : pkg_style["os_mount"]
这老代码好别扭,可以优化一下吗?
ok
mount_type = tmp_os_mount == "cifs" ? "nfs" : tmp_os_mount.dup
需要 .dup 吗?
Thanks, Fengguang
participants (2)
-
Li Ping
-
Wu Fengguang