summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-08-23 23:13:25 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-29 16:02:08 -0700
commit436211f0525dbeab4d701a59093b6597ca72400c (patch)
tree170c80594bcd6ed8b626a2b48cb008e1eb620279 /meta/classes/package_rpm.bbclass
parent3883f82926adc973516a24f69f56f6c63eb66d37 (diff)
downloadpoky-436211f0525dbeab4d701a59093b6597ca72400c.tar.gz
archiver.bbclass: remove the "upper()" function
The configuration value from the conf file is lower case, e.g. srpm, tar, so there is no reason to use the upper case which makes things complicated. [YOCTO #2619] (From OE-Core rev: 036a2502689092bb278b929f6e8ef2a119c1cf35) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b999c28a9b..d44ab4c693 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -570,19 +570,19 @@ python write_specfile () {
570 570
571 # append information for logs and patches to %prep 571 # append information for logs and patches to %prep
572 def add_prep(d,spec_files_bottom): 572 def add_prep(d,spec_files_bottom):
573 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 573 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
574 spec_files_bottom.append('%%prep -n %s' % d.getVar('PN', True) ) 574 spec_files_bottom.append('%%prep -n %s' % d.getVar('PN', True) )
575 spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"") 575 spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"")
576 spec_files_bottom.append('') 576 spec_files_bottom.append('')
577 577
578 # get the name of tarball for sources, patches and logs 578 # get the name of tarball for sources, patches and logs
579 def get_tarballs(d): 579 def get_tarballs(d):
580 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 580 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
581 return get_package(d) 581 return get_package(d)
582 582
583 # append the name of tarball to key word 'SOURCE' in xxx.spec. 583 # append the name of tarball to key word 'SOURCE' in xxx.spec.
584 def tail_source(d,source_list=[],patch_list=None): 584 def tail_source(d,source_list=[],patch_list=None):
585 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 585 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
586 source_number = 0 586 source_number = 0
587 patch_number = 0 587 patch_number = 0
588 workdir = d.getVar('WORKDIR', True) 588 workdir = d.getVar('WORKDIR', True)
@@ -1020,7 +1020,7 @@ python write_specfile () {
1020 1020
1021python do_package_rpm () { 1021python do_package_rpm () {
1022 def creat_srpm_dir(d): 1022 def creat_srpm_dir(d):
1023 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 1023 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
1024 clean_licenses = get_licenses(d) 1024 clean_licenses = get_licenses(d)
1025 pkgwritesrpmdir = bb.data.expand('${PKGWRITEDIRSRPM}/${PACKAGE_ARCH_EXTEND}', d) 1025 pkgwritesrpmdir = bb.data.expand('${PKGWRITEDIRSRPM}/${PACKAGE_ARCH_EXTEND}', d)
1026 pkgwritesrpmdir = pkgwritesrpmdir + '/' + clean_licenses 1026 pkgwritesrpmdir = pkgwritesrpmdir + '/' + clean_licenses
@@ -1147,14 +1147,14 @@ python do_package_rpm () {
1147 cmd = cmd + " --define 'debug_package %{nil}'" 1147 cmd = cmd + " --define 'debug_package %{nil}'"
1148 cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'" 1148 cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
1149 cmd = cmd + " --define '_tmppath " + workdir + "'" 1149 cmd = cmd + " --define '_tmppath " + workdir + "'"
1150 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 1150 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
1151 cmd = cmd + " --define '_sourcedir " + workdir + "'" 1151 cmd = cmd + " --define '_sourcedir " + workdir + "'"
1152 cmdsrpm = cmd + " --define '_srcrpmdir " + creat_srpm_dir(d) + "'" 1152 cmdsrpm = cmd + " --define '_srcrpmdir " + creat_srpm_dir(d) + "'"
1153 cmdsrpm = cmdsrpm + " -bs " + outspecfile 1153 cmdsrpm = cmdsrpm + " -bs " + outspecfile
1154 cmd = cmd + " -bb " + outspecfile 1154 cmd = cmd + " -bb " + outspecfile
1155 1155
1156 # Build the source rpm package ! 1156 # Build the source rpm package !
1157 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 1157 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
1158 d.setVar('SBUILDSPEC', cmdsrpm + "\n") 1158 d.setVar('SBUILDSPEC', cmdsrpm + "\n")
1159 d.setVarFlag('SBUILDSPEC', 'func', '1') 1159 d.setVarFlag('SBUILDSPEC', 'func', '1')
1160 bb.build.exec_func('SBUILDSPEC', d) 1160 bb.build.exec_func('SBUILDSPEC', d)