Running oelint-adv with the --fix option on recipes that contain require *.inc inserts/moves empty lines in an unpredictable way.
Steps to reproduce bug:
Create a recipe that requires an *.inc file and introduce some error so that fix is executed on the file (I modified rubygems-activemodel as an example):
require rubygems-base.inc
SPDX-License-Identifier: MIT
SUMMARY = "RubyGem: activemodel"
DESCRIPTION = "A toolkit for building modeling frameworks like Active Record"
HOMEPAGE = "https://rubyonrails.org"
Notice that the whitespace is correctly removed, but that 2 consecutive empty lines surround `GEM_NAME`. This violates the style rules. The empty lines between the `inherit` statements and variables below are removed.
This can get even worse; Some recipes look like this after the fix:
Running
oelint-adv
with the--fix
option on recipes that containrequire *.inc
inserts/moves empty lines in an unpredictable way.Steps to reproduce bug:
*.inc file
and introduce some error so thatfix
is executed on the file (I modifiedrubygems-activemodel
as an example):SPDX-License-Identifier: MIT
SUMMARY = "RubyGem: activemodel" DESCRIPTION = "A toolkit for building modeling frameworks like Active Record" HOMEPAGE = "https://rubyonrails.org"
LICENSE = "MIT" LIC_FILES_CHKSUM = "file://MIT-LICENSE;md5=48dbb03e765669b2a017264a9ecc9674"
EXTRA_DEPENDS:append = " " EXTRA_RDEPENDS:append = " "
DEPENDS:class-native += "\ rubygems-activesupport-native \ "
GEM_INSTALL_FLAGS:append = " "
SRC_URI[md5sum] = "2aa69c3c00d4e3fdd3137f00e11d656e" SRC_URI[sha256sum] = "f4c838ea76dfca8967e433ac89603342ae20b65dd61366e62f07120a08e1ad72"
GEM_NAME = "activemodel"
inherit rubygems inherit rubygentest inherit pkgconfig
RDEPENDS:${PN}:class-target += "\ rubygems-activesupport \ "
BBCLASSEXTEND = "native"
SOMEVAR="Foo"
require rubygems-base.inc
SUMMARY = "RubyGem: activemodel"
SPDX-License-Identifier: MIT
DESCRIPTION = "A toolkit for building modeling frameworks like Active Record" HOMEPAGE = "https://rubyonrails.org"
LICENSE = "MIT" LIC_FILES_CHKSUM = "file://MIT-LICENSE;md5=48dbb03e765669b2a017264a9ecc9674"
EXTRA_DEPENDS:append = " " EXTRA_RDEPENDS:append = " "
DEPENDS:class-native += "\ rubygems-activesupport-native \ "
GEM_INSTALL_FLAGS:append = " "
SRC_URI[md5sum] = "2aa69c3c00d4e3fdd3137f00e11d656e" SRC_URI[sha256sum] = "f4c838ea76dfca8967e433ac89603342ae20b65dd61366e62f07120a08e1ad72"
GEM_NAME = "activemodel"
inherit rubygems inherit rubygentest inherit pkgconfig RDEPENDS:${PN}:class-target += "\ rubygems-activesupport \ " BBCLASSEXTEND = "native"
require.inc
SUMMARY = "Foo" IMAGE_INSTALL:append = " ..." (...)