pkgcheck icon indicating copy to clipboard operation
pkgcheck copied to clipboard

[Bug]: Incorrect DeprecatedInsinto for non-menu items in /usr/share/applications

Open thesamesam opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

See ef042cf60b50500d364675af5961808eb8941298 for an example.

pkgcheck emits DeprecatedInsinto for non-menu items installed into /usr/share/applications with this snippet:

	insinto /usr/share/applications/
	newins "${FILESDIR}"/mimeapps.list kde-mimeapps.list
 kde-plasma/plasma-mimeapps-list
  DeprecatedInsinto: version 3: deprecated insinto usage (use domenu or newmenu from desktop.eclass instead), line 26: insinto /usr/share/applications/

Expected Behavior

No bogus warning.

pkgcheck version

pkgcheck 0.10.3

pkgcore version

pkgcore 0.12.29

thesamesam avatar Jan 25 '25 10:01 thesamesam

Hmm, changing the code of DeprecatedInsinto is non trivial, since it uses regex to detect just calls to insint ${DIR}. It means I would detect next lines if they attempt to install "*.desktop".

On the other hand, while somewhat ugly, would using newmenu "${FILESDIR}"/mimeapps.list kde-mimeapps.list work "by mistake"?

arthurzam avatar Jan 25 '25 11:01 arthurzam

I think that would work by mistake, yeah. @parona-source points out maybe this is a good case for a suppression instead and to keep the check as-is?

thesamesam avatar Jan 25 '25 12:01 thesamesam