Mon May 6 01:32:59 2013 UTC ()
*) Clarified the specific MIME information (MimeType key) that would
warrant the inclusion of sysutils/desktop-file-utils/desktopdb.mk, as there
are other MIME-related keys that appear in *.desktop files.

*) Synthesize recent discussion about DIST_SUBDIR on pkgsrc-bugs@ into the
guide, as this is important, no one did it, and I have time to do it now.
Break that very large paragraph into four smaller, sensible ones.


(rodent)
diff -r1.119 -r1.120 pkgsrc/doc/guide/files/fixes.xml

cvs diff -r1.119 -r1.120 pkgsrc/doc/guide/files/fixes.xml (expand / switch to unified diff)

--- pkgsrc/doc/guide/files/fixes.xml 2013/05/05 21:26:37 1.119
+++ pkgsrc/doc/guide/files/fixes.xml 2013/05/06 01:32:58 1.120
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1<!-- $NetBSD: fixes.xml,v 1.119 2013/05/05 21:26:37 rodent Exp $ --> 1<!-- $NetBSD: fixes.xml,v 1.120 2013/05/06 01:32:58 rodent Exp $ -->
2 2
3<chapter id="fixes"> <?dbhtml filename="fixes.html"?> 3<chapter id="fixes"> <?dbhtml filename="fixes.html"?>
4<title>Making your package work</title> 4<title>Making your package work</title>
5 5
6<sect1 id="general-operation"> 6<sect1 id="general-operation">
7 <title>General operation</title> 7 <title>General operation</title>
8 8
9 <sect2 id="portability-of-packages"> 9 <sect2 id="portability-of-packages">
10 <title>Portability of packages</title> 10 <title>Portability of packages</title>
11 11
12 <para>One appealing feature of pkgsrc is that it runs on many 12 <para>One appealing feature of pkgsrc is that it runs on many
13 different platforms. As a result, it is important to ensure, 13 different platforms. As a result, it is important to ensure,
14 where possible, that packages in pkgsrc are portable. This 14 where possible, that packages in pkgsrc are portable. This
@@ -705,42 +705,43 @@ FETCH_MESSAGE+= "manually from "${MASTER @@ -705,42 +705,43 @@ FETCH_MESSAGE+= "manually from "${MASTER
705 705
706 <sect2 id="modified-distfiles-same-name"> 706 <sect2 id="modified-distfiles-same-name">
707 <title>How to handle modified distfiles with the 'old' name</title> 707 <title>How to handle modified distfiles with the 'old' name</title>
708 708
709 <para>Sometimes authors of a software package make some 709 <para>Sometimes authors of a software package make some
710 modifications after the software was released, and they put up a 710 modifications after the software was released, and they put up a
711 new distfile without changing the package's version number. If a 711 new distfile without changing the package's version number. If a
712 package is already in pkgsrc at that time, the checksum will 712 package is already in pkgsrc at that time, the checksum will
713 no longer match. The contents of the new distfile should be 713 no longer match. The contents of the new distfile should be
714 compared against the old one before changing anything, to make 714 compared against the old one before changing anything, to make
715 sure the distfile was really updated on purpose, and that 715 sure the distfile was really updated on purpose, and that
716 no trojan horse or so crept in. 716 no trojan horse or so crept in.
717 Please mention that the distfiles were compared and what was found 717 Please mention that the distfiles were compared and what was found
718 in your commit message. 718 in your commit message.</para>
719 Then, the correct way to work around this is to 719 <para>Then, the correct way to work around this is to
720 set <varname>DIST_SUBDIR</varname> to a unique directory name, 720 set <varname>DIST_SUBDIR</varname> to a unique directory name,
721 usually based on <varname>PKGNAME_NOREV</varname>. All 721 usually based on <varname>PKGNAME_NOREV</varname>. All
722 <varname>DISTFILES</varname> and 722 <varname>DISTFILES</varname> and
723 <varname>PATCHFILES</varname> for this package will be put in that 723 <varname>PATCHFILES</varname> for this package will be put in that
724 subdirectory of the local distfiles directory. 724 subdirectory of the local distfiles directory.
725 (See <xref linkend="bumping-pkgrevision"/> for more details.) 725 (See <xref linkend="bumping-pkgrevision"/> for more details.)
726 In case this 726 In case this
727 happens more often, <varname>PKGNAME</varname> can be used (thus 727 happens more often, <varname>PKGNAME</varname> can be used (thus
728 including the <filename>nbX</filename> suffix) or a date stamp 728 including the <filename>nbX</filename> suffix) or a date stamp
729 can be appended, like <varname>${PKGNAME_NOREV}-YYYYMMDD</varname>. 729 can be appended, like <varname>${PKGNAME_NOREV}-YYYYMMDD</varname>.</para>
730 Do not forget regenerating the <filename>distinfo</filename> file 730 <para><varname>DIST_SUBDIR</varname> is also used when a distfile's name does not contain a version and the distfile is apt to change. In cases where the likelihood of this is very small, <varname>DIST_SUBDIR</varname> might not be required. Additionally, <varname>DIST_SUBDIR</varname> must not be removed unless the distfile name changes, even if a package is being moved or renamed.</para>
 731 <para>Do not forget regenerating the <filename>distinfo</filename> file
731 after that, since it contains the <varname>DIST_SUBDIR</varname> 732 after that, since it contains the <varname>DIST_SUBDIR</varname>
732 path in the filenames. 733 path in the filenames.
733 Also increase the PKGREVISION if the installed package is different. 734 Also, increase the PKGREVISION if the installed package is different.
734 Furthermore, a mail to the package's authors seems appropriate 735 Furthermore, a mail to the package's authors seems appropriate
735 telling them that changing distfiles after releases without 736 telling them that changing distfiles after releases without
736 changing the file names is not good practice.</para> 737 changing the file names is not good practice.</para>
737 </sect2> 738 </sect2>
738</sect1> 739</sect1>
739 740
740 741
741<sect1 id="fixes.configure"> 742<sect1 id="fixes.configure">
742 <title>Fixing problems in the <emphasis>configure</emphasis> phase</title> 743 <title>Fixing problems in the <emphasis>configure</emphasis> phase</title>
743 744
744 <sect2 id="fixes.libtool"> 745 <sect2 id="fixes.libtool">
745 <title>Shared libraries - libtool</title> 746 <title>Shared libraries - libtool</title>
746 747
@@ -1902,28 +1903,28 @@ PERL5_PACKLIST= auto/Pg/.packlist @@ -1902,28 +1903,28 @@ PERL5_PACKLIST= auto/Pg/.packlist
1902 </orderedlist> 1903 </orderedlist>
1903 1904
1904 <para>The best way to verify that the PLIST is correct with 1905 <para>The best way to verify that the PLIST is correct with
1905 respect to the last two points is to regenerate it using 1906 respect to the last two points is to regenerate it using
1906 <command>make print-PLIST</command>.</para> 1907 <command>make print-PLIST</command>.</para>
1907 </sect2> 1908 </sect2>
1908 1909
1909 1910
1910 <sect2 id="desktop-files"> 1911 <sect2 id="desktop-files">
1911 <title>Packages installing desktop files</title> 1912 <title>Packages installing desktop files</title>
1912 1913
1913 <para>If a package installs <filename>.desktop</filename> files 1914 <para>If a package installs <filename>.desktop</filename> files
1914 under <filename>share/applications</filename> and these include 1915 under <filename>share/applications</filename> and these include
1915 MIME information, you need to take extra steps to ensure that they 1916 MIME information (MimeType key), you need to take extra steps to
1916 are registered into the MIME database:</para> 1917 ensure that they are registered into the MIME database:</para>
1917 1918
1918 <orderedlist> 1919 <orderedlist>
1919 <listitem> 1920 <listitem>
1920 <para>Include 1921 <para>Include
1921 <filename>../../sysutils/desktop-file-utils/desktopdb.mk</filename>.</para> 1922 <filename>../../sysutils/desktop-file-utils/desktopdb.mk</filename>.</para>
1922 </listitem> 1923 </listitem>
1923 1924
1924 <listitem> 1925 <listitem>
1925 <para>Check the PLIST and remove the entry that refers to the 1926 <para>Check the PLIST and remove the entry that refers to the
1926 <filename>share/applications/mimeinfo.cache</filename> file. 1927 <filename>share/applications/mimeinfo.cache</filename> file.
1927 It will be handled automatically.</para> 1928 It will be handled automatically.</para>
1928 </listitem> 1929 </listitem>
1929 </orderedlist> 1930 </orderedlist>