# 8.3 -- none of port install/upgrading methods work anymore



## drtebi (Mar 31, 2013)

I have been running FreeBSD 8.3 with a minimal amount of ports as a file-server for about a year, and today I wanted to upgrade Perl 5.14 to 5.16 using my usual procedure:

[cmd=]portsnap fetch update[/cmd]
[cmd=]portmanager lang/perl5.16[/cmd]

... and hell broke loose. portmanager failed with errors, any [cmd=]make install clean[/cmd] attempt failed with errors, even `pkg_version` showed errors like this:


```
sedna@drtebi # pkg_version
autoconf                            =
autoconf-wrapper                    =
bsdftpd-ssl-client                  =
cmake                               <
cmake-modules                       <
gettext                             <
gmake                               <
"Makefile", line 27: Malformed conditional (${PORT_OPTIONS:MNLS})
"Makefile", line 45: if-less else
"Makefile", line 47: if-less endif
"Makefile", line 50: warning: duplicate script for target "post-patch" ignored
"/usr/ports/Mk/bsd.port.mk", line 950: Inconsistent operator for check-makefile
"/usr/ports/Mk/bsd.port.mk", line 951: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 952: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1165: Inconsistent operator for check-makefile
"/usr/ports/Mk/bsd.port.mk", line 1166: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1167: warning: duplicate script for target "check-makefile" ignored
[... and so on ...]
```

It's really puzzling me, I searched all over the place and only people with really old versions of FreeBSD appear to have this problem, but my version (8.3) isn't even that old?

I understand that there is a new PKGNG tool, and portmanager is depreciated, but I could not install PKGNG either. I tried to follow the update approach for PKGNG, putting 
	
	



```
WITHOUT_PKGNG=yes
```
 into make.conf, updating outdated ports--but I cannot update anything, I get lots of errors, which appear to be related to bsd.port.mk, for every port. I read through the UPDATING info but could not find a solution there either.

This never happened to me. FreeBSD has always been extremely stable and without issues. I am now afraid to even think about updating my FreeBSD web server!


```
uname -a
FreeBSD sedna 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:23:18 UTC 2012     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```


----------



## kpa (Mar 31, 2013)

Your problem won't be solved by PKGNG, it only deals with packages and their registration to the system. Don't switch to it unless you're sure you need it.

Try updating your ports tree again, the error could be fixed already. It's not too uncommon to have something broken for short periods because of multiple committers working on the ports tree at the same time.


----------



## drtebi (Mar 31, 2013)

Thanks for the reply.

I was hoping that it may be a problem with a broken ports tree. I will report back later with updates...


----------



## SirDice (Apr 2, 2013)

drtebi said:
			
		

> I have been running FreeBSD 8.3 with a minimal amount of ports as a file-server for about a year, and today I wanted to upgrade Perl 5.14 to 5.16 using my usual procedure:
> 
> [cmd=]portsnap fetch update[/cmd]
> [cmd=]portmanager lang/perl5.16[/cmd]
> ...


The 'usual' procedure would be:
`# portmanager -o lang/perl5.16 lang/perl5.14`
`# portmaster -r perl-`

See /usr/ports/UPDATING:

```
20120630:
  AFFECTS: users of lang/perl*
  AUTHOR: skv@FreeBSD.org

  lang/perl5.16 is out. If you want to switch to it from, for example
  lang/perl5.12, that is:

  Portupgrade users:
    0) Fix pkgdb.db (for safety):
        pkgdb -Ff

    1) Reinstall new version of Perl (5.16):
        env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.16 -f perl-5.12.\*

    2) Reinstall everything that depends on Perl:
        portupgrade -fr perl

  Portmaster users:
        portmaster -o lang/perl5.16 lang/perl5.12

        Conservative:
        portmaster p5-

        Comprehensive (but perhaps overkill):
        portmaster -r perl-

  Note: If the "perl-" glob matches more than one port you will need to
        specify the name of the Perl directory in /var/db/pkg explicitly.

  The default version for Perl has also been changed from 5.12 to 5.14.
```



> I understand that there is a new PKGNG tool, and portmanager is depreciated


No, this is not the case. PKGNG is specifically for packages, portmanager is specifically for ports.


----------



## drtebi (Apr 2, 2013)

Thank you for the answer.

However, I think you have portmanager and portmaster mixed up. The only port specific script/program I have installed and ever used is portmanager. I have seen the note in UPDATING, but since I wasn't able to use portmaster (I could not install it), it did not help.

Tomorrow I should find the time to update my ports tree; I hope there was something broken in the tree and that I will have more success.

Anyway, thanks for trying to help.


----------



## SirDice (Apr 2, 2013)

drtebi said:
			
		

> However, I think you have portmanager and portmaster mixed up.


Ah, yes. Portmanager really shouldn't be used anymore. It's even been removed from the ports tree.


----------



## drtebi (Apr 2, 2013)

SirDice said:
			
		

> Ah, yes. Portmanager really shouldn't be used anymore. It's even been removed from the ports tree.



Yes, so I have heard. I wish I had known that a year ago, when I decided to use portmanager -- I liked the few dependencies and light-weight package. Now I am a bit disappointed...


----------



## SirDice (Apr 2, 2013)

You're going to like ports-mgmt/portmaster. It has no dependencies at all.


----------



## kpa (Apr 2, 2013)

Portmaster is really amazing piece of software IMHO. You can't live without it if you compile your own ports but don't want to use tools that require jails like ports-mgmt/poudriere (which I used for a while but was an overkill for my own use). Like @SirDice said it has no dependencies at all, it's all written in sh(1).


----------



## drtebi (Apr 3, 2013)

I updated the ports tree again, but something is still broken. It appears that is has something to do with bsd.port.mk, most errors I get originate from that file:


```
$ portsnap fetch update
[...]
$ cd /usr/ports/ports-mgmt/portmaster
$ make
"Makefile", line 29: Malformed conditional (${PORT_OPTIONS:MBASH})
"Makefile", line 32: if-less endif
"Makefile", line 34: Malformed conditional (${PORT_OPTIONS:MZSH})
"Makefile", line 37: if-less endif
"Makefile", line 44: warning: duplicate script for target "do-build" ignored
"Makefile", line 44: warning: duplicate script for target "do-build" ignored
"Makefile", line 47: warning: duplicate script for target "do-install" ignored
"Makefile", line 48: warning: duplicate script for target "do-install" ignored
"Makefile", line 49: warning: duplicate script for target "do-install" ignored
"Makefile", line 52: Malformed conditional (${PORT_OPTIONS:MBASH})
"Makefile", line 53: warning: duplicate script for target "post-install" ignored
"Makefile", line 55: warning: duplicate script for target "post-install" ignored
"Makefile", line 56: if-less endif
"Makefile", line 57: Malformed conditional (${PORT_OPTIONS:MZSH})
"Makefile", line 58: warning: duplicate script for target "post-install" ignored
"Makefile", line 60: warning: duplicate script for target "post-install" ignored
"Makefile", line 61: if-less endif
"Makefile", line 62: warning: duplicate script for target "post-install" ignored
"/usr/ports/Mk/bsd.port.mk", line 950: Inconsistent operator for check-makefile
"/usr/ports/Mk/bsd.port.mk", line 951: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 952: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1165: Inconsistent operator for check-makefile
"/usr/ports/Mk/bsd.port.mk", line 1166: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1167: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1168: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1169: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1393: Inconsistent operator for check-makefile
"/usr/ports/Mk/bsd.port.mk", line 1394: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 1395: warning: duplicate script for target "check-makefile" ignored
"/usr/ports/Mk/bsd.port.mk", line 2443: warning: duplicate script for target "master-sites-ALL" ignored
[...]
```

I tried to rename my ports tree to ports.old and install a fresh one, but that still did not help.

I am really lost here, any help would greatly be appreciated!


----------



## drtebi (Apr 3, 2013)

Good news: I did a third complete rebuild of the ports tree, and so far no errors anymore. Now portmaster is installed and it's time to learn how to use it 

Thanks again for anyone responding to my problem.


----------

