# portupgrade, portmaster



## sorciq (Jul 4, 2013)

Hi,

I am using portupgrade. When I run this I have to click a couple of times "enter" to force execution. Also, at this moment:

```
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ...
```

I have to click "enter" because without it, portupgrade does not want to go forward.

Or at the moment:

```
Build complete.
Don't forget to run 'make test'.
```
I also have to click "enter". It is weird! I do not know why. Funny is it? 

portmaster behaves the same way.

portupgrade-2.4.10.6,2
portmaster-3.17
perl-5.14.4


----------



## jozze (Jul 4, 2013)

Which version of FreeBSD are you using?

Also, did you follow the /usr/ports/UPDATING regarding the recent perl and ruby updates?


----------



## sorciq (Jul 4, 2013)

Hi,


```
FreeBSD PiperWWW 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE
```
But everything worked perfectly, a few days ago something happen_ed_. Maybe I up_g_raded some package which is responsible for this.

Regards,
Simon


----------



## jozze (Jul 4, 2013)

What do you mean PRERELEASE? Although could be unrelated, upgrade to a more recent version. There is a FreeBSD 9.1-RELEASE since December 2012, and there's the fourth installment of security patches already (FreeBSD 9.1-RELEASE p4).

Like I said before, it could be due to a ruby or perl upgrade. Did you follow the UPDATING?


----------



## sorciq (Jul 4, 2013)

Yes, I will upgrade this system soon, but at the moment, I have to resolve this problem.
It is very annoying. ;-(

p.


----------



## jozze (Jul 4, 2013)

So ...


			
				jozze said:
			
		

> Like I said before, it could be due to a ruby or perl upgrade. Did you follow the UPDATING?


----------



## sorciq (Jul 4, 2013)

I'm sorry, I have not seen what you write about perl and ruby. I will check this carefully.

Regards,
Simon


----------



## jozze (Jul 4, 2013)

I mean, did you update perl recently? Or ruby? Before updating any packages, check what /usr/ports/UPDATING says about it. It's easy to see which entries are new, because they're timestamped:

Excerpt from UPDATING on perl update:

```
20130612:
  AFFECTS: users of  lang/perl* and any port that depends on it
  AUTHOR: az@FreeBSD.org

  lang/perl5.12 has been upgraded from version 5.12.4 to 5.12.5
  lang/perl5.14 has been upgraded from version 5.14.2 to 5.14.4
  lang/perl5.16 has been upgraded from version 5.16.2 to 5.16.3

  The directory structure where Perl is installed has also been modified:
  "major.minor" is now used instead of "major.minor.patchlevel".

  The "perl-after-upgrade" script has been removed.

  Please rebuild all Perl ports and all ports that depend on it:

  # portmaster -r perl
    or
  # portupgrade -rf perl
    or
  # pkg install -fR perl
```
20130612 means 12th of June, 2013. For starters, the updating process will be annoying, so it's best if you do `# portupgrade -Rfc portupgrade` first, and then follow the UPDATING (on both perl and ruby update).

Also, using an unsupported FreeBSD version is asking for trouble: your base system will work fine even without your ports, but if your base system is broken (or unsupported), your ports are not guaranteed to work, or even build.

If you weren't following UPDATING so far, there is a chance that many of your ports are not working properly, and aren't in sync. You could be sitting on a time-bomb, and some day your ports will be broken. If I were you, I'd run `# portupgrade -fca`, to force reinstall of all the ports on your system. You can do this after you upgrade to FreeBSD 9.1-RELEASE.


----------



## wblock@ (Jul 5, 2013)

Please stop using ports-mgmt/portupgrade.  ports-mgmt/portmaster works at least as well, and has no dependencies on other ports.

Please show the contents of /etc/make.conf.

Please also show the exact commands you are entering.


----------



## sorciq (Jul 5, 2013)

Hi,

/etc/make.conf

```
WITHOUT_X11=yes
WITH_NOX11=yes
WITH_REPLACE_BASE=yes
PYTHON_DEFAULT_VERISON=python2.7

# added by use.perl 2013-07-05 00:59:12
PERL_VERSION=5.14.4
```

For example: I put: `portmaster -L <enter>` and nothing, like a freeze, wait and wait ;-). Again "enter" and then it is working immiedietely immediately; portupgrade works in the same way. 

ruby:

```
===>>> ruby-1.8.7.371,1
===>>> ruby-1.9.3.429,1
===>>> ruby18-bdb-0.6.6_1
===>>> ruby19-date2-4.0.19
===>>> ruby19-bdb-0.6.6_1
```

Should I remove _the_ old version? As Jozze suggested:

```
[CMD]# portupgrade -Rfc portupgrade-2.4.10.6,2[/CMD]

[Gathering depends for ports-mgmt/portupgrade .................................... done]
** Duplicated origin - ports-mgmt/portupgrade: ruby18-bdb-0.6.6_1 ruby19-bdb-0.6.6_1
** Run 'pkgdb -F' to interactively fix them.
```

perl: as you see in /etc/make.conf.

Shell: ZSH

Regards,
Simon


----------



## jozze (Jul 5, 2013)

The problem you have is because you didn't follow ruby notice in UPDATING, and now you're with two different origins of ruby. Like your output suggests, run `# pkgdb -F`, to fix the origin. And, please, read portupgrade(1)(), portmaster(8)() and again go through the Handbook. The documentation is there for a reason, and it will save your time, nerves, and your system .

As @wblock suggested, you can use portmaster if you want (it won't give you the ruby error), but seriously see the UPDATING on ruby, especially if you plan on using ports-mgmt/portupgrade . So the relevant part on perl update is in my previous post, and the one on ruby is here.

```
20130527:
  AFFECTS: users of lang/ruby18
  AUTHOR: swills@FreeBSD.org

  The default ruby version has been updated from 1.8 to 1.9. First, stop any
  software that uses ruby. Then, you'll need to rebuild all ports that depend
  on ruby:

  If you use portmaster:
  # portmaster -o lang/ruby19 lang/ruby18
  # portmaster -R -r ruby-1.9

  If you use portupgrade:
  # portupgrade -f lang/ruby18
  # portupgrade -f lang/ruby19 # if you have it installed
  # portupgrade -f ports-mgmt/portupgrade
  # portupgrade -x ruby-1.8.\* -fr lang/ruby18

  After these steps are complete, you can pkg_delete ruby 1.8 if you
  no longer need it.

  If you use pkgng:
  # pkg set -o lang/ruby18:lang/ruby19
  # pkg install -fR lang/ruby19

  If you wish to keep the 1.8 version as default, add the following lines
  to your /etc/make.conf file:

  #
  # Keep ruby 1.8 as default version.
  #
  RUBY_DEFAULT_VER=1.8
```

And last, but not least, if both ports-mgmt/portmaster and ports-mgmt/portupgrade give you the same issues, upgrade your base system first. As @wblock said, portmaster doesn't have any external dependencies, and the fact that it's not working properly indicates something is wrong with your base system.


----------



## wblock@ (Jul 5, 2013)

Trying to eliminate as many variables as possible, switch root back to csh(1).  Does that fix the "waiting for enter" problem?


----------

