Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jul 2006 04:39:21 -0400
From:      Gerard Seibert <gerard@seibercom.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Portupgrade
Message-ID:  <200607050439.23258.gerard@seibercom.net>
In-Reply-To: <44AB686B.7040003@psam.se>
References:  <20060702205752.89100.qmail@web61016.mail.yahoo.com> <a25afc300607031008j190df67dhea23838ef7e3ff81@mail.gmail.com> <44AB686B.7040003@psam.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 05 July 2006 03:21, Psadi wrote:
> HI
>
> This problem is that the /var/db/pkg/pkgdb.db has been damaged. What you
> need to do is to build a new pkgdb.db file
> First cd /var/db/pkg save the old pkgdb by
> mv pkgdb.db -> pkgdb.old
> then you run pkgdb -u
>
> after that you should be up and running again.
>
> Psadi
>
> jan gestre skrev:
> > On 7/3/06, Bill Moran <wmoran@collaborativefusion.com> wrote:
> >> "E. J. Cerejo" <edu07643@yahoo.com.br> wrote:
> >>
> >>
> >> portupgrade itself I'm getting this message (message bellow) or
> >> similar one
> >> everytime I run one of the portupgrade commands like pkgdb -u or -F,
> >> portversion -L =3D or portupgrade itself. =A0Tells me that the database
> >> needs to
> >> be rebuild, I run portsdb -uU and I get this same error message (messa=
ge
> >> bellow) it rebuilds with portsdb -fuU but still get this same message.
> >>
> >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid
> >> argument;
> >> rebuild needed] [Rebuilding the pkgdb <format:bdb_btree> in
> >> /var/db/pkg ...
> >> [Updating the pkgdb <format:bdb_btree> in /var/db/pkg ...
> >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid
> >> argument;
> >> rebuild needed] [Rebuilding the pkgdb <format:bdb_btree> in
> >> /var/db/pkg ...
> >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid
> >> argument:
> >> Cannot update the pkgdb!]: Cannot update the pkgdb!]
> >>
> >>
> >> When was the last time you did a cvsup?
> >>
> >> Portupgrade was hosed for a few days there, if your ports tree
> >> previously
> >> installed the hosted version, portupgrade won't work.
> >>
> >> If this is the case, the solution is:
> >> 1) cvsup ports
> >> 2) pkg_delete portupgrade
> >> 3) cd /usr/ports/sysutils/portupgrade && make install clean
> >>
> >> Portupgrade will then start working again.
> >>
> >> i always do a cvsup before upgrading the ports but i got the same
> >> problem,
> >
> > pkg_delete did not work coz it can't see the portupgrade version that is
> > installed so i did a make deinstall and make reinstall instead but
> > with the
> > same result, any idea how will i solve this?
=46rom: /usr/ports/UPDATING - THIS MIGHT BE PERTINENT -

20060703:
  AFFECTS: users of sysutils/portupgrade
  AUTHOR: sem@FreeBSD.org

  Because of portupgrade had a bug with detecting of Berkley DB version 2+,
  and a default database now set to use this version you can get portupgrade
  don't work with old databases. A quick fix is removing the databases:
  `rm /var/db/pkg/pkgdb.db /usr/ports/INDEX*.db'. portupgrade will recreate
  them automaticaly. It's absolutely no harm.

  If you don't want remove the databases you should detect what database
  type do you use, and set port options accordly. Follow the instructions:

  - run `pkgdb -fu' *before* upgrading and take a look on the output.
    You can see database format there as: format:XXX, where XXX is your
    current database format.
  - Go to portupgrade port directory and configure the port with
    `make config' command. If you have bdb_* format then turn on BDB4 optio=
n,
    if you have bdb1_* format then turn off BDB4 and turn on BDB1 option.
    If you have dbd_hash format then turn off all option.
  - Upgrade portupgrade.

  Note: if you change database format with changing port options,
  you should remove ruby-bdb* port that you don't need anymore or to hard
  code database format in your pkgtools.conf.


=2D-=20
Gerard Seibert
gerard@seibercom.net

COMPASS [for the CDC-6000 series] is the sort of assembler
one expects from a corporation whose president codes in octal.

	J. N. Gray



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607050439.23258.gerard>