How to tell portmaster a port is updated?

I'm upgrading my server from 10.3 to 11.1, following the instructions at Upgrading Using "FreeBSD Update" where everything went basically by the book right up to "rebuild all third-party applications (e.g., ports installed from the ports tree)."

There are a number of ports that will not build correctly, the latest one I found is devel/binutils where the libiberty.h header file is *SERIOUSLY* broken. I edited the file, built and installed the port, then went back to running [/cmd]portmaster -Raf[/cmd] to build the rest of the ports that need upgrading. The problem is, though, that portmaster immediately went to build devel/binutils, wiping out the file I had just fixed - and putting the port back into an unbuildable condition.

How can I tell portmaster that a port has been upgraded so it leaves it alone?

Code:
checking for working assert macro... In file included from ./cp-demangle.c:138:
./../include/libiberty.h:112:38: error: expected function body after function declarator
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
                                     ^
./../include/libiberty.h:123:45: error: expected function body after function declarator
extern const char *lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
                                            ^
./../include/libiberty.h:128:49: error: yes
expected function bodychecking for wchar.h...  after function declarator
yes
extern const char *dos_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
                                                ^
./../include/libiberty.h:134:50: error: expected function body after function declarator
extern const char *unix_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
                                                 ^
./../include/libiberty.h:144:58: error: expected function body after function declarator
extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
                                                         ^
./../include/libiberty.h:153:68: error: expected function body after function declarator
extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
                                                                   ^
./../include/libiberty.h:166:54: error: expected function body after function declarator
extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
                                                     ^
./../include/libiberty.h:173:47: error: expected function body after function declarator
extern char *concat_copy2 (const char *, ...) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
                                              ^
./../include/libiberty.h:232:41: error: expected function body after function declarator
extern const char *choose_tmpdir (void) ATTRIBUTE_RETURNS_NONNULL;
                                        ^
./../include/libiberty.h:236:55: error: expected function body after function declarator
extern char *choose_temp_base (void) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
                                                      ^
./../include/libiberty.h:266:30: error: expected function body after function declarator
extern char *xstrerror (int) ATTRIBUTE_RETURNS_NONNULL;
                             ^
./../include/libiberty.h:308:48: error: expected function body after function declarator
extern void *xmalloc (size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
                                               ^
./../include/libiberty.h:314:40: error: expected function body after function declarator
extern void *xrealloc (void *, size_t) ATTRIBUTE_RETURNS_NONNULL;
                                       ^
./../include/libiberty.h:319:56: error: expected function body after function declarator
extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
                                                       ^
./../include/libiberty.h:323:54: error: expected function body after function declarator
extern char *xstrdup (const char *) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
                                                     ^
./../include/libiberty.h:327:63: error: expected function body after function declarator
extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
                                                              ^
./../include/libiberty.h:331:70: error: expected function body after function declarator
checking for sys/wait.h that is POSIX.1 compatible... extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
                                                                     ^
./../include/libiberty.h:420:28: error: expected function body after function declarator
                                 const char *tempbase) ATTRIBUTE_RETURNS_NONNULL;
 
I would suggest using packages instead. There's very little to gain by building from ports.
 
I did a make deinstall of devel/binutils followed by pkg install -f binutils. In spite of what I read earlier today, that appeared to have worked correctly. However, when I restarted portmanager, the first thing it did after going through the dependency checks again was start building binutils - precisely what I wanted it to NOT do.

Do I have to delete the distribution files from /usr/ports/distfiles/ to make portmanager stop trying to build it after installing the package?
 
Do I have to delete the distribution files from /usr/ports/distfiles/ to make portmaster(8) stop trying to build it after installing the package?
The port will simply download it again before starting the build.

I would suggest using packages for everything, just run pkg upgrade. And you'll want to check if you're using the quarterly or latest packages. The quarterly packages are only updated once every three months or for security/stability issues.
 
I'm upgrading my server from 10.3 to 11.1, following the instructions at Upgrading Using "FreeBSD Update" where everything went basically by the book right up to "rebuild all third-party applications (e.g., ports installed from the ports tree)."
There's a bit of a problem with that approach, because you'd need to build everything and sometimes that doesn't always work very well.

How did you try to upgrade all your ports? Because if you tried something such as # portmaster -af then that's where the problems probably arised. If you check portmaster(8) you'll find the best recipe for a full installation, which basically boils down to forcefully removing all ports and then re-installing the whole lot.

Thing is: you claim that devel/binutils is at fault but I suspect that this probably caused by stale ports which are still installed. And the reason I say that is because I can easily issue a # make build without any errors, something which would be impossible if there was really something wrong with the port itself.

Which is another suggestion: using a clean building environment, aka a jail. Ports like poudriere use that concept, but it's also very easy to set up yourself.

But I definitely agree with SirDice: you might want to look into using binaries.
 
One wild guess, might it be that the installation cycle of freebsd-update(1) is incomplete? I mean, are you sure that as user root you called freebsd-update install 4 times in total. Anyway, it does not harm to issue freebsd-update install some more times, until it tells you that theres is nothing to install.

PS: It doesn't harm either to verify that your ports tree is up to date, so it would be good to call portsnap fetch update.
 
Back
Top