Preventing unnecessary package builds for prerelease projects. 44/82644/1
authorJunghyun Kim <jh0822.kim@samsung.com>
Thu, 4 Aug 2016 23:07:40 +0000 (08:07 +0900)
committerJunghyun Kim <jh0822.kim@samsung.com>
Thu, 4 Aug 2016 23:07:40 +0000 (08:07 +0900)
commit980d7974710b53eaf141c58ea5cdaeba679fda16
tree9016b8dd6ed9d70022508978572b3d1e94cd0f01
parent842ac32cc0eaa16f0414475e744dde1862e94155
Preventing unnecessary package builds for prerelease projects.

For normal OBS projects, if the result binary for package PKG_A is not changed,
packages depending on PKG_A are not build due to build-compare package.

However, for prerelease projects, if a build is triggers for package PKG_A,
all packages depends on PKG_A are built in prerelease projects.

REASON
To perform build-compare, we need two rpms: oldrpm and newrpm.
However, for prerelease projects, there is no oldrpm since there is no rpms built for the prerelease project.

SOLUTION
Sym-link rpm files from the linked projects.
For example,
ln -s /srv/obs/build/Tizen:Mobile/arm-wayland/armv7l/libnl2/*.rpm /srv/obs/build/home:prerelease:Tizen:Mobile:submit:tizen:20160729.002907/arm-wayland/armv7l/libnl2

To do this, we have to change two things.
1. jenkins-script
To perform this functionality as an option, this functionality is performed only if "CopyLinkedPackages: yes" is in project config.
To do this, we have to change "job_submit.py" in jenkins-script.
"job_submit.py" adds "CopyLinkedPackages: yes" at the end of project config for prerelease projects.

2. bs_sched (OBS)
If "CopyLinkedPackages: yes" is found in project config, make a symbolic link for the package before this package is built.

Change-Id: I54ab531a8b8b73f1b7ea95cf0cd76c596954cc9a
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
job_submit.py