summaryrefslogtreecommitdiff
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
committerSaul Wold <sgw@linux.intel.com>2012-08-28 08:03:40 -0700
commit036a2502689092bb278b929f6e8ef2a119c1cf35 (patch)
treeaa606e054a82b8050df1dacdef03f0b5ca80fba2 /meta/classes/package_rpm.bbclass
parentac152f277fdff256def01af4268215a05685a0f7 (diff)
downloadopenembedded-core-036a2502689092bb278b929f6e8ef2a119c1cf35.tar.gz
openembedded-core-036a2502689092bb278b929f6e8ef2a119c1cf35.tar.bz2
openembedded-core-036a2502689092bb278b929f6e8ef2a119c1cf35.zip
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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 () {
# append information for logs and patches to %prep
def add_prep(d,spec_files_bottom):
- if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
+ if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
spec_files_bottom.append('%%prep -n %s' % d.getVar('PN', True) )
spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"")
spec_files_bottom.append('')
# get the name of tarball for sources, patches and logs
def get_tarballs(d):
- if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
+ if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
return get_package(d)
# append the name of tarball to key word 'SOURCE' in xxx.spec.
def tail_source(d,source_list=[],patch_list=None):
- if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
+ if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
source_number = 0
patch_number = 0
workdir = d.getVar('WORKDIR', True)
@@ -1020,7 +1020,7 @@ python write_specfile () {
python do_package_rpm () {
def creat_srpm_dir(d):
- if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
+ if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
clean_licenses = get_licenses(d)
pkgwritesrpmdir = bb.data.expand('${PKGWRITEDIRSRPM}/${PACKAGE_ARCH_EXTEND}', d)
pkgwritesrpmdir = pkgwritesrpmdir + '/' + clean_licenses
@@ -1147,14 +1147,14 @@ python do_package_rpm () {
cmd = cmd + " --define 'debug_package %{nil}'"
cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " --define '_tmppath " + workdir + "'"
- if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
+ if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
cmd = cmd + " --define '_sourcedir " + workdir + "'"
cmdsrpm = cmd + " --define '_srcrpmdir " + creat_srpm_dir(d) + "'"
cmdsrpm = cmdsrpm + " -bs " + outspecfile
cmd = cmd + " -bb " + outspecfile
# Build the source rpm package !
- if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
+ if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) == 'srpm':
d.setVar('SBUILDSPEC', cmdsrpm + "\n")
d.setVarFlag('SBUILDSPEC', 'func', '1')
bb.build.exec_func('SBUILDSPEC', d)