FAQ

How to use pkgutil in Jumpstart finish script?

From Don Jackson:

There are two tricks:
1) Run every command via "chroot /a"
2) At this point in the boot/installation process, there is no file /a/mnttab, which causes pkgutil to die, so:
cp /etc/mnttab /a/etc/mnttab
…before you start issuing pkgutil commands.
So, my finish script does a pkgadd of pkgutil from a mounted disk, then uses pkgutil to fetch the catalog, and the packages I would like to have installed on my new machine.

How to use my proxy when downloading?

You should set this personally in ~/.wgetrc or globally in /etc/wgetrc (or /etc/opt/csw/wgetrc if you're using wget from OpenCSW). You can also set it in pkgutil.conf by using the wgetopts option.

wgetopts=--execute http_proxy=http://proxy.foo.com

Sometimes during install pkgutil stalls forever (until running out of memory)

Version 1.7 has loop protection so pkgutil exits when this happens

This is due to a fault in the catalog you're using. Blastwave have had a number of issues in their catalogs, both unstable and stable. Some packages have many dependencies while they shouldn't have any, some have dependencies to packages not in the catalog (SUNW for example), and so on. You could help troubleshooting this by following these steps.

Always try updating the catalog to see if there's an updated one that solves your problem.

# pkgutil -U

Try installing again and wait a couple of minutes to see if the problem persists.

# pkgutil -i tnef

If you have to break the command, take a look at the dependencies list for the package you're trying to install.

# grep ^tnef /var/opt/csw/pkgutil/catalog.ftp.df.lth.se_pub_csw_current_sparc_5.9
tnef 1.4.5,REV=2009.04.20 CSWtnef tnef-1.4.5,REV=2009.04.20-SunOS5.8-sparc-CSW.pkg.gz abc8f5184d7cf8d865e5d95cc209c5af 39369 CSWggettextrt|CSWcommon none

The dependencies in the example above are CSWggettextrt and CSWcommon.

Now try to install every dependency one by one.

# pkgutil -i CSWggettextrt

Sooner or later you will get stuck again. Then check the dependencies for that package and repeat. It usually only takes 5-10 minutes to find exactly which package is the problem.

Now report the problem. :-)

When updating all my packages, it's really slow, why?

Version 1.5 is much faster than previous releases, only the most complex packages take more than a few seconds to calculate dependencies for

This is because the dependency list can grow quite long and the recursive algorithm becomes slower the longer the list gets. Try split the update into smaller parts. First find out which packages need updating:

# pkgutil -c | grep -v SAME
package                   installed                 catalog
CSWapache2rt              2.2.10,REV=2008.11.09     2.2.11,REV=2009.02.20
CSWbdb44                  4.4.20,REV=2009.01.13     4.4.20,REV=2007.01.27
CSWclamav                 0.95rc1,REV=2009.03.04    0.95rc1,REV=2009.03.06
CSWcurlrt                 7.19.2,REV=2008.12.31     7.19.3,REV=2009.01.23
CSWggettext               0.14.1,REV=2005.06.29     0.17,REV=2009.02.13
CSWlibclamav              0.95rc1,REV=2009.03.04    0.95rc1,REV=2009.03.06
CSWneon                   0.26.3,REV=2007.11.18     0.28.3,REV=2009.02.15
CSWossl                   0.9.8,REV=2009.01.25_rev=j 0.9.8,REV=2009.01.28_rev=j
CSWossldevel              0.9.8,REV=2009.01.25_rev=j 0.9.8,REV=2009.01.28_rev=j
CSWosslrt                 0.9.8,REV=2009.01.25_rev=j 0.9.8,REV=2009.01.28_rev=j
CSWosslutils              0.9.8,REV=2009.01.25_rev=j 0.9.8,REV=2009.01.28_rev=j
CSWpca                    20081218.01,REV=2008.12.19 20090224.01,REV=2009.02.24
CSWpkgutil                1.4,REV=2009.01.19        1.5b1,REV=2009.03.07
CSWpmlibwww               5.823,REV=2009.01.13      5.825,REV=2009.02.18
CSWreadline               5.2,REV=2009.01.16        6.0,REV=2009.02.22
CSWsqlite3                3.2.2,REV=2005.07.10      3.6.10,REV=2009.03.01
CSWtnef                   1.4.5,REV=2008.11.18      1.4.5,REV=2009.02.16

Then pick a few at a time to upgrade, you will notice that each will finish quickly.

# pkgutil -u CSWapache2rt CSWbdb44 CSWcurlrt CSWggettext
# pkgutil -u  CSWclamav CSWlibclamav CSWneon
# pkgutil -u CSWossl CSWossldevel CSWosslrt CSWosslutils
# pkgutil -u CSWpca CSWpkgutil CSWpmlibwww CSWreadline
# pkgutil -u CSWsqlite3 CSWtnef

This is being addressed now and will be fixed in a future release of pkgutil.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License