diff options
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 12 |
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 | ||
1021 | python do_package_rpm () { | 1021 | python 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) |