Package <n> has no origin recorded

Posted by: Brad Waite

Tagged in: Untagged 

After adding the HighPoint RocketRaid software package to FreeBSD, I'm now getting the following errors whenever I add or delete a package or port:

pkg_add: package hptraidconf-3.2 has no origin recorded
pkg_add: package hptsvr-3.13 has no origin recorded

The "origin" is normally the directory in the ports tree from which the package was built.  However, the 3rd-party HighPoint packages aren't part of the standard FreeBSD ports tree, and so the pkg_* utilities complain about a missing entry in the package database (/var/db/pkg).  Here's the first few lines of the +CONTENTS file in /var/db/pkg/ipmitool-1.8.11:

@comment PKG_FORMAT_REVISION:1.1
@name ipmitool-1.8.11
@comment ORIGIN:sysutils/ipmitool
@cwd /usr/local
bin/ipmitool 

Even though I added impitool with 'pkg_add -r', you can see the ORIGIN is listed as sysutils/ipmitool.

So, how do we fix this?  The 'pkgdb' tool has an option to fix the package database.  pkgdb is part of the portupgrade package, so install that first:

pkg_add -r portupgrade

-OR-

cd /usr/ports/ports-mgmt/portupgrade; make install

Now we can run pkgdb with the -F (fix) option:

# pkgdb -F
---> Checking the package registry database
[Rebuilding the pkgdb in /var/db/pkg ... - 10 packages found (-0 +10) .......... done]
Missing origin: hptraidconf-3.2
[Updating the portsdb in /usr/ports ... - 20037 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000 ..... done]
Skip this for now? [yes] no
Guessing... no idea.
Not in due form :
New origin? (? to help): ?
[Enter] to skip, [Ctrl]+[D] to unregister or deinstall,
[.][Enter] to abort, [Tab] to complete
New origin? (? to help): sysutils/hptraidconf
sysutils/hptraidconf: Not found. Force it? [no] yes
(? hptraidconf-3.2)Fixed. (-> sysutils/hptraidconf)
Missing origin: hptsvr-3.13
Skip this for now? [yes] no
Guessing... no idea.
Not in due form :
New origin? (? to help): sysutils/htpsvr
sysutils/htpsvr: Not found. Force it? [no] yes
(? hptsvr-3.13)Fixed. (-> sysutils/htpsvr)

pkgdb again informs us that there's no origin for hptraidconf and hptsvr and tries to find the proper origin.  Because these packages aren't part of the ports tree, it has "no idea", and asks us to provide one.  I chose to say they were part of the sysutils tree, but it really doesn't matter.  After entering a value, pkgdb warns that it can't find that port so we have to force the origin.

After this, all pkg_* utilities work without complaining.

 

Comments (0)Add Comment

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy