Managing mix of source and binary packages

Background: I'm coming to FreeBSD from ArchLinux, which has a ports-like system (ABS)

I'm using FreeBSD on my server and I'm using PC-BSD's pkgng repository until FreeBSD's comes back online (I assume it's still down?). Since this is a headless server, I don't want X dependencies, so I compile those packages that need them (like avahi-app [dep of Samba]). I realize that I could just not enable X, but I don't see the point of bringing in those deps if I don't need them.

However, when I run pkg upgrade, it tries to reinstall the packages that I've built from source, even though the versions installed from source are the same version or newer. I get output like this:

Code:
$ pkg upgrade
Updating repository catalogue
Upgrades have been requested for the following 19 packages:

    Installing xproto: 7.0.24
    Installing libXdmcp: 1.1.1
    Installing libXau: 1.0.8
    Installing libpthread-stubs: 0.3_3
    Installing kbproto: 1.0.6
    Installing libICE: 1.0.8,1
    Installing jpeg: 8_4
    Installing jbigkit: 1.6
    Installing png: 1.5.17
    Installing cups-client: 1.5.4_1
    Installing libxcb: 1.9.1
    Installing libX11: 1.6.2,1
    Installing libSM: 1.2.2,1
    Reinstalling dbus-1.6.12 (options changed)
    Reinstalling dbus-glib-0.100.2 (direct dependency changed)
    Installing tiff: 4.0.3
    Reinstalling avahi-app-0.6.31 (direct dependency changed)
    Reinstalling links-2.8,1 (options changed)
    Reinstalling samba4-4.0.8 (options changed)
I just ran a portsnap fetch update and portmaster -a, so all ports should be up-to-date.

Why is pkgng trying to update my already up-to-date ports? Is there a way to tell pkgng to ignore source-compiled packages or at least not upgrade things that are already up-to-date? Also, is mixing source and binary packages not recommended?

After a brief search, I didn't see anything obvious about this in the handbook.
 
This recent thread might interest you :)

As a reminder, you should read frequently /usr/ports/UPDATING
% less -p 20130627 /usr/ports/UPDATING
 
I don't think that's it. When I do portmaster -L, it lists all (AFACT) of my ports. I guess I installed pkg from ports because it's newer than the repository version (1.1.4_8 vs 1.1.4_7), at least that's what I get from pkg version and pkg search pkg.

Here's the output of pkg version:

Code:
avahi-app-0.6.31                   =
ca_root_nss-3.15.1_1               =
ccache-3.1.9_3                     =
curl-7.32.0                        =
cvsps-2.1_1                        =
cyrus-sasl-2.1.26_2                =
dbus-1.6.12                        =
dbus-glib-0.100.2                  =
dialog4ports-0.1.5_1               =
en-freebsd-doc-42697,1             =
expat-2.1.0                        =
gamin-0.1.10_6                     =
gdbm-1.10                          =
gettext-0.18.3.1                   =
git-1.8.4                          =
glib-2.36.3                        =
gmp-5.1.3                          =
gnome_subr-1.0                     =
gnomehier-3.0                      =
gnutls-2.12.23_1                   =
go-1.1.2,1                         =
gobject-introspection-1.36.0_2     =
irssi-0.8.15_5                     =
ldb-1.1.16                         =
libdaemon-0.14                     =
libevent-1.4.14b_2                 =
libexecinfo-1.1_3                  =
libffi-3.0.13                      =
libgcrypt-1.5.3                    =
libgpg-error-1.12                  =
libiconv-1.14_1                    =
libinotify-20110829                =
libsunacl-1.0                      =
libtasn1-2.14                      =
libunwind-20121006                 =
libxml2-2.8.0_2                    =
links-2.8,1                        =
nettle-2.7.1                       =
openldap-client-2.4.36             =
p11-kit-0.16.3                     =
p5-Error-0.17021                   =
p5-Net-SMTP-SSL-1.01_1             =
pcre-8.33                          =
perl-5.14.4_2                      =
pkg-1.1.4_8                        =
popt-1.16                          =
portmaster-3.17.2                  =
python-2.7_1,2                     =
python2-2_1                        =
python27-2.7.5_3                   =
rust-0.8                           =
samba-nsupdate-9.8.4.1             =
samba4-4.0.8                       =
sudo-1.8.8                         =
talloc-2.0.8                       =
taskwarrior-2.2.0                  =
tdb-1.2.12,1                       =
tevent-0.9.18                      =
tmux-1.8_1                         =
vim-lite-7.3.1314_2                =
zsh-5.0.2_1                        =

When I do portmaster -a, it tells me all ports are up to date.

I assume that 'options changed' means that the options are not the default, which is true. I don't think I changed the options after I installed the port, but it's a possibility. Could that be part of the issue?
 
I wouldn't do this unless you are using STABLE packages, RELEASE packages mixed with Ports will cause conflicts.
 
I wouldn't do this unless you are using STABLE packages, RELEASE packages mixed with Ports will cause conflicts.

I am running 9.2-RELEASE, and plan to update to 10-RELEASE once it's released. I'd very much prefer to use RELEASE packages, but some things require X that really don't need it. I imagine this could be a PC-BSD thing, since it's targeted at desktops, but since FreeBSD's repos are currently not online, I can't verify that.

Do you by chance know how FreeBSD's ports are built? Does it just use the default config options without any flags set? If so, I'll probably have to go entirely source then.
 
beatgammit said:
I am running 9.2-RELEASE, and plan to update to 10-RELEASE once it's released. I'd very much prefer to use RELEASE packages, but some things require X that really don't need it. I imagine this could be a PC-BSD thing, since it's targeted at desktops, but since FreeBSD's repos are currently not online, I can't verify that.

Do you by chance know how FreeBSD's ports are built? Does it just use the default config options without any flags set? If so, I'll probably have to go entirely source then.

The point is if you start mixing RELEASE packages which are not usually updated, you will inevitably get conflicts from the Ports tree, due to mismatched package versions.

I imagine the packages probably have the same default flags as the ports, though I could be wrong.
 
Don't use the -RELEASE packages, they are created at the time of the release and are never updated.
 
zspider said:
I imagine the packages probably have the same default flags as the ports, though I could be wrong.
Packages are always build using the default port options.
 
If you have a bit of upstream at home you could set up your own repository there and use that to install/upgrade packages on your server. It may be a little slow to download but it should work.
 
Packages are built with the default options and default dependencies but nothing prevents those defaults from changing over time so it's very possible that the newer ports will have conflicting options or dependencies compared to those from a premade repository like the PC-BSD one. The ports/packages system isn't so flexible yet that you could mix and match packages from different sources unfortunately.
 
Alright, thanks for all of the feedback. I've decided to go source only on my -RELEASE server, but maybe use pkgng repositories on my laptop when I get it up and running on -STABLE. I suppose a build night every so often isn't the worst thing in the world.
 
I don't understand why official recommendations tell to not mix ports with PKGNG packages.. With the old binary packages tools, versions of packages were way behind those of the ports, but now, with PKGNG packages being a weekly snapshot of the ports and, thus, being at the same version of their ports counterparts, why would I keep myself from mixing the two? When I migrated to PKGNG, I upgraded all my ports packages with PKGNG and I had only to reinstall from ports packages which had been compiled with non-default options (2 or 3 packages at most). It worked flawlessly. Now, the only thing that bugs me a bit is having to reinstall from ports those packages every time I do a pkg upgrade (because PKGNG wants to reinstall any package which hasn't the default options) but, hey, I can live with that :)
 
Back
Top