priv-kweihmann / oelint-adv

Advanced oelint
BSD 2-Clause "Simplified" License
54 stars 27 forks source link

oelint-adv does not print any messages #472

Closed skycaptain closed 8 months ago

skycaptain commented 8 months ago

I am experiencing a strange issue for which I am unable to identify the root cause. I am wondering why this is happening, but at the same time, the issue is so severe that it is unlikely to have gone unnoticed for such a long time, so it might be just on my machine.

I have installed the latest version of oelint-adv using pipx. When I run oelint-adv on any recipe, such as meta/recipes-core/base-files/base-files_3.0.14.bb from poky, I get the following output:

poky on  master with fish
$ oelint-adv meta/recipes-core/base-files/base-files_3.0.14.bb
Loaded rules:
    oelint.append.protvars
    oelint.append.protvars.LICENSE
    oelint.append.protvars.LIC_FILES_CHKSUM
    oelint.append.protvars.PR
    oelint.append.protvars.PV
    oelint.append.protvars.SRCREV
    oelint.file.inactiveupstreamdetails
    oelint.file.inappropriatemsg
    oelint.file.includenotfound
    oelint.file.includerelpath
    oelint.file.nospaces
    oelint.file.patchsignedoff
    oelint.file.requireinclude
    oelint.file.requirenotfound
    oelint.file.underscores
    oelint.file.upstreamstatus
    oelint.func.specific
    oelint.newline.consecutive
    oelint.newline.eof
    oelint.spaces.emptyline
    oelint.spaces.linebeginning
    oelint.spaces.linecont
    oelint.spaces.lineend
    oelint.tabs.notabs
    oelint.task.addnotaskbody
    oelint.task.customorder
    oelint.task.docstrings
    oelint.task.heredocs
    oelint.task.multifragments
    oelint.task.noanonpython
    oelint.task.nocopy
    oelint.task.nomkdir
    oelint.task.nopythonprefix
    oelint.task.order
    oelint.task.order.do_build
    oelint.task.order.do_compile
    oelint.task.order.do_configure
    oelint.task.order.do_fetch
    oelint.task.order.do_install
    oelint.task.order.do_package
    oelint.task.order.do_patch
    oelint.task.order.do_populate_sysroot
    oelint.task.order.do_unpack
    oelint.task.pythonprefix
    oelint.var.bbclassextend
    oelint.var.filesoverride
    oelint.var.improperinherit
    oelint.var.licenseremotefile
    oelint.var.mandatoryvar
    oelint.var.mandatoryvar.DESCRIPTION
    oelint.var.mandatoryvar.HOMEPAGE
    oelint.var.mandatoryvar.LICENSE
    oelint.var.mandatoryvar.SRC_URI
    oelint.var.mandatoryvar.SUMMARY
    oelint.var.multiinclude
    oelint.var.multiinherit
    oelint.var.nativefilename
    oelint.var.nativesdkfilename
    oelint.var.order
    oelint.var.order.AUTHOR
    oelint.var.order.BBCLASSEXTEND
    oelint.var.order.BUGTRACKER
    oelint.var.order.DEPENDS
    oelint.var.order.DESCRIPTION
    oelint.var.order.EXTRA_OECONF
    oelint.var.order.EXTRA_QMAKEVARS_POST
    oelint.var.order.FILES
    oelint.var.order.HOMEPAGE
    oelint.var.order.LICENSE
    oelint.var.order.LIC_FILES_CHKSUM
    oelint.var.order.PACKAGECONFIG
    oelint.var.order.PACKAGES
    oelint.var.order.PACKAGE_ARCH
    oelint.var.order.PROVIDES
    oelint.var.order.PV
    oelint.var.order.RCONFLICTS
    oelint.var.order.RDEPENDS
    oelint.var.order.RPROVIDES
    oelint.var.order.RRECOMMENDS
    oelint.var.order.RSUGGESTS
    oelint.var.order.S
    oelint.var.order.SECTION
    oelint.var.order.SRCREV
    oelint.var.order.SRC_URI
    oelint.var.order.SUMMARY
    oelint.var.order.inherit
    oelint.var.override
    oelint.var.rootfspostcmd
    oelint.var.srcuriwildcard
    oelint.var.suggestedvar
    oelint.var.suggestedvar.AUTHOR
    oelint.var.suggestedvar.BBCLASSEXTEND
    oelint.var.suggestedvar.BUGTRACKER
    oelint.var.suggestedvar.CVE_PRODUCT
    oelint.var.suggestedvar.SECTION
    oelint.vars.appendop
    oelint.vars.autorev
    oelint.vars.bbvars
    oelint.vars.bbvars.BBDEBUG
    oelint.vars.bbvars.BBFILES
    oelint.vars.bbvars.BBFILE_COLLECTIONS
    oelint.vars.bbvars.BBFILE_PATTERN
    oelint.vars.bbvars.BBFILE_PRIORITY
    oelint.vars.bbvars.BBINCLUDED
    oelint.vars.bbvars.BBINCLUDELOGS
    oelint.vars.bbvars.BBINCLUDELOGS_LINES
    oelint.vars.bbvars.BBLAYERS
    oelint.vars.bbvars.BBMASK
    oelint.vars.bbvars.BBPATH
    oelint.vars.bbvars.BBSERVER
    oelint.vars.bbvars.BBVERSIONS
    oelint.vars.bbvars.BB_CONSOLELOG
    oelint.vars.bbvars.BB_CURRENTTASK
    oelint.vars.bbvars.BB_DANGLINGAPPENDS_WARNONLY
    oelint.vars.bbvars.BB_DEFAULT_TASK
    oelint.vars.bbvars.BB_DISKMON_DIRS
    oelint.vars.bbvars.BB_DISKMON_WARNINTERVAL
    oelint.vars.bbvars.BB_ENV_EXTRAWHITE
    oelint.vars.bbvars.BB_ENV_WHITELIST
    oelint.vars.bbvars.BB_FETCH_PREMIRRORONLY
    oelint.vars.bbvars.BB_FILENAME
    oelint.vars.bbvars.BB_GENERATE_MIRROR_TARBALLS
    oelint.vars.bbvars.BB_HASHBASE_WHITELIST
    oelint.vars.bbvars.BB_HASHCHECK_FUNCTION
    oelint.vars.bbvars.BB_HASHCONFIG_WHITELIST
    oelint.vars.bbvars.BB_INVALIDCONF
    oelint.vars.bbvars.BB_LOGFMT
    oelint.vars.bbvars.BB_NICE_LEVEL
    oelint.vars.bbvars.BB_NO_NETWORK
    oelint.vars.bbvars.BB_NUMBER_PARSE_THREADS
    oelint.vars.bbvars.BB_NUMBER_THREADS
    oelint.vars.bbvars.BB_ORIGENV
    oelint.vars.bbvars.BB_PRESERVE_ENV
    oelint.vars.bbvars.BB_RUNFMT
    oelint.vars.bbvars.BB_RUNTASK
    oelint.vars.bbvars.BB_SCHEDULER
    oelint.vars.bbvars.BB_SCHEDULERS
    oelint.vars.bbvars.BB_SETSCENE_DEPVALID
    oelint.vars.bbvars.BB_SETSCENE_VERIFY_FUNCTION
    oelint.vars.bbvars.BB_SIGNATURE_EXCLUDE_FLAGS
    oelint.vars.bbvars.BB_SIGNATURE_HANDLER
    oelint.vars.bbvars.BB_SRCREV_POLICY
    oelint.vars.bbvars.BB_STAMP_POLICY
    oelint.vars.bbvars.BB_STAMP_WHITELIST
    oelint.vars.bbvars.BB_STRICT_CHECKSUM
    oelint.vars.bbvars.BB_TASKHASH
    oelint.vars.bbvars.BB_TASK_NICE_LEVEL
    oelint.vars.bbvars.BB_VERBOSE_LOGS
    oelint.vars.bbvars.BB_WORKERCONTEXT
    oelint.vars.bbvars.BITBAKE_UI
    oelint.vars.bbvars.BUILDNAME
    oelint.vars.bbvars.CACHE
    oelint.vars.bbvars.DL_DIR
    oelint.vars.bbvars.FILE
    oelint.vars.bbvars.FILESDIR
    oelint.vars.bbvars.FILESPATH
    oelint.vars.bbvars.INHERIT
    oelint.vars.bbvars.LAYERDEPENDS
    oelint.vars.bbvars.LAYERDIR
    oelint.vars.bbvars.LAYERVERSION
    oelint.vars.bbvars.MIRRORS
    oelint.vars.bbvars.MULTI_PROVIDER_WHITELIST
    oelint.vars.bbvars.PERSISTENT_DIR
    oelint.vars.bbvars.PREFERRED_PROVIDER
    oelint.vars.bbvars.PREFERRED_PROVIDERS
    oelint.vars.bbvars.PREFERRED_VERSION
    oelint.vars.bbvars.PREMIRRORS
    oelint.vars.bbvars.PRSERV_HOST
    oelint.vars.bbvars.STAMP
    oelint.vars.bbvars.TOPDIR
    oelint.vars.bugtrackerisurl
    oelint.vars.dependsappend
    oelint.vars.dependsclass
    oelint.vars.dependsordered
    oelint.vars.descriptionsame
    oelint.vars.descriptiontoobrief
    oelint.vars.doublemodify
    oelint.vars.downloadfilename
    oelint.vars.duplicate
    oelint.vars.fileextrapaths
    oelint.vars.fileextrapathsop
    oelint.vars.filessetting
    oelint.vars.filessetting.double
    oelint.vars.filessetting.hidden
    oelint.vars.homepageping
    oelint.vars.homepageprefix
    oelint.vars.inconspaces
    oelint.vars.insaneskip
    oelint.vars.licensesdpx
    oelint.vars.licfileprefix
    oelint.vars.listappend
    oelint.vars.mispell
    oelint.vars.multilineident
    oelint.vars.notneededspace
    oelint.vars.notrailingslash
    oelint.vars.overrideappend
    oelint.vars.pathhardcode
    oelint.vars.pathhardcode.bindir
    oelint.vars.pathhardcode.datadir
    oelint.vars.pathhardcode.docdir
    oelint.vars.pathhardcode.includedir
    oelint.vars.pathhardcode.infodir
    oelint.vars.pathhardcode.libdir
    oelint.vars.pathhardcode.libexecdir
    oelint.vars.pathhardcode.localstatedir
    oelint.vars.pathhardcode.mandir
    oelint.vars.pathhardcode.nonarch_base_libdir
    oelint.vars.pathhardcode.sbindir
    oelint.vars.pathhardcode.servicedir
    oelint.vars.pathhardcode.sharedstatedir
    oelint.vars.pathhardcode.sysconfdir
    oelint.vars.pathhardcode.systemd_system_unitdir
    oelint.vars.pathhardcode.systemd_unitdir
    oelint.vars.pathhardcode.systemd_user_unitdir
    oelint.vars.pbpusage
    oelint.vars.pkgspecific
    oelint.vars.pkgspecific.ALLOW_EMPTY
    oelint.vars.pkgspecific.FILES
    oelint.vars.pkgspecific.RCONFLICTS
    oelint.vars.pkgspecific.RDEPENDS
    oelint.vars.pkgspecific.RPROVIDES
    oelint.vars.pkgspecific.RRECOMMENDS
    oelint.vars.pkgspecific.RREPLACES
    oelint.vars.pkgspecific.RSUGGESTS
    oelint.vars.pkgspecific.pkg_postinst
    oelint.vars.pkgspecific.pkg_postrm
    oelint.vars.pkgspecific.pkg_preinst
    oelint.vars.pkgspecific.pkg_prerm
    oelint.vars.pnbpnusage
    oelint.vars.pnusagediscouraged
    oelint.vars.sectionlowercase
    oelint.vars.spacesassignment
    oelint.vars.specific
    oelint.vars.srcuriappend
    oelint.vars.srcurichecksum
    oelint.vars.srcuridomains
    oelint.vars.srcurifile
    oelint.vars.srcurigittag
    oelint.vars.srcurioptions
    oelint.vars.srcurisrcrevtag
    oelint.vars.summary80chars
    oelint.vars.summarylinebreaks
    oelint.vars.valuequoted
Parsing meta/recipes-core/base-files/base-files_3.0.14.bb

poky on  master with fish
$ echo $status
22

oelint-adv exits with 22. AFAIK, this means that it found 22 issues. However, there are no linter messages printed, only blank lines.

After examining the code, I discovered that this line might be the problem. The get_messageformat() function appears to be returning an empty string, which is why the formatting is not being applied. I can confirm that set_messageformat() is called with the default value, however then later the get_messageformat() is called, it return just the empty string. IIRC globals do not play nicely with multiprocessing pools and need to be passed explicitly.