|
| 1 | +'\" t |
| 2 | +.TH "PORT\-SOURCE" "1" "2\&.12\&.99" "MacPorts 2\&.12\&.99" "MacPorts Manual" |
| 3 | +.\" ----------------------------------------------------------------- |
| 4 | +.\" * Define some portability stuff |
| 5 | +.\" ----------------------------------------------------------------- |
| 6 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 | +.\" http://bugs.debian.org/507673 |
| 8 | +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 | +.ie \n(.g .ds Aq \(aq |
| 11 | +.el .ds Aq ' |
| 12 | +.\" ----------------------------------------------------------------- |
| 13 | +.\" * set default formatting |
| 14 | +.\" ----------------------------------------------------------------- |
| 15 | +.\" disable hyphenation |
| 16 | +.nh |
| 17 | +.\" disable justification (adjust text to left margin only) |
| 18 | +.ad l |
| 19 | +.\" ----------------------------------------------------------------- |
| 20 | +.\" * MAIN CONTENT STARTS HERE * |
| 21 | +.\" ----------------------------------------------------------------- |
| 22 | +.SH "NAME" |
| 23 | +port-source \- List, add, and remove MacPorts port tree sources |
| 24 | +.SH "SYNOPSIS" |
| 25 | +.sp |
| 26 | +.nf |
| 27 | +\fBport\fR [\fB\-dv\fR] \fBsource\fR [\-\-list] |
| 28 | +.fi |
| 29 | +.sp |
| 30 | +.nf |
| 31 | +\fBport\fR [\fB\-dv\fR] \fBsudo\fR \fBsource\fR \fB\-\-add\fR [\fB\-\-first\fR] [\fB\-\-no\-sync\fR] \fIurl\fR |
| 32 | +.fi |
| 33 | +.sp |
| 34 | +.nf |
| 35 | +\fBport\fR [\fB\-dv\fR] \fBsudo\fR \fBsource\fR \fB\-\-remove\fR \fIurl\fR |
| 36 | +.fi |
| 37 | +.SH "DESCRIPTION" |
| 38 | +.sp |
| 39 | +\fBport source\fR manages the list of port tree sources configured in \fBsources.conf\fR(5)\&. Port tree sources tell MacPorts where to find port definitions (Portfiles)\&. |
| 40 | +.sp |
| 41 | +\fBport source\fR has three modes of operation: listing the currently configured sources, adding a new source, and removing an existing source\&. See \fBOPTIONS\fR below for details\&. Changes made by \fB\-\-add\fR and \fB\-\-remove\fR take effect the next time \fBport\fR is invoked\&. |
| 42 | +.sp |
| 43 | +A local directory path beginning with \fI/\fR or \fI~\fR is automatically expanded to a \fIfile://\fR URL by both \fB\-\-add\fR and \fB\-\-remove\fR, making it convenient to manage local checkouts of the MacPorts ports tree without needing to type the full \fIfile://\fR URL\&. |
| 44 | +.SH "OPTIONS" |
| 45 | +.PP |
| 46 | +\fB\-\-list\fR |
| 47 | +.RS 4 |
| 48 | +Print the currently configured sources, one per line, in the same format used by |
| 49 | +\fBsources.conf\fR(5)\&. This is the default when no option is given\&. |
| 50 | +.RE |
| 51 | +.PP |
| 52 | +\fB\-\-add\fR [\fB\-\-first\fR] [\fB\-\-no\-sync\fR] \fIurl\fR |
| 53 | +.RS 4 |
| 54 | +Add |
| 55 | +\fIurl\fR |
| 56 | +to the list of port tree sources\&. If |
| 57 | +\fIurl\fR |
| 58 | +begins with |
| 59 | +\fI/\fR |
| 60 | +or |
| 61 | +\fI~\fR, it is interpreted as a local directory path; it will be normalised and prefixed with |
| 62 | +\fIfile://\fR\&. |
| 63 | +.sp |
| 64 | +By default the new source is appended to the end of |
| 65 | +\fBsources.conf\fR(5)\&. Use |
| 66 | +\fB\-\-first\fR |
| 67 | +to insert it before the first existing source entry, which is useful for a local port tree that should shadow the default remote source\&. |
| 68 | +.sp |
| 69 | +Use |
| 70 | +\fB\-\-no\-sync\fR |
| 71 | +to add the |
| 72 | +\fI[nosync]\fR |
| 73 | +flag to the entry, preventing |
| 74 | +\fBport sync\fR |
| 75 | +from attempting to update this source\&. This is recommended for local development checkouts that are managed independently\&. |
| 76 | +.sp |
| 77 | +This command requires write access to |
| 78 | +\fBsources.conf\fR(5) |
| 79 | +and must typically be run with |
| 80 | +\fBsudo\fR\&. |
| 81 | +.RE |
| 82 | +.PP |
| 83 | +\fB\-\-remove\fR \fIurl\fR |
| 84 | +.RS 4 |
| 85 | +Remove the source with the given URL from |
| 86 | +\fBsources.conf\fR(5)\&. If |
| 87 | +\fIurl\fR |
| 88 | +begins with |
| 89 | +\fI/\fR |
| 90 | +or |
| 91 | +\fI~\fR, it is normalised to a |
| 92 | +\fIfile://\fR |
| 93 | +URL in the same way as |
| 94 | +\fB\-\-add\fR\&. Comments and other entries are preserved\&. |
| 95 | +.sp |
| 96 | +This command requires write access to |
| 97 | +\fBsources.conf\fR(5) |
| 98 | +and must typically be run with |
| 99 | +\fBsudo\fR\&. |
| 100 | +.RE |
| 101 | +.SH "GLOBAL OPTIONS" |
| 102 | +.sp |
| 103 | +Please see the section \fBGLOBAL OPTIONS\fR in the \fBport\fR(1) man page for a description of global port options\&. |
| 104 | +.SH "EXAMPLES" |
| 105 | +.sp |
| 106 | +List the currently configured sources: |
| 107 | +.sp |
| 108 | +.if n \{\ |
| 109 | +.RS 4 |
| 110 | +.\} |
| 111 | +.nf |
| 112 | +port source |
| 113 | +.fi |
| 114 | +.if n \{\ |
| 115 | +.RE |
| 116 | +.\} |
| 117 | +.sp |
| 118 | +Add a local checkout of the MacPorts ports tree for Portfile development, placing it first so it shadows the default remote source and marking it so that \fBport sync\fR leaves it alone: |
| 119 | +.sp |
| 120 | +.if n \{\ |
| 121 | +.RS 4 |
| 122 | +.\} |
| 123 | +.nf |
| 124 | +sudo port source \-\-add \-\-first \-\-no\-sync ~/src/macports\-ports |
| 125 | +.fi |
| 126 | +.if n \{\ |
| 127 | +.RE |
| 128 | +.\} |
| 129 | +.sp |
| 130 | +Add a remote rsync source: |
| 131 | +.sp |
| 132 | +.if n \{\ |
| 133 | +.RS 4 |
| 134 | +.\} |
| 135 | +.nf |
| 136 | +sudo port source \-\-add rsync://rsync\&.macports\&.org/macports/release/tarballs/ports\&.tar |
| 137 | +.fi |
| 138 | +.if n \{\ |
| 139 | +.RE |
| 140 | +.\} |
| 141 | +.sp |
| 142 | +Remove a source by path: |
| 143 | +.sp |
| 144 | +.if n \{\ |
| 145 | +.RS 4 |
| 146 | +.\} |
| 147 | +.nf |
| 148 | +sudo port source \-\-remove ~/src/macports\-ports |
| 149 | +.fi |
| 150 | +.if n \{\ |
| 151 | +.RE |
| 152 | +.\} |
| 153 | +.sp |
| 154 | +Remove a source by URL: |
| 155 | +.sp |
| 156 | +.if n \{\ |
| 157 | +.RS 4 |
| 158 | +.\} |
| 159 | +.nf |
| 160 | +sudo port source \-\-remove rsync://rsync\&.macports\&.org/macports/release/tarballs/ports\&.tar |
| 161 | +.fi |
| 162 | +.if n \{\ |
| 163 | +.RE |
| 164 | +.\} |
| 165 | +.SH "SEE ALSO" |
| 166 | +.sp |
| 167 | +\fBport\fR(1), \fBport-sync\fR(1), \fBsources.conf\fR(5) |
| 168 | +.SH "AUTHORS" |
| 169 | +.sp |
| 170 | +.if n \{\ |
| 171 | +.RS 4 |
| 172 | +.\} |
| 173 | +.nf |
| 174 | +(C) 2025 The MacPorts Project |
| 175 | +.fi |
| 176 | +.if n \{\ |
| 177 | +.RE |
| 178 | +.\} |
0 commit comments