Page MenuHomeFreeBSD

Extract the DESKTOP_ENTRIES related targets.
ClosedPublic

Authored by mat on Jun 22 2017, 4:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 5:02 PM
Unknown Object (File)
Thu, Mar 28, 2:06 PM
Unknown Object (File)
Dec 20 2023, 7:05 AM
Unknown Object (File)
Dec 8 2023, 8:18 AM
Unknown Object (File)
Dec 8 2023, 2:19 AM
Unknown Object (File)
Nov 16 2023, 3:41 AM
Unknown Object (File)
Nov 12 2023, 4:41 AM
Unknown Object (File)
Nov 10 2023, 1:35 PM
Subscribers

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 14458
Build 14605: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jun 22 2017, 5:01 PM
jilles requested changes to this revision.Jun 22 2017, 10:03 PM
jilles added a subscriber: jilles.
jilles added inline comments.
Mk/Scripts/check-desktop-entries.sh
75

The previous code using echo|grep matched the suffix case-insensitively.

76–78

The expr syntax is invalid because / is interpreted as a division operator. Perhaps

case ${Icon} in
/*) ;;
*)
    ${dp_ECHO_MSG} "${dp_PKGNAME}:  Makefile warning: in desktop entry ${entry}: field 3 (Icon) should be either absolute path or icon name without extension if installed icons follow Icon Theme Specification" ;;
esac
This revision now requires changes to proceed.Jun 22 2017, 10:03 PM
mat edited edge metadata.
  • Fix the absolute path check.
Mk/Scripts/check-desktop-entries.sh
76

This will work with the current implementation of expr, but it is not POSIX-compliant, since POSIX leaves it unspecified whether an initial ^ is special (the expression being implicitly anchored anyway).

mat marked an inline comment as done.Jun 23 2017, 3:08 PM
mat added inline comments.
Mk/Scripts/check-desktop-entries.sh
75

True. On the other hand, I did check beforehand, there are no cases where the files are not lower cased.

76

But we do not run in the os called POSIX, we run on the OS called FreeBSD, where the behavior is currently very well defined.
If the behavior ever changes later, then all the code using it will need to change. We live in the now, with an eye of what is in the work, and not using tools because of a vague possibilty that one day the way they work may change is not how I see doing things. I mean, I could never do anything if it was the case.

Mk/Scripts/check-desktop-entries.sh
76

Sorry for being less constructive here. The desired behaviour can be implemented using POSIX-compliant expr as ${dp_EXPR} "x${Icon}" : x/.

My point is not that we should restrict ourselves to POSIX features at all cost, but that an implementation using only POSIX features is preferable to an implementation using extensions if they are similar in other respects. In some situations, non-standard features unique to a system are more likely to change than standard features common with other systems.

Given that this feature (^ in : regular expression) is implemented the same way by GNU expr, it seems not unlikely to change, though.

  • Switch this one to grep, expr's posix is harder.

It looks like it will work.

This could be optimized a little but I think it is not worth gating the patch for it.

This revision is now accepted and ready to land.Jan 19 2018, 11:00 PM
This revision was automatically updated to reflect the committed changes.