svn commit: r40024 - projects/pkgng/en_US.ISO8859-1/books/handbook/ports

Glen Barber gjb at FreeBSD.org
Fri Nov 16 01:53:05 UTC 2012


Author: gjb
Date: Fri Nov 16 01:53:04 2012
New Revision: 40024
URL: http://svnweb.freebsd.org/changeset/doc/40024

Log:
  Document pkg-set, and provide a few examples of setting package origins,
  taken from the pkg-set(8) manual page.

Modified:
  projects/pkgng/en_US.ISO8859-1/books/handbook/ports/chapter.xml

Modified: projects/pkgng/en_US.ISO8859-1/books/handbook/ports/chapter.xml
==============================================================================
--- projects/pkgng/en_US.ISO8859-1/books/handbook/ports/chapter.xml	Fri Nov 16 00:54:03 2012	(r40023)
+++ projects/pkgng/en_US.ISO8859-1/books/handbook/ports/chapter.xml	Fri Nov 16 01:53:04 2012	(r40024)
@@ -976,6 +976,60 @@ Deinstalling ca_root_nss-3.13.5... done<
 
 	<screen>&prompt.root; <userinput>pkg clean</userinput></screen>
       </sect3>
+
+      <sect3 id="pkgng-set">
+	<title>Modifying <application>pkgng</application> Package
+	  Metadata</title>
+
+	<para>Historically, software within the &os; Ports
+	  Collection can undergo major version number changes.  Unlike
+	  <application>pkg_install</application>,
+	  <application>pkgng</application> has a built-in command to
+	  update package origins.  For example, if <filename
+	    role="package">lang/php5</filename> was originally at
+	  version <literal>5.3</literal>, but has been renamed to
+	  <filename role="package">lang/php53</filename> for the
+	  inclusion of version <literal>5.4</literal>,
+	  <application>pkg_install</application> would require the use
+	  of additional software such as <filename
+	    role="package">ports-mgmt/portmaster</filename> to update
+	  the package database, reflecting from which port the
+	  installation originated.</para>
+
+	<para>Unlike the <filename
+	    role="package">ports-mgmt/portmaster</filename> and
+	  <filename role="package">ports-mgmt/portupgrade</filename>
+	  ports, the order in which the new and old versions are
+	  listed differ.  For <application>pkgng</application>, the
+	  syntax is <command>pkg set -o
+	    <replacable>category/oldport</replaceable>:<replaceable>category/newport</replaceable></command>.</para>
+
+	<para>For example, to change the package origin for the above
+	  example, run:</para>
+
+	<screen>&prompt.root; <userinput>pkg set -o lang/php5:lang/php53</userinput></screen>
+
+	<para>As another example, to update <filename
+	    role="package">lang/ruby18</filename> to <filename
+	    role="package">lang/ruby19</filename>, run:</para>
+
+	<screen>&prompt.root; <userinput>pkg set -o lang/ruby18:lang/ruby19</userinput></screen>
+
+	<para>As a final example, to change the origin of the
+	  <filenmae>libglut</filename> shared libraries from <filename
+	    role="package">graphics/libglut</filename> to <<filename
+	    role="package">graphics/freeglut</filename>, run:</para>
+
+	<screen>&prompt.root; <userinput>pkg set -o graphics/libglut:graphics/freeglut</userinput></screen>
+	<note>
+	  <para>When changing package origins, in most cases it is
+	    important to reinstall packages that are dependent on the
+	    package that has had the origin changed.  To force a
+	    reinstallation of dependent packages, run:</para>
+
+	  <screen>&prompt.root; <userinput>pkg install -Rf <replaceable>category/freeglut</replaceable></userinput></screen>
+	</note>
+      </sect3>
     </sect2>
   </sect1><!-- PKGNG -->
 


More information about the svn-doc-projects mailing list