ftp.add(fname, "uploadinfo")
def build_srpm(r, b):
- if len(b.spec) == 0:
+ if len(b.spec) <= len('.spec'):
# should not really get here
util.append_to(b.logfile, "error: No .spec given but build src.rpm wanted")
return "FAIL"
status.push("building %s" % b.spec)
b.src_rpm = ""
- builder_opts = "-nu -nm --nodeps --http"
- if ("test-build" in r.flags) or b.branch and b.branch.startswith(config.tag_prefixes[0]):
- tag_test=""
+ builder_opts = "-nu -nm --nodeps --http --define \'_tld_builder 1\'"
+ if ("test-build" in r.flags):
+ tag_test=""
else:
- tag_test=" -Tp %s -tt" % (config.tag_prefixes[0],)
- cmd = ("cd rpm/packages; nice -n %s ./builder %s -bs %s -r %s %s %s %s 2>&1" %
+ tag_test=" -Tp %s -tt" % (config.tag_prefixes[0],)
+ cmd = ("cd rpm/packages; nice -n %s ./builder %s -bs %s -r %s %s %s %s %s 2>&1" %
(config.nice, builder_opts, b.bconds_string(), b.branch,
- tag_test, b.kernel_string(), b.spec))
+ tag_test, b.kernel_string(), b.defines_string(), b.spec))
util.append_to(b.logfile, "request from: %s" % r.requester)
util.append_to(b.logfile, "started at: %s" % time.asctime())
util.append_to(b.logfile, "building SRPM using: %s\n" % cmd)
if res == 0 and not "test-build" in r.flags:
for pref in config.tag_prefixes:
util.append_to(b.logfile, "Tagging with prefix: %s" % pref)
- res = chroot.run("cd rpm/packages; ./builder -r %s -Tp %s -Tv --pkgrev %s" % \
- (b.branch, pref, b.spec), logfile = b.logfile)
+ res = chroot.run("cd rpm/packages; ./builder -bs -r %s -Tp %s -Tv --pkgrev %s" % \
+ (b.bconds_string(), b.branch, pref, b.defines_string(), b.spec), logfile = b.logfile)
if res == 0:
transfer_file(r, b)