Date: Sun, 12 Mar 2023 08:19:15 +0000 From: Nuno Teixeira <eduardo@freebsd.org> To: FreeBSD Mailing List <freebsd-ports@freebsd.org> Cc: marcus@freebsd.org Subject: portlint: Improving need of USES=desktop-file-utils Message-ID: <CAFDf7U%2BRhS7mMHqsvTJ12fNwtVCr%2BS2HCitxpsA8_xTZbJzczg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--000000000000171a7405f6afa7f3 Content-Type: text/plain; charset="UTF-8" Hello all, portlint gives a fatal warning about need of desktop-file-utils when a .desktop file is installed. According to https://docs.freebsd.org/en/books/porters-handbook/book/#updating-desktop-database this is true if MimeType entry is defined in .desktop file. Is there a way to check presense of MimeType on .desktop file? --- if ($_ =~ m|\.desktop$| && $makevar{USES} !~ /\bdesktop-file-utils\b/) { &perror("FATAL", $file, $., "this port installs .desktop files. ". "Please add `desktop-file-utils` to USES."); } --- Also, Q/A check warns about "maybe not needed" when MimeType not present. Thanks, -- Nuno Teixeira FreeBSD Committer (ports) --000000000000171a7405f6afa7f3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hello all,</div><div><br></div><div>portlint gives a = fatal warning about need of desktop-file-utils when a .desktop file is inst= alled.</div><div>According to <a href=3D"https://docs.freebsd.org/en/books/= porters-handbook/book/#updating-desktop-database">https://docs.freebsd.org/= en/books/porters-handbook/book/#updating-desktop-database</a> this is true = if MimeType entry is defined in .desktop file.</div><div><br></div><div>Is = there a way to check presense of MimeType on .desktop file?</div><div>---<b= r></div><div>if ($_ =3D~ m|\.desktop$| && $makevar{USES} !~ /\bdesk= top-file-utils\b/) {<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &perror("FATAL", $file, $.= , "this port installs .desktop files. ".<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 "Please add `desktop-file-utils` to USES.");=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }</div><div>---<br></d= iv><div>Also, Q/A check warns about "maybe not needed" when MimeT= ype not present.<br></div><div><br></div><div>Thanks,<br></div><div><br><sp= an class=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D= "gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><span= style=3D"color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committer (ports= )</span></div></div></div></div> --000000000000171a7405f6afa7f3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7U%2BRhS7mMHqsvTJ12fNwtVCr%2BS2HCitxpsA8_xTZbJzczg>