/usr/share/doc/racket/pkg/FAQ.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>9 FAQ</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Package Management in Racket</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="getting-started.html" class="tocviewlink" data-pltdoc="x">Getting Started with Packages</a></td></tr><tr><td align="right">2 </td><td><a href="Package_Concepts.html" class="tocviewlink" data-pltdoc="x">Package Concepts</a></td></tr><tr><td align="right">3 </td><td><a href="cmdline.html" class="tocviewlink" data-pltdoc="x">Using <span class="stt">raco pkg</span></a></td></tr><tr><td align="right">4 </td><td><a href="metadata.html" class="tocviewlink" data-pltdoc="x">Package Metadata</a></td></tr><tr><td align="right">5 </td><td><a href="strip.html" class="tocviewlink" data-pltdoc="x">Source, Binary, and Built Packages</a></td></tr><tr><td align="right">6 </td><td><a href="apis.html" class="tocviewlink" data-pltdoc="x">Package APIs</a></td></tr><tr><td align="right">7 </td><td><a href="catalog-protocol.html" class="tocviewlink" data-pltdoc="x">Package Catalog Protocol</a></td></tr><tr><td align="right">8 </td><td><a href="PLaneT_Compatibility.html" class="tocviewlink" data-pltdoc="x"><span class="planetName">PLane<span class="mywbr"> </span>T</span> Compatibility</a></td></tr><tr><td align="right">9 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">FAQ</a></td></tr><tr><td align="right">10 </td><td><a href="Future_Plans.html" class="tocviewlink" data-pltdoc="x">Future Plans</a></td></tr><tr><td align="right">11 </td><td><a href="implementation.html" class="tocviewlink" data-pltdoc="x">How Package Installation and Distribution Works</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>9 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">FAQ</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">9.1 </td><td><a href="#%28part._.Are_package_installations_versioned_with_respect_to_the_.Racket_version_%29" class="tocviewlink" data-pltdoc="x">Are package installations versioned with respect to the
Racket version?</a></td></tr><tr><td align="right">9.2 </td><td><a href="#%28part._.Where_and_how_are_packages_installed_%29" class="tocviewlink" data-pltdoc="x">Where and how are packages installed?</a></td></tr><tr><td align="right">9.3 </td><td><a href="#%28part._.How_are_user-specific_and_installation-wide_package_scopes_related_for_conflict_checking_%29" class="tocviewlink" data-pltdoc="x">How are user-<wbr></wbr>specific and installation-<wbr></wbr>wide <span class="techoutside"><span class="techinside">package scopes</span></span>
related for conflict checking?</a></td></tr><tr><td align="right">9.4 </td><td><a href="#%28part._.Do_.I_need_to_change_a_package_s_version_when_.I_update_a_package_with_error_fixes__etc__%29" class="tocviewlink" data-pltdoc="x">Do I need to change a package’s version when I update a package with error fixes, etc<span class="Sendabbrev">.</span>?</a></td></tr><tr><td align="right">9.5 </td><td><a href="#%28part._.How_can_.I_specify_which_version_of_a_package_.I_depend_on_if_its_interface_has_changed_and_.I_need_an_old_version_%29" class="tocviewlink" data-pltdoc="x">How can I specify which version of a package I depend on
if its interface has changed and I need an <span style="font-style: italic">old</span> version?</a></td></tr><tr><td align="right">9.6 </td><td><a href="#%28part._.How_can_.I_fix_my_installation_to_a_specific_set_of_package_implementations_or_checksums_%29" class="tocviewlink" data-pltdoc="x">How can I fix my installation to a specific set of package
implementations or <span class="techoutside"><span class="techinside">checksums</span></span>?</a></td></tr><tr><td align="right">9.7 </td><td><a href="#%28part._.Why_is_the_package_manager_so_different_than_.P.Lane.T_%29" class="tocviewlink" data-pltdoc="x">Why is the package manager so different than <span class="planetName">PLane<span class="mywbr"> </span>T</span>?</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">9.1<tt> </tt></span><a href="#%28part._.Are_package_installations_versioned_with_respect_to_the_.Racket_version_%29" class="tocsubseclink" data-pltdoc="x">Are package installations versioned with respect to the
Racket version?</a></td></tr><tr><td><span class="tocsublinknumber">9.2<tt> </tt></span><a href="#%28part._.Where_and_how_are_packages_installed_%29" class="tocsubseclink" data-pltdoc="x">Where and how are packages installed?</a></td></tr><tr><td><span class="tocsublinknumber">9.3<tt> </tt></span><a href="#%28part._.How_are_user-specific_and_installation-wide_package_scopes_related_for_conflict_checking_%29" class="tocsubseclink" data-pltdoc="x">How are user-<wbr></wbr>specific and installation-<wbr></wbr>wide <span class="techoutside"><span class="techinside">package scopes</span></span>
related for conflict checking?</a></td></tr><tr><td><span class="tocsublinknumber">9.4<tt> </tt></span><a href="#%28part._.Do_.I_need_to_change_a_package_s_version_when_.I_update_a_package_with_error_fixes__etc__%29" class="tocsubseclink" data-pltdoc="x">Do I need to change a package’s version when I update a package with error fixes, etc<span class="Sendabbrev">.</span>?</a></td></tr><tr><td><span class="tocsublinknumber">9.5<tt> </tt></span><a href="#%28part._.How_can_.I_specify_which_version_of_a_package_.I_depend_on_if_its_interface_has_changed_and_.I_need_an_old_version_%29" class="tocsubseclink" data-pltdoc="x">How can I specify which version of a package I depend on
if its interface has changed and I need an <span style="font-style: italic">old</span> version?</a></td></tr><tr><td><span class="tocsublinknumber">9.6<tt> </tt></span><a href="#%28part._.How_can_.I_fix_my_installation_to_a_specific_set_of_package_implementations_or_checksums_%29" class="tocsubseclink" data-pltdoc="x">How can I fix my installation to a specific set of package
implementations or <span class="techoutside"><span class="techinside">checksums</span></span>?</a></td></tr><tr><td><span class="tocsublinknumber">9.7<tt> </tt></span><a href="#%28part._.Why_is_the_package_manager_so_different_than_.P.Lane.T_%29" class="tocsubseclink" data-pltdoc="x">Why is the package manager so different than <span class="planetName">PLane<span class="mywbr"> </span>T</span>?</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="PLaneT_Compatibility.html" title="backward to "8 PLaneT Compatibility"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Package Management in Racket"" data-pltdoc="x">up</a> <a href="Future_Plans.html" title="forward to "10 Future Plans"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""FAQ"">9<tt> </tt><a name="(part._.F.A.Q)"></a>FAQ</h3><p>This section answers anticipated frequently asked questions about
the package manager.</p><h4 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""Are_package_installations_versioned_with_respect_to_the_Racket_version_"">9.1<tt> </tt><a name="(part._.Are_package_installations_versioned_with_respect_to_the_.Racket_version_)"></a>Are package installations versioned with respect to the
Racket version?</h4><p>Most Racket installations are configured to that installing a package
installs it for a specific user and a specific version of Racket. That
is, the <a href="Package_Concepts.html#%28tech._package._scope%29" class="techoutside" data-pltdoc="x"><span class="techinside">package scope</span></a> is user- and version-specific. More
precisely, it is user-specific and installation-name-specific, where
an installation name is typically a Racket version.</p><p>You can change the default <a href="Package_Concepts.html#%28tech._package._scope%29" class="techoutside" data-pltdoc="x"><span class="techinside">package scope</span></a> (for a particular
Racket installation) with <a href="cmdline.html#%28part._raco-pkg-config%29" class="plainlink" data-pltdoc="x"><span class="stt">raco pkg config</span></a><span class="stt"> -i --set
default-scope installation</span>, in which case package operations apply
for all users of a Racket installation. You can also use the <span class="nobreak"><span class="stt">-i</span></span>
or <span class="nobreak"><span class="stt">--installation</span></span> flag with a specific <span class="stt">raco pkg</span> command,
instead of changing the default scope for all uses of <span class="stt">raco
pkg</span>. Note that an installation-wide package is not exactly
version-specific, because the version of an installation can change if
it corresponds to a source-code checkout that is periodically updated
and rebuilt.</p><p>If you change the default <a href="Package_Concepts.html#%28tech._package._scope%29" class="techoutside" data-pltdoc="x"><span class="techinside">package scope</span></a>, you can use the
<span class="nobreak"><span class="stt">-u</span></span> or <span class="nobreak"><span class="stt">--user</span></span> flag with a specific <span class="stt">raco pkg</span> command
to perform the command with user-specific <a href="Package_Concepts.html#%28tech._package._scope%29" class="techoutside" data-pltdoc="x"><span class="techinside">package scope</span></a>.</p><h4 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""Where_and_how_are_packages_installed_"">9.2<tt> </tt><a name="(part._.Where_and_how_are_packages_installed_)"></a>Where and how are packages installed?</h4><p>User-specific and Racket-version-specific packages are in
<span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-user-pkgs-dir%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">find-user-pkgs-dir</a></span><span class="RktPn">)</span>, and installation-wide packages
are in <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-pkgs-dir%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">find-pkgs-dir</a></span><span class="RktPn">)</span>. They are linked as
collections (for single-collection packages) or collection roots (for
multi-collection packages) with <span class="stt">raco link</span>.</p><h4 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""How_are_user-specific_and_installation-wide_package_scopes_related_for_conflict_checking_"">9.3<tt> </tt><a name="(part._.How_are_user-specific_and_installation-wide_package_scopes_related_for_conflict_checking_)"></a>How are user-specific and installation-wide <a href="Package_Concepts.html#%28tech._package._scope%29" class="techoutside" data-pltdoc="x"><span class="techinside">package scopes</span></a>
related for conflict checking?</h4><p>User-specific packages are checked against installation-wide packages
for package-name conflicts and provided-module
conflicts. Installation-wide packages are checked against
user-specific packages only for provided-module conflicts.</p><p>Beware that a conflict-free, installation-wide change by one user can
create conflicts for a different user.</p><h4 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""Do_I_need_to_change_a_package_s_version_when_I_update_a_package_with_error_fixes__etc__"">9.4<tt> </tt><a name="(part._.Do_.I_need_to_change_a_package_s_version_when_.I_update_a_package_with_error_fixes__etc__)"></a>Do I need to change a package’s version when I update a package with error fixes, etc<span class="Sendabbrev">.</span>?</h4><p>If you have new code for a package, then it should have a new
<a href="Package_Concepts.html#%28tech._checksum%29" class="techoutside" data-pltdoc="x"><span class="techinside">checksum</span></a>. When package updates are searched for, the checksum
of the installed package is compared with the checksum of the source,
if they are different, then the source is re-installed. This allows
code changes to be distributed. You do not need to declare an update a
version number, except to allow other package implementors to indicate
a dependency on particular features (where a bug fix might be
considered a feature, but it is not usually necessary to consider it
that way).</p><h4 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""How_can_I_specify_which_version_of_a_package_I_depend_on_if_its_interface_has_changed_and_I_need_an_old_version_"">9.5<tt> </tt><a name="(part._.How_can_.I_specify_which_version_of_a_package_.I_depend_on_if_its_interface_has_changed_and_.I_need_an_old_version_)"></a>How can I specify which version of a package I depend on
if its interface has changed and I need an <span style="font-style: italic">old</span> version?</h4><p>In such a situation, the author of the package has released a
backwards incompatible edition of a package. The package manager provides
no help to deal with this situation (other than, of course, not
installing the “update”). Therefore, package authors should not make
backwards incompatible changes to packages. Instead, they should
release a new package with a new name. For example, package
<span class="stt">libgtk</span> might become <span class="stt">libgtk2</span>. These packages
should be designed to not conflict with each other, as well.</p><h4 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""How_can_I_fix_my_installation_to_a_specific_set_of_package_implementations_or_checksums_"">9.6<tt> </tt><a name="(part._.How_can_.I_fix_my_installation_to_a_specific_set_of_package_implementations_or_checksums_)"></a>How can I fix my installation to a specific set of package
implementations or <a href="Package_Concepts.html#%28tech._checksum%29" class="techoutside" data-pltdoc="x"><span class="techinside">checksums</span></a>?</h4><p>Packages are updated only when you run a tool such as
<a href="cmdline.html#%28part._raco-pkg-update%29" class="plainlink" data-pltdoc="x"><span class="stt">raco pkg update</span></a>, so packages are never updated
implicitly. Furthermore, you can snapshot a set of package archives
and install from those archives, instead of relying on package name
resolution through a <a href="Package_Concepts.html#%28tech._package._catalog%29" class="techoutside" data-pltdoc="x"><span class="techinside">package catalog</span></a>.</p><p>If you want to control the resolution of package names (including
specific <a href="Package_Concepts.html#%28tech._checksum%29" class="techoutside" data-pltdoc="x"><span class="techinside">checksum</span></a>s) but not necessary keep a copy of all package
code (assuming that old <a href="Package_Concepts.html#%28tech._checksum%29" class="techoutside" data-pltdoc="x"><span class="techinside">checksum</span></a>s remain available, such as
through Github), you can create a snapshot of the <a href="Package_Concepts.html#%28tech._package._name%29" class="techoutside" data-pltdoc="x"><span class="techinside">package name</span></a>
to <a href="Package_Concepts.html#%28tech._package._source%29" class="techoutside" data-pltdoc="x"><span class="techinside">package source</span></a> mapping by using <a href="cmdline.html#%28part._raco-pkg-catalog-copy%29" class="plainlink" data-pltdoc="x"><span class="stt">raco pkg catalog-copy</span></a>.
For example,</p><p><span class="hspace"> </span><span class="stt">raco pkg catalog-copy --from-config /home/joe/snapshot.sqlite</span></p><p>creates a snapshot <span class="stt">"/home/joe/snapshot.sqlite"</span> of the current
package name resolution, and then</p><p><span class="hspace"> </span><span class="stt">raco pkg config --set catalogs file:///home/joe/snapshot.sqlite</span></p><p>directs all package-name resolution to the snapshot. You can configure
resolution for specific package names by editing the snapshot.</p><p>You can go even further with</p><p><span class="hspace"> </span><span class="stt">raco pkg catalog-archive --from-config /home/joe/snapshot/</span></p><p>which not only takes a snapshot of the catalog, but also takes a
snapshot of all package sources (so that you do not depend on the
original sources).</p><h4 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""Why_is_the_package_manager_so_different_than_PLaneT_"">9.7<tt> </tt><a name="(part._.Why_is_the_package_manager_so_different_than_.P.Lane.T_)"></a>Why is the package manager so different than <span class="planetName">PLaneT</span>?</h4><p>There are two fundamental differences between <span class="planetName">PLaneT</span> and this package manager.</p><p>The first is that <span class="planetName">PLaneT</span> uses “internal linking” whereas the current package manager
uses “external linking.” For example, an individual module requires a
<span class="planetName">PLaneT</span> package directly in a require statement:</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._planet%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">planet</a></span><span class="hspace"> </span><span class="RktSym">game/tic-tac-toe/data/matrix</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote><p>whereas using the package manager, the module would simply require the module of
interest:</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktSym">data/matrix</span><span class="RktPn">)</span></p></blockquote><p>and would rely on the external system having the
<span class="stt">tic-tac-toe</span> package installed.</p><p>This change is good because it makes the origin of modules more
flexible—<wbr></wbr>so that code can migrate in and out of the core, packages
can easily be split up, combined, or taken over by other authors, etc.</p><p>This change is bad because it makes the meaning of your program
dependent on the state of the system.</p><p>The second major difference is that <span class="planetName">PLaneT</span> is committed to
guaranteeing that packages that never conflict with one another, so
that any number of major and minor versions of the same package can be
installed and used simultaneously. The package manager does not share this
commitment, so package authors and users must be mindful of potential
conflicts and plan around them.</p><p>This change is good because it is simpler and lowers the burden of
maintenance (provided most packages don’t conflict.)</p><p>The change is bad because users must plan around potential conflicts.</p><p>In general, the goal of the package manager is to be a lower-level
system, more like the package systems used by operating systems. The
goals of <span class="planetName">PLaneT</span> are not bad, but we believe they are needed
infrequently and a system like <span class="planetName">PLaneT</span> could be more easily built
atop the package manager than the reverse.</p><p>In particular, our plans to mitigate the downsides of these changes
are documented in <a href="Future_Plans.html#%28part._short-term%29" data-pltdoc="x">Short Term</a>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="PLaneT_Compatibility.html" title="backward to "8 PLaneT Compatibility"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Package Management in Racket"" data-pltdoc="x">up</a> <a href="Future_Plans.html" title="forward to "10 Future Plans"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|