summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-21 14:18:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-22 09:05:39 +0000
commit0ccdfb116e41dcd1d86a259e7c993fc354fbc4e5 (patch)
treed543c1bcc5aafe458ce516a1204ba3916a103d24
parent2628a65ffe9cd80a18b49b7821018cf42c31a2d4 (diff)
downloadpoky-0ccdfb116e41dcd1d86a259e7c993fc354fbc4e5.tar.gz
package_rpm: Clean up pointless exception handling
The exception handling in this function seemed mildly crazy. Python will given perfectly good or in several cases better information if we let its standard traceback/exception handling happen. Remove the pointless code. (From OE-Core rev: 5ecdab6c2589a83bbbc522074052ff4438782102) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package_rpm.bbclass15
1 files changed, 3 insertions, 12 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index c978ec55d0..bde0453287 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -55,10 +55,7 @@ def write_rpm_perfiledata(srcname, d):
55 # OE-core dependencies a.k.a. RPM requires 55 # OE-core dependencies a.k.a. RPM requires
56 outdepends = workdir + "/" + srcname + ".requires" 56 outdepends = workdir + "/" + srcname + ".requires"
57 57
58 try: 58 dependsfile = open(outdepends, 'w')
59 dependsfile = open(outdepends, 'w')
60 except OSError:
61 bb.fatal("unable to open spec file for writing")
62 59
63 dump_filerdeps('RDEPENDS', dependsfile, d) 60 dump_filerdeps('RDEPENDS', dependsfile, d)
64 61
@@ -68,10 +65,7 @@ def write_rpm_perfiledata(srcname, d):
68 # OE-core / RPM Provides 65 # OE-core / RPM Provides
69 outprovides = workdir + "/" + srcname + ".provides" 66 outprovides = workdir + "/" + srcname + ".provides"
70 67
71 try: 68 providesfile = open(outprovides, 'w')
72 providesfile = open(outprovides, 'w')
73 except OSError:
74 bb.fatal("unable to open spec file for writing")
75 69
76 dump_filerdeps('RPROVIDES', providesfile, d) 70 dump_filerdeps('RPROVIDES', providesfile, d)
77 71
@@ -620,10 +614,7 @@ python write_specfile () {
620 spec_scriptlets_top.append('') 614 spec_scriptlets_top.append('')
621 615
622 # Write the SPEC file 616 # Write the SPEC file
623 try: 617 specfile = open(outspecfile, 'w')
624 specfile = open(outspecfile, 'w')
625 except OSError:
626 bb.fatal("unable to open spec file for writing")
627 618
628 # RPMSPEC_PREAMBLE is a way to add arbitrary text to the top 619 # RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
629 # of the generated spec file 620 # of the generated spec file