mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
package_rpm: remove support for DIRFILES
This was added here: https://git.yoctoproject.org/poky/commit/?id=2f42ef8d8fb1febf28252b98884cebabc931f720 It's undocumented, untested, rpm-specific, and currently broken, and to begin with looks like a workaround for Tizen/smack security label conflicts elsewhere. (From OE-Core rev: ea8af19bb909c7e3633d82bec9d925c8f42ec860) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
148e0c87cc
commit
f7f4d9d5c0
@@ -191,7 +191,7 @@ python write_specfile () {
|
|||||||
if not len(depends_dict[dep]):
|
if not len(depends_dict[dep]):
|
||||||
array.append("%s: %s" % (tag, dep))
|
array.append("%s: %s" % (tag, dep))
|
||||||
|
|
||||||
def walk_files(walkpath, target, conffiles, dirfiles):
|
def walk_files(walkpath, target, conffiles):
|
||||||
# We can race against the ipk/deb backends which create CONTROL or DEBIAN directories
|
# We can race against the ipk/deb backends which create CONTROL or DEBIAN directories
|
||||||
# when packaging. We just ignore these files which are created in
|
# when packaging. We just ignore these files which are created in
|
||||||
# packages-split/ and not package/
|
# packages-split/ and not package/
|
||||||
@@ -233,22 +233,12 @@ python write_specfile () {
|
|||||||
return False
|
return False
|
||||||
dirs[:] = [dir for dir in dirs if not move_to_files(dir)]
|
dirs[:] = [dir for dir in dirs if not move_to_files(dir)]
|
||||||
|
|
||||||
# Directory handling can happen in two ways, either DIRFILES is not set at all
|
for dir in dirs:
|
||||||
# in which case we fall back to the older behaviour of packages owning all their
|
if dir == "CONTROL" or dir == "DEBIAN":
|
||||||
# directories
|
continue
|
||||||
if dirfiles is None:
|
p = path + '/' + dir
|
||||||
for dir in dirs:
|
# All packages own the directories their files are in...
|
||||||
if dir == "CONTROL" or dir == "DEBIAN":
|
target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"')
|
||||||
continue
|
|
||||||
p = path + '/' + dir
|
|
||||||
# All packages own the directories their files are in...
|
|
||||||
target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"')
|
|
||||||
elif path:
|
|
||||||
# packages own only empty directories or explict directory.
|
|
||||||
# This will prevent the overlapping of security permission.
|
|
||||||
attr = get_attr(path)
|
|
||||||
if (not files and not dirs) or path in dirfiles:
|
|
||||||
target.append(attr + '%dir "' + escape_chars(path) + '"')
|
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
if file == "CONTROL" or file == "DEBIAN":
|
if file == "CONTROL" or file == "DEBIAN":
|
||||||
@@ -363,9 +353,6 @@ python write_specfile () {
|
|||||||
localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg)
|
localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg)
|
||||||
|
|
||||||
conffiles = oe.package.get_conffiles(pkg, d)
|
conffiles = oe.package.get_conffiles(pkg, d)
|
||||||
dirfiles = localdata.getVar('DIRFILES')
|
|
||||||
if dirfiles is not None:
|
|
||||||
dirfiles = dirfiles.split()
|
|
||||||
|
|
||||||
splitname = pkgname
|
splitname = pkgname
|
||||||
|
|
||||||
@@ -430,7 +417,7 @@ python write_specfile () {
|
|||||||
srcrpostrm = splitrpostrm
|
srcrpostrm = splitrpostrm
|
||||||
|
|
||||||
file_list = []
|
file_list = []
|
||||||
walk_files(root, file_list, conffiles, dirfiles)
|
walk_files(root, file_list, conffiles)
|
||||||
if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
|
if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
|
||||||
bb.note("Not creating empty RPM package for %s" % splitname)
|
bb.note("Not creating empty RPM package for %s" % splitname)
|
||||||
else:
|
else:
|
||||||
@@ -522,7 +509,7 @@ python write_specfile () {
|
|||||||
|
|
||||||
# Now process files
|
# Now process files
|
||||||
file_list = []
|
file_list = []
|
||||||
walk_files(root, file_list, conffiles, dirfiles)
|
walk_files(root, file_list, conffiles)
|
||||||
if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
|
if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
|
||||||
bb.note("Not creating empty RPM package for %s" % splitname)
|
bb.note("Not creating empty RPM package for %s" % splitname)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user