Skip to content

Commit

Permalink
Merge pull request #156 from cms-sw/smuzaffar-patch-1
Browse files Browse the repository at this point in the history
fixes for installing from ref repo
  • Loading branch information
smuzaffar authored Feb 14, 2020
2 parents f35f0ac + 56335fb commit ae9deb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmsBuild
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def install_reference(pkg):
args = {"cmsroot": pkg.options.workDir, "refroot": pkg.options.reference, "cmsplatf": pkg.options.architecture}
args['pkgdir'] = join(pkg.options.architecture, *pkg_parts)
tmp_path = join(pkg.options.tempdir, "reference", pkg.pkgName())
makedirs(tmp_path)
makedirs(join(tmp_path,"BUILDROOT"))
tmp_spec = join(tmp_path, "package.spec")
spec = open(tmp_spec, "w")
infoReg = re.compile("^(Name|Version|Release|Group|License|Packager|Vendor|Summary)\s*:.*")
Expand All @@ -219,7 +219,7 @@ def install_reference(pkg):
spec.write("Prefix: %s\n" % pkg.options.installDir)
spec.write(REFERENCE_PACKAGE_POST % args)
spec.close()
command = "%s; rpmbuild -bb --define '_topdir %s' %s" % (rpmEnvironmentScript, tmp_path, tmp_spec)
command = "%s; rpmbuild -bb --buildroot %s/BUILDROOT --define '_topdir %s' %s" % (rpmEnvironmentScript, tmp_path, tmp_path, tmp_spec)
error, output = getstatusoutput(command)
if error:
log("Command:\n %(command)s failed with the following message: %(output)s" % locals(), DEBUG)
Expand Down

0 comments on commit ae9deb0

Please sign in to comment.