Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Port Version via pkg_add

2 views
Skip to first unread message

Jason C. Wells

unread,
Jan 1, 2008, 11:10:12 PM1/1/08
to freebs...@freebsd.org
How does pkg_add determine what version of a port to add when
'pkg_add -Kr' is used? How can I make pkg_add use 6.3 packages instead
of 6.2?

Thanks,
Jason

Jeremy Chadwick

unread,
Jan 2, 2008, 12:19:08 AM1/2/08
to Jason C. Wells, freebs...@freebsd.org
On Tue, Jan 01, 2008 at 08:10:12PM -0800, Jason C. Wells wrote:
> How does pkg_add determine what version of a port to add when
> 'pkg_add -Kr' is used?

pkg_add calls getosreldate(3) to obtain the integer value of the release
of FreeBSD running on the machine.

The list of paths to fetch from are hard-coded based on range
comparisons for the above reldate value. See
src/usr.sbin/pkg_install/add/main.c for a list.

> How can I make pkg_add use 6.3 packages instead of 6.2?

You run pkg_add with a URL that contains "packages-6.3-release" instead
of packages-6.2-release, e.g.:

pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/whatever.tbz

--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

Kris Kennaway

unread,
Jan 2, 2008, 6:29:52 AM1/2/08
to Jeremy Chadwick, Jason C. Wells, freebs...@freebsd.org
Jeremy Chadwick wrote:
> On Tue, Jan 01, 2008 at 08:10:12PM -0800, Jason C. Wells wrote:
>> How does pkg_add determine what version of a port to add when
>> 'pkg_add -Kr' is used?
>
> pkg_add calls getosreldate(3) to obtain the integer value of the release
> of FreeBSD running on the machine.
>
> The list of paths to fetch from are hard-coded based on range
> comparisons for the above reldate value. See
> src/usr.sbin/pkg_install/add/main.c for a list.
>
>> How can I make pkg_add use 6.3 packages instead of 6.2?
>
> You run pkg_add with a URL that contains "packages-6.3-release" instead
> of packages-6.2-release, e.g.:
>
> pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/whatever.tbz
>

Or just set one of the various env variables that controls fetch
location, see the manpage.

Kris

Jason C. Wells

unread,
Jan 5, 2008, 1:33:59 AM1/5/08
to freebs...@freebsd.org

Thank you for the previous replies. Now for a follow up. How do I make
pkg_add -K keep all dependencies as well as the target package listed on
the command line?

For example:

pkg_add -Kr gnash-0.8.1.tbz

... keeps only gnash and none of the other packages that get downloaded.

Thanks,
Jason C. Wells

0 new messages