prune unreachable code paths

revise man-page discussion of --install-root
This commit is contained in:
John McQuah 2023-08-24 10:34:02 -04:00
parent 1c3bcde003
commit 91632a574d
3 changed files with 23 additions and 17 deletions

View File

@ -565,9 +565,18 @@ reading/writing (so <dir>/var/lib/pkg/db must exist), and where the pkg.tar.?z
archives get unpacked, but the relevant prt-get.conf and ports tree are those
on the parent filesystem. Therefore it is not necessary for <dir> to contain
its own copy of the ports tree (unless 'runscripts yes' is desired, as
explained above). However, if <dir>/etc/pkgadd.conf exists and is different
from /etc/pkgadd.conf, then install or update commands might behave
unexpectedly. In order to preserve the \fBpkgadd.conf(5)\fP settings from the
explained above). But each \fBpkgmk(8)\fP process will take place on the parent
filesystem, inspecting \fIthe parent filesystem\fP's environment for
information about installed ports and available shared libraries. The
\fBpkgmk(8)\fP process might therefore draw the wrong conclusions about what
functionality should be enabled for an installation to <dir>. If the parent
filesystem is more richly populated than <dir>, with respect to installed
packages, then the built package might exhibit breakage when \fBpkgadd\fP
unpacks it into <dir>.
When setting --install-root=<dir>, install or update commands might behave
unexpectedly if <dir>/etc/pkgadd.conf exists and is different from
/etc/pkgadd.conf . In order to preserve the \fBpkgadd.conf(5)\fP settings from
host system, append the option --aargs='-c /etc/pkgadd.conf' to your \fBprt\-get
install\fP command, or just copy the desired directives into
<dir>/etc/pkgadd.conf .
@ -730,15 +739,23 @@ currently-installed ports, but are needed now by the newer versions of
these ports. The output of this command is sorted by dependencies, therefore
suitable for piping to \fBxargs prt\-get install\fP.
.TP
.B prt\-get isinst $(prt\-get quickdep i3) | awk '/not installed/ { print $2 }' | xargs prt\-get depinst \-\-softdeps \-\-test
(inspired by a troubleshooting session with hestia) Assemble a set of install
targets needed to build the i3 window manager; sort the list, respecting both
hard and soft dependencies; then print how the installation would proceed. The
awk filter in the middle is needed to prevent the command from failing with the
error message "already installed".
.TP
.B prt\-get printf \(dq%p\et%u\en\(dq | grep myrepo | cut -f 2
Print the upstream URL for each port in the collection \(dqmyrepo\(dq,
perhaps as the first step in keeping your personal overlay up to date.
.TP
.B prt\-get printf \(dq%M\et%n\en\(dq | grep ^Tim | wc -l
Count how many ports our most-overworked core team member claims
responsibility for.
.B prt\-get printf \(dq%M\et%n\en\(dq | grep -c -i ^unmaintained
Count how many ports are marked unmaintained (and hence at risk of being dropped
from the repos by the time you next run 'ports -u').
.TP
.B comm -13 <(prt\-get depends firefox-bin |tail -n +2 |sort) <(prt\-get depends firefox |tail -n +2 |sort)

View File

@ -52,9 +52,7 @@ public:
SUCCESS, /*!< yeah, success */
NO_PACKAGE_GIVEN, /*!< no package given to install */
PACKAGE_NOT_FOUND, /*!< package not found */
PKGMK_EXEC_ERROR, /*!< can't execute pkgmk */
PKGMK_FAILURE, /*!< error while pkgmk */
PKGADD_EXEC_ERROR, /*!< can't execute pkgadd */
PKGDEST_ERROR, /*!< can't change to PKGDEST */
PKGADD_FAILURE, /*!< error while pkgadd */
CYCLIC_DEPEND, /*!< cyclic dependencies found */

View File

@ -595,21 +595,12 @@ void PrtGet::executeTransaction( InstallTransaction& transaction ) {
case InstallTransaction::PACKAGE_NOT_FOUND:
cout << m_appName << ": package(s) not found" << endl;
break;
case InstallTransaction::PKGMK_EXEC_ERROR:
cout << m_appName << " couldn't excecute pkgmk "
<< "(or alternative command). "
<< "Make sure it's installed properly" << endl;
break;
case InstallTransaction::PKGMK_FAILURE:
cout << m_appName << ": error while building " << endl;
break;
case InstallTransaction::NO_PACKAGE_GIVEN:
cout << m_appName << ": no package specified " << endl;
break;
case InstallTransaction::PKGADD_EXEC_ERROR:
cout << m_appName << " couldn't excecute pkgadd. "
<< "Make sure it's installed properly" << endl;
break;
case InstallTransaction::PKGDEST_ERROR:
cout << m_appName << ": error changing to PKGDEST directory "
<< m_config->packageDir() << endl;