diff options
Diffstat (limited to 'meta/classes-global/package_rpm.bbclass')
-rw-r--r-- | meta/classes-global/package_rpm.bbclass | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass index 2e3e4e8c79..790ccbfaf0 100644 --- a/meta/classes-global/package_rpm.bbclass +++ b/meta/classes-global/package_rpm.bbclass | |||
@@ -191,7 +191,7 @@ python write_specfile () { | |||
191 | if not len(depends_dict[dep]): | 191 | if not len(depends_dict[dep]): |
192 | array.append("%s: %s" % (tag, dep)) | 192 | array.append("%s: %s" % (tag, dep)) |
193 | 193 | ||
194 | def walk_files(walkpath, target, conffiles, dirfiles): | 194 | def walk_files(walkpath, target, conffiles): |
195 | # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories | 195 | # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories |
196 | # when packaging. We just ignore these files which are created in | 196 | # when packaging. We just ignore these files which are created in |
197 | # packages-split/ and not package/ | 197 | # packages-split/ and not package/ |
@@ -233,22 +233,12 @@ python write_specfile () { | |||
233 | return False | 233 | return False |
234 | dirs[:] = [dir for dir in dirs if not move_to_files(dir)] | 234 | dirs[:] = [dir for dir in dirs if not move_to_files(dir)] |
235 | 235 | ||
236 | # Directory handling can happen in two ways, either DIRFILES is not set at all | 236 | for dir in dirs: |
237 | # in which case we fall back to the older behaviour of packages owning all their | 237 | if dir == "CONTROL" or dir == "DEBIAN": |
238 | # directories | 238 | continue |
239 | if dirfiles is None: | 239 | p = path + '/' + dir |
240 | for dir in dirs: | 240 | # All packages own the directories their files are in... |
241 | if dir == "CONTROL" or dir == "DEBIAN": | 241 | target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"') |
242 | continue | ||
243 | p = path + '/' + dir | ||
244 | # All packages own the directories their files are in... | ||
245 | target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"') | ||
246 | elif path: | ||
247 | # packages own only empty directories or explict directory. | ||
248 | # This will prevent the overlapping of security permission. | ||
249 | attr = get_attr(path) | ||
250 | if (not files and not dirs) or path in dirfiles: | ||
251 | target.append(attr + '%dir "' + escape_chars(path) + '"') | ||
252 | 242 | ||
253 | for file in files: | 243 | for file in files: |
254 | if file == "CONTROL" or file == "DEBIAN": | 244 | if file == "CONTROL" or file == "DEBIAN": |
@@ -363,9 +353,6 @@ python write_specfile () { | |||
363 | localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg) | 353 | localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg) |
364 | 354 | ||
365 | conffiles = oe.package.get_conffiles(pkg, d) | 355 | conffiles = oe.package.get_conffiles(pkg, d) |
366 | dirfiles = localdata.getVar('DIRFILES') | ||
367 | if dirfiles is not None: | ||
368 | dirfiles = dirfiles.split() | ||
369 | 356 | ||
370 | splitname = pkgname | 357 | splitname = pkgname |
371 | 358 | ||
@@ -430,7 +417,7 @@ python write_specfile () { | |||
430 | srcrpostrm = splitrpostrm | 417 | srcrpostrm = splitrpostrm |
431 | 418 | ||
432 | file_list = [] | 419 | file_list = [] |
433 | walk_files(root, file_list, conffiles, dirfiles) | 420 | walk_files(root, file_list, conffiles) |
434 | if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": | 421 | if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": |
435 | bb.note("Not creating empty RPM package for %s" % splitname) | 422 | bb.note("Not creating empty RPM package for %s" % splitname) |
436 | else: | 423 | else: |
@@ -522,7 +509,7 @@ python write_specfile () { | |||
522 | 509 | ||
523 | # Now process files | 510 | # Now process files |
524 | file_list = [] | 511 | file_list = [] |
525 | walk_files(root, file_list, conffiles, dirfiles) | 512 | walk_files(root, file_list, conffiles) |
526 | if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": | 513 | if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": |
527 | bb.note("Not creating empty RPM package for %s" % splitname) | 514 | bb.note("Not creating empty RPM package for %s" % splitname) |
528 | else: | 515 | else: |