GIT_NEW_ID = os.environ.get('GIT_NEW_ID')
GIT_BRANCH_NAME = os.environ.get('GIT_BRANCH_NAME')
+SOURCE_BUILD = os.environ.get('SOURCE_BUILD')
+
GIT_COMMITTER_EMAIL = os.environ.get('GIT_COMMITTER_EMAIL')
SMTP_SERVER = 'roma.profitbricks.localdomain'
def build_kernel_with_pbuilder(revision, pbuilder_script, dist='stable'):
pbuilder_script = os.path.abspath(pbuilder_script)
+
+ if SOURCE_BUILD:
+ SOURCE_BUILD='--source-only'
+ else
+ SOURCE_BUILD=''
+
cmd = [
SUDO,
PBUILDER,
'--revision', '%s' %(revision),
'--dist', '%s' %(dist),
'--overlay-dir', '%s' % os.path.join(CWD,'kernel-package-overlay'),
+ SOURCE_BUILD
]
os.environ.update({'DIST': '%s' %(dist)})
help='Set the overlay-dir for make-kpkg Default: %default'
)
+ parser.add_option(
+ '--source_only',
+ dest='source_only',
+ default=False,
+ help='If set, only build source packages. Default: %default'
+ )
+
return parser.parse_args()
def git_clone_remote_repository(url, destination):
OVERLAY_DIR = options.overlay_dir or '/usr/share/kernel-package'
+ if options.source_only:
+ logger.info('Lets build only sources')
+
# add current dir to python search path
cmd_folder = os.path.join(os.path.abspath(OVERLAY_DIR), '..')
sys.path.insert(0, cmd_folder)