summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass136
1 files changed, 68 insertions, 68 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index c431545f7c..722c62877a 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -13,9 +13,9 @@ MERGEPERFILEDEPS = "1"
13 13
14# Construct per file dependencies file 14# Construct per file dependencies file
15def write_rpm_perfiledata(srcname, d): 15def write_rpm_perfiledata(srcname, d):
16 workdir = d.getVar('WORKDIR', True) 16 workdir = d.getVar('WORKDIR')
17 packages = d.getVar('PACKAGES', True) 17 packages = d.getVar('PACKAGES')
18 pkgd = d.getVar('PKGD', True) 18 pkgd = d.getVar('PKGD')
19 19
20 def dump_filerdeps(varname, outfile, d): 20 def dump_filerdeps(varname, outfile, d):
21 outfile.write("#!/usr/bin/env python\n\n") 21 outfile.write("#!/usr/bin/env python\n\n")
@@ -23,10 +23,10 @@ def write_rpm_perfiledata(srcname, d):
23 outfile.write('deps = {\n') 23 outfile.write('deps = {\n')
24 for pkg in packages.split(): 24 for pkg in packages.split():
25 dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg 25 dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
26 dependsflist = (d.getVar(dependsflist_key, True) or "") 26 dependsflist = (d.getVar(dependsflist_key) or "")
27 for dfile in dependsflist.split(): 27 for dfile in dependsflist.split():
28 key = "FILE" + varname + "_" + dfile + "_" + pkg 28 key = "FILE" + varname + "_" + dfile + "_" + pkg
29 depends_dict = bb.utils.explode_dep_versions(d.getVar(key, True) or "") 29 depends_dict = bb.utils.explode_dep_versions(d.getVar(key) or "")
30 file = dfile.replace("@underscore@", "_") 30 file = dfile.replace("@underscore@", "_")
31 file = file.replace("@closebrace@", "]") 31 file = file.replace("@closebrace@", "]")
32 file = file.replace("@openbrace@", "[") 32 file = file.replace("@openbrace@", "[")
@@ -87,14 +87,14 @@ python write_specfile () {
87 # append information for logs and patches to %prep 87 # append information for logs and patches to %prep
88 def add_prep(d,spec_files_bottom): 88 def add_prep(d,spec_files_bottom):
89 if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d): 89 if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d):
90 spec_files_bottom.append('%%prep -n %s' % d.getVar('PN', True) ) 90 spec_files_bottom.append('%%prep -n %s' % d.getVar('PN') )
91 spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"") 91 spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"")
92 spec_files_bottom.append('') 92 spec_files_bottom.append('')
93 93
94 # append the name of tarball to key word 'SOURCE' in xxx.spec. 94 # append the name of tarball to key word 'SOURCE' in xxx.spec.
95 def tail_source(d): 95 def tail_source(d):
96 if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d): 96 if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d):
97 ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) 97 ar_outdir = d.getVar('ARCHIVER_OUTDIR')
98 if not os.path.exists(ar_outdir): 98 if not os.path.exists(ar_outdir):
99 return 99 return
100 source_list = os.listdir(ar_outdir) 100 source_list = os.listdir(ar_outdir)
@@ -110,7 +110,7 @@ python write_specfile () {
110 # We need a simple way to remove the MLPREFIX from the package name, 110 # We need a simple way to remove the MLPREFIX from the package name,
111 # and dependency information... 111 # and dependency information...
112 def strip_multilib(name, d): 112 def strip_multilib(name, d):
113 multilibs = d.getVar('MULTILIBS', True) or "" 113 multilibs = d.getVar('MULTILIBS') or ""
114 for ext in multilibs.split(): 114 for ext in multilibs.split():
115 eext = ext.split(':') 115 eext = ext.split(':')
116 if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0: 116 if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
@@ -124,7 +124,7 @@ python write_specfile () {
124 newdeps[strip_multilib(dep, d)] = depends[dep] 124 newdeps[strip_multilib(dep, d)] = depends[dep]
125 return bb.utils.join_deps(newdeps) 125 return bb.utils.join_deps(newdeps)
126 126
127# ml = d.getVar("MLPREFIX", True) 127# ml = d.getVar("MLPREFIX")
128# if ml and name and len(ml) != 0 and name.find(ml) == 0: 128# if ml and name and len(ml) != 0 and name.find(ml) == 0:
129# return ml.join(name.split(ml, 1)[1:]) 129# return ml.join(name.split(ml, 1)[1:])
130# return name 130# return name
@@ -144,7 +144,7 @@ python write_specfile () {
144 # after renaming we cannot look up the dependencies in the packagedata 144 # after renaming we cannot look up the dependencies in the packagedata
145 # store. 145 # store.
146 def translate_vers(varname, d): 146 def translate_vers(varname, d):
147 depends = d.getVar(varname, True) 147 depends = d.getVar(varname)
148 if depends: 148 if depends:
149 depends_dict = bb.utils.explode_dep_versions2(depends) 149 depends_dict = bb.utils.explode_dep_versions2(depends)
150 newdeps_dict = {} 150 newdeps_dict = {}
@@ -248,10 +248,10 @@ python write_specfile () {
248 def get_perfile(varname, pkg, d): 248 def get_perfile(varname, pkg, d):
249 deps = [] 249 deps = []
250 dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg 250 dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
251 dependsflist = (d.getVar(dependsflist_key, True) or "") 251 dependsflist = (d.getVar(dependsflist_key) or "")
252 for dfile in dependsflist.split(): 252 for dfile in dependsflist.split():
253 key = "FILE" + varname + "_" + dfile + "_" + pkg 253 key = "FILE" + varname + "_" + dfile + "_" + pkg
254 depends = d.getVar(key, True) 254 depends = d.getVar(key)
255 if depends: 255 if depends:
256 deps.append(depends) 256 deps.append(depends)
257 return " ".join(deps) 257 return " ".join(deps)
@@ -269,33 +269,33 @@ python write_specfile () {
269 else: 269 else:
270 spec_preamble.append('%s' % textwrap.fill(dedent_text, width=75)) 270 spec_preamble.append('%s' % textwrap.fill(dedent_text, width=75))
271 271
272 packages = d.getVar('PACKAGES', True) 272 packages = d.getVar('PACKAGES')
273 if not packages or packages == '': 273 if not packages or packages == '':
274 bb.debug(1, "No packages; nothing to do") 274 bb.debug(1, "No packages; nothing to do")
275 return 275 return
276 276
277 pkgdest = d.getVar('PKGDEST', True) 277 pkgdest = d.getVar('PKGDEST')
278 if not pkgdest: 278 if not pkgdest:
279 bb.fatal("No PKGDEST") 279 bb.fatal("No PKGDEST")
280 280
281 outspecfile = d.getVar('OUTSPECFILE', True) 281 outspecfile = d.getVar('OUTSPECFILE')
282 if not outspecfile: 282 if not outspecfile:
283 bb.fatal("No OUTSPECFILE") 283 bb.fatal("No OUTSPECFILE")
284 284
285 # Construct the SPEC file... 285 # Construct the SPEC file...
286 srcname = strip_multilib(d.getVar('PN', True), d) 286 srcname = strip_multilib(d.getVar('PN'), d)
287 srcsummary = (d.getVar('SUMMARY', True) or d.getVar('DESCRIPTION', True) or ".") 287 srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
288 srcversion = d.getVar('PKGV', True).replace('-', '+') 288 srcversion = d.getVar('PKGV').replace('-', '+')
289 srcrelease = d.getVar('PKGR', True) 289 srcrelease = d.getVar('PKGR')
290 srcepoch = (d.getVar('PKGE', True) or "") 290 srcepoch = (d.getVar('PKGE') or "")
291 srclicense = d.getVar('LICENSE', True) 291 srclicense = d.getVar('LICENSE')
292 srcsection = d.getVar('SECTION', True) 292 srcsection = d.getVar('SECTION')
293 srcmaintainer = d.getVar('MAINTAINER', True) 293 srcmaintainer = d.getVar('MAINTAINER')
294 srchomepage = d.getVar('HOMEPAGE', True) 294 srchomepage = d.getVar('HOMEPAGE')
295 srcdescription = d.getVar('DESCRIPTION', True) or "." 295 srcdescription = d.getVar('DESCRIPTION') or "."
296 srccustomtagschunk = get_package_additional_metadata("rpm", d) 296 srccustomtagschunk = get_package_additional_metadata("rpm", d)
297 297
298 srcdepends = strip_multilib_deps(d.getVar('DEPENDS', True), d) 298 srcdepends = strip_multilib_deps(d.getVar('DEPENDS'), d)
299 srcrdepends = [] 299 srcrdepends = []
300 srcrrecommends = [] 300 srcrrecommends = []
301 srcrsuggests = [] 301 srcrsuggests = []
@@ -318,8 +318,8 @@ python write_specfile () {
318 spec_files_top = [] 318 spec_files_top = []
319 spec_files_bottom = [] 319 spec_files_bottom = []
320 320
321 perfiledeps = (d.getVar("MERGEPERFILEDEPS", True) or "0") == "0" 321 perfiledeps = (d.getVar("MERGEPERFILEDEPS") or "0") == "0"
322 extra_pkgdata = (d.getVar("RPM_EXTRA_PKGDATA", True) or "0") == "1" 322 extra_pkgdata = (d.getVar("RPM_EXTRA_PKGDATA") or "0") == "1"
323 323
324 for pkg in packages.split(): 324 for pkg in packages.split():
325 localdata = bb.data.createCopy(d) 325 localdata = bb.data.createCopy(d)
@@ -328,7 +328,7 @@ python write_specfile () {
328 328
329 localdata.setVar('ROOT', '') 329 localdata.setVar('ROOT', '')
330 localdata.setVar('ROOT_%s' % pkg, root) 330 localdata.setVar('ROOT_%s' % pkg, root)
331 pkgname = localdata.getVar('PKG_%s' % pkg, True) 331 pkgname = localdata.getVar('PKG_%s' % pkg)
332 if not pkgname: 332 if not pkgname:
333 pkgname = pkg 333 pkgname = pkg
334 localdata.setVar('PKG', pkgname) 334 localdata.setVar('PKG', pkgname)
@@ -338,19 +338,19 @@ python write_specfile () {
338 bb.data.update_data(localdata) 338 bb.data.update_data(localdata)
339 339
340 conffiles = get_conffiles(pkg, d) 340 conffiles = get_conffiles(pkg, d)
341 dirfiles = localdata.getVar('DIRFILES', True) 341 dirfiles = localdata.getVar('DIRFILES')
342 if dirfiles is not None: 342 if dirfiles is not None:
343 dirfiles = dirfiles.split() 343 dirfiles = dirfiles.split()
344 344
345 splitname = strip_multilib(pkgname, d) 345 splitname = strip_multilib(pkgname, d)
346 346
347 splitsummary = (localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or ".") 347 splitsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
348 splitversion = (localdata.getVar('PKGV', True) or "").replace('-', '+') 348 splitversion = (localdata.getVar('PKGV') or "").replace('-', '+')
349 splitrelease = (localdata.getVar('PKGR', True) or "") 349 splitrelease = (localdata.getVar('PKGR') or "")
350 splitepoch = (localdata.getVar('PKGE', True) or "") 350 splitepoch = (localdata.getVar('PKGE') or "")
351 splitlicense = (localdata.getVar('LICENSE', True) or "") 351 splitlicense = (localdata.getVar('LICENSE') or "")
352 splitsection = (localdata.getVar('SECTION', True) or "") 352 splitsection = (localdata.getVar('SECTION') or "")
353 splitdescription = (localdata.getVar('DESCRIPTION', True) or ".") 353 splitdescription = (localdata.getVar('DESCRIPTION') or ".")
354 splitcustomtagschunk = get_package_additional_metadata("rpm", localdata) 354 splitcustomtagschunk = get_package_additional_metadata("rpm", localdata)
355 355
356 translate_vers('RDEPENDS', localdata) 356 translate_vers('RDEPENDS', localdata)
@@ -363,18 +363,18 @@ python write_specfile () {
363 # Map the dependencies into their final form 363 # Map the dependencies into their final form
364 mapping_rename_hook(localdata) 364 mapping_rename_hook(localdata)
365 365
366 splitrdepends = strip_multilib_deps(localdata.getVar('RDEPENDS', True), d) 366 splitrdepends = strip_multilib_deps(localdata.getVar('RDEPENDS'), d)
367 splitrrecommends = strip_multilib_deps(localdata.getVar('RRECOMMENDS', True), d) 367 splitrrecommends = strip_multilib_deps(localdata.getVar('RRECOMMENDS'), d)
368 splitrsuggests = strip_multilib_deps(localdata.getVar('RSUGGESTS', True), d) 368 splitrsuggests = strip_multilib_deps(localdata.getVar('RSUGGESTS'), d)
369 splitrprovides = strip_multilib_deps(localdata.getVar('RPROVIDES', True), d) 369 splitrprovides = strip_multilib_deps(localdata.getVar('RPROVIDES'), d)
370 splitrreplaces = strip_multilib_deps(localdata.getVar('RREPLACES', True), d) 370 splitrreplaces = strip_multilib_deps(localdata.getVar('RREPLACES'), d)
371 splitrconflicts = strip_multilib_deps(localdata.getVar('RCONFLICTS', True), d) 371 splitrconflicts = strip_multilib_deps(localdata.getVar('RCONFLICTS'), d)
372 splitrobsoletes = [] 372 splitrobsoletes = []
373 373
374 splitrpreinst = localdata.getVar('pkg_preinst', True) 374 splitrpreinst = localdata.getVar('pkg_preinst')
375 splitrpostinst = localdata.getVar('pkg_postinst', True) 375 splitrpostinst = localdata.getVar('pkg_postinst')
376 splitrprerm = localdata.getVar('pkg_prerm', True) 376 splitrprerm = localdata.getVar('pkg_prerm')
377 splitrpostrm = localdata.getVar('pkg_postrm', True) 377 splitrpostrm = localdata.getVar('pkg_postrm')
378 378
379 379
380 if not perfiledeps: 380 if not perfiledeps:
@@ -621,7 +621,7 @@ python write_specfile () {
621 621
622 # RPMSPEC_PREAMBLE is a way to add arbitrary text to the top 622 # RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
623 # of the generated spec file 623 # of the generated spec file
624 external_preamble = d.getVar("RPMSPEC_PREAMBLE", True) 624 external_preamble = d.getVar("RPMSPEC_PREAMBLE")
625 if external_preamble: 625 if external_preamble:
626 specfile.write(external_preamble + "\n") 626 specfile.write(external_preamble + "\n")
627 627
@@ -652,20 +652,20 @@ python do_package_rpm () {
652 # We need a simple way to remove the MLPREFIX from the package name, 652 # We need a simple way to remove the MLPREFIX from the package name,
653 # and dependency information... 653 # and dependency information...
654 def strip_multilib(name, d): 654 def strip_multilib(name, d):
655 ml = d.getVar("MLPREFIX", True) 655 ml = d.getVar("MLPREFIX")
656 if ml and name and len(ml) != 0 and name.find(ml) >= 0: 656 if ml and name and len(ml) != 0 and name.find(ml) >= 0:
657 return "".join(name.split(ml)) 657 return "".join(name.split(ml))
658 return name 658 return name
659 659
660 workdir = d.getVar('WORKDIR', True) 660 workdir = d.getVar('WORKDIR')
661 tmpdir = d.getVar('TMPDIR', True) 661 tmpdir = d.getVar('TMPDIR')
662 pkgd = d.getVar('PKGD', True) 662 pkgd = d.getVar('PKGD')
663 pkgdest = d.getVar('PKGDEST', True) 663 pkgdest = d.getVar('PKGDEST')
664 if not workdir or not pkgd or not tmpdir: 664 if not workdir or not pkgd or not tmpdir:
665 bb.error("Variables incorrectly set, unable to package") 665 bb.error("Variables incorrectly set, unable to package")
666 return 666 return
667 667
668 packages = d.getVar('PACKAGES', True) 668 packages = d.getVar('PACKAGES')
669 if not packages or packages == '': 669 if not packages or packages == '':
670 bb.debug(1, "No packages; nothing to do") 670 bb.debug(1, "No packages; nothing to do")
671 return 671 return
@@ -674,31 +674,31 @@ python do_package_rpm () {
674 # If the spec file already exist, and has not been stored into 674 # If the spec file already exist, and has not been stored into
675 # pseudo's files.db, it maybe cause rpmbuild src.rpm fail, 675 # pseudo's files.db, it maybe cause rpmbuild src.rpm fail,
676 # so remove it before doing rpmbuild src.rpm. 676 # so remove it before doing rpmbuild src.rpm.
677 srcname = strip_multilib(d.getVar('PN', True), d) 677 srcname = strip_multilib(d.getVar('PN'), d)
678 outspecfile = workdir + "/" + srcname + ".spec" 678 outspecfile = workdir + "/" + srcname + ".spec"
679 if os.path.isfile(outspecfile): 679 if os.path.isfile(outspecfile):
680 os.remove(outspecfile) 680 os.remove(outspecfile)
681 d.setVar('OUTSPECFILE', outspecfile) 681 d.setVar('OUTSPECFILE', outspecfile)
682 bb.build.exec_func('write_specfile', d) 682 bb.build.exec_func('write_specfile', d)
683 683
684 perfiledeps = (d.getVar("MERGEPERFILEDEPS", True) or "0") == "0" 684 perfiledeps = (d.getVar("MERGEPERFILEDEPS") or "0") == "0"
685 if perfiledeps: 685 if perfiledeps:
686 outdepends, outprovides = write_rpm_perfiledata(srcname, d) 686 outdepends, outprovides = write_rpm_perfiledata(srcname, d)
687 687
688 # Setup the rpmbuild arguments... 688 # Setup the rpmbuild arguments...
689 rpmbuild = d.getVar('RPMBUILD', True) 689 rpmbuild = d.getVar('RPMBUILD')
690 targetsys = d.getVar('TARGET_SYS', True) 690 targetsys = d.getVar('TARGET_SYS')
691 targetvendor = d.getVar('HOST_VENDOR', True) 691 targetvendor = d.getVar('HOST_VENDOR')
692 package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") 692 package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_")
693 sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX', True) or "nativesdk").replace("-", "_") 693 sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX') or "nativesdk").replace("-", "_")
694 if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix): 694 if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix):
695 ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") 695 ml_prefix = (d.getVar('MLPREFIX') or "").replace("-", "_")
696 d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch) 696 d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
697 else: 697 else:
698 d.setVar('PACKAGE_ARCH_EXTEND', package_arch) 698 d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
699 pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}') 699 pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
700 d.setVar('RPM_PKGWRITEDIR', pkgwritedir) 700 d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
701 bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR', True)) 701 bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
702 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}') 702 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
703 magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc') 703 magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
704 bb.utils.mkdirhier(pkgwritedir) 704 bb.utils.mkdirhier(pkgwritedir)
@@ -707,7 +707,7 @@ python do_package_rpm () {
707 cmd = rpmbuild 707 cmd = rpmbuild
708 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd 708 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
709 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" 709 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
710 cmd = cmd + " --define '_builddir " + d.getVar('S', True) + "'" 710 cmd = cmd + " --define '_builddir " + d.getVar('S') + "'"
711 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" 711 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
712 cmd = cmd + " --define '_use_internal_dependency_generator 0'" 712 cmd = cmd + " --define '_use_internal_dependency_generator 0'"
713 if perfiledeps: 713 if perfiledeps:
@@ -721,8 +721,8 @@ python do_package_rpm () {
721 cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'" 721 cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
722 cmd = cmd + " --define '_tmppath " + workdir + "'" 722 cmd = cmd + " --define '_tmppath " + workdir + "'"
723 if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d): 723 if d.getVarFlag('ARCHIVER_MODE', 'srpm', True) == '1' and bb.data.inherits_class('archiver', d):
724 cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR', True) + "'" 724 cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + "'"
725 cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_OUTDIR', True) + "'" 725 cmdsrpm = cmd + " --define '_srcrpmdir " + d.getVar('ARCHIVER_OUTDIR') + "'"
726 cmdsrpm = cmdsrpm + " -bs " + outspecfile 726 cmdsrpm = cmdsrpm + " -bs " + outspecfile
727 # Build the .src.rpm 727 # Build the .src.rpm
728 d.setVar('SBUILDSPEC', cmdsrpm + "\n") 728 d.setVar('SBUILDSPEC', cmdsrpm + "\n")
@@ -735,12 +735,12 @@ python do_package_rpm () {
735 d.setVarFlag('BUILDSPEC', 'func', '1') 735 d.setVarFlag('BUILDSPEC', 'func', '1')
736 bb.build.exec_func('BUILDSPEC', d) 736 bb.build.exec_func('BUILDSPEC', d)
737 737
738 if d.getVar('RPM_SIGN_PACKAGES', True) == '1': 738 if d.getVar('RPM_SIGN_PACKAGES') == '1':
739 bb.build.exec_func("sign_rpm", d) 739 bb.build.exec_func("sign_rpm", d)
740} 740}
741 741
742python () { 742python () {
743 if d.getVar('PACKAGES', True) != '': 743 if d.getVar('PACKAGES') != '':
744 deps = ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot' 744 deps = ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
745 d.appendVarFlag('do_package_write_rpm', 'depends', deps) 745 d.appendVarFlag('do_package_write_rpm', 'depends', deps)
746 d.setVarFlag('do_package_write_rpm', 'fakeroot', '1') 746 d.setVarFlag('do_package_write_rpm', 'fakeroot', '1')