On Wed, 15 Nov 2006, Darrin Chandler wrote:

On Wed, Nov 15, 2006 at 08:24:16AM -0500, Marc Ravensbergen wrote:
Hi, is there any way I can find out the entire list of files (and
dependencies) needed before installing a given package? Let's say I
want to add "wget" to openbsd. I export the PKG_PATH to the
appropriate mirror, then type "pkg_add wget". This will do the
installation of wget and all dependencies, but I would like to know
before the actual installation what files are needed (if possible of
course).

My reason for this is so that I can generate a complete list of files
needed to download for a given program, run over to a computer with
high speed, download, run back to my computer, dump the files in the
correct directory (/var/db/pkg) and then install the package.

In this case, wget is very small, but what about Gnome, KDE...

I am thinking of the feature in Synaptic that lets you generate an
installation script; all the files and dependencies needed for a
given package are then saved to a text file as a script.

If this is possible, can somebody let me know?
Thanks,
Marc

There are probably other ways to do this, but the first thing that comes
to mind is to run "pkg_add -nv <package>" which will give you a list of
dependencies. Recurse until done, checking the dependencies so far to
avoid infinite recursion and excessive work.

--
Darrin Chandler            |  Phoenix BSD Users Group
[EMAIL PROTECTED]   |  http://bsd.phoenix.az.us/
http://www.stilyagin.com/  |

I agree pkg_add -nv will give you what you want. Unfortunately for Marc however I do not believe it will do it quickly on a dialup line. In order for pkg_add to determine the dependancies it must download and decompress the packages to get to the files which specify dependancies. It may be better to get ports.tar.gz and use that framework to determine which packages are dependant. Although I don't have a good script to traverse it right off hand. Here is an example output of doing a pkg_add -nv kdebase:

# pkg_add -nv kdebase
Error from ftp://ftp.openbsd.org/pub/OpenBSD/4.0/packages/i386/:
Unknown command.
parsing kdebase-3.5.4
Dependencies for kdebase-3.5.4 resolve to: glib2-2.10.3, qt3-mt-3.5p8, 
libusb-0.1.10ap1, openldap-client-2.3.24, kdelibs-3.5.4, cyrus-sasl-2.1.21p2 
(todo: glib2-2.10.3,libusb-0.1.10ap1,kdelibs-3.5.4,qt3-mt-3.5p8,qt3-mt-3.5p8)
kdebase-3.5.4:parsing glib2-2.10.3
Dependencies for glib2-2.10.3 resolve to: gettext-0.14.5p1, libiconv-1.9.2p3
Pretending to add kdebase-3.5.4:glib2-2.10.3
kdebase-3.5.4:parsing libusb-0.1.10ap1
Pretending to add kdebase-3.5.4:libusb-0.1.10ap1
kdebase-3.5.4:parsing kdelibs-3.5.4
Dependencies for kdelibs-3.5.4 resolve to: arts-1.5.4, OpenEXR-1.2.2p2, 
libart-2.3.17, hicolor-icon-theme-0.5p0, jasper-1.701.0p1, libidn-0.6.1, 
tiff-3.8.2p0, bzip2-1.0.3, qt3-mt-3.5p8, pcre-6.4p1, aspell-0.50.5p4, 
libxslt-1.1.17 (todo: 
libidn-0.6.1,jasper-1.701.0p1,libart-2.3.17,OpenEXR-1.2.2p2,tiff-3.8.2p0,aspell-0.50.5p4,hicolor-icon-theme-0.5p0,arts-1.5.4,qt3-mt-3.5p8,qt3-mt-3.5p8)
kdebase-3.5.4:parsing libidn-0.6.1
Dependencies for libidn-0.6.1 resolve to: gettext-0.14.5p1, libiconv-1.9.2p3
Pretending to add kdebase-3.5.4:libidn-0.6.1
kdebase-3.5.4:parsing jasper-1.701.0p1
Pretending to add kdebase-3.5.4:jasper-1.701.0p1
kdebase-3.5.4:parsing libart-2.3.17
Pretending to add kdebase-3.5.4:libart-2.3.17
kdebase-3.5.4:parsing OpenEXR-1.2.2p2
Pretending to add kdebase-3.5.4:OpenEXR-1.2.2p2
kdebase-3.5.4:parsing tiff-3.8.2p0
Dependencies for tiff-3.8.2p0 resolve to: jpeg-6bp3
Pretending to add kdebase-3.5.4:tiff-3.8.2p0
kdebase-3.5.4:parsing aspell-0.50.5p4
Pretending to add kdebase-3.5.4:aspell-0.50.5p4
kdebase-3.5.4:parsing hicolor-icon-theme-0.5p0
Pretending to add kdebase-3.5.4:hicolor-icon-theme-0.5p0
kdebase-3.5.4:parsing arts-1.5.4
Dependencies for arts-1.5.4 resolve to: glib2-2.10.3, qt3-mt-3.5p8, 
libaudiofile-0.2.6p0, libvorbis-1.1.2p0, libmad-0.15.1bp1, esound-0.2.34p0, 
libogg-1.1.3 (todo: 
esound-0.2.34p0,libmad-0.15.1bp1,libogg-1.1.3,libvorbis-1.1.2p0,libaudiofile-0.2.6p0,qt3-mt-3.5p8,qt3-mt-3.5p8)
kdebase-3.5.4:parsing esound-0.2.34p0
Dependencies for esound-0.2.34p0 resolve to: libaudiofile-0.2.6p0 (todo: 
libaudiofile-0.2.6p0)
kdebase-3.5.4:parsing libaudiofile-0.2.6p0
Pretending to add kdebase-3.5.4:libaudiofile-0.2.6p0
Pretending to add kdebase-3.5.4:esound-0.2.34p0
The file /etc/esd.conf would be installed from 
/usr/local/share/examples/esound/esd.conf
kdebase-3.5.4:parsing libmad-0.15.1bp1
Pretending to add kdebase-3.5.4:libmad-0.15.1bp1
kdebase-3.5.4:parsing libogg-1.1.3
Pretending to add kdebase-3.5.4:libogg-1.1.3
kdebase-3.5.4:parsing libvorbis-1.1.2p0
Dependencies for libvorbis-1.1.2p0 resolve to: libogg-1.1.3
Pretending to add kdebase-3.5.4:libvorbis-1.1.2p0
kdebase-3.5.4:parsing qt3-mt-3.5p8
Dependencies for qt3-mt-3.5p8 resolve to: libmng-1.0.9p1, png-1.2.12 (todo: 
libmng-1.0.9p1)
kdebase-3.5.4:parsing libmng-1.0.9p1
Dependencies for libmng-1.0.9p1 resolve to: lcms-1.15, jpeg-6bp3 (todo: 
lcms-1.15)
kdebase-3.5.4:parsing lcms-1.15
Dependencies for lcms-1.15 resolve to: jpeg-6bp3, tiff-3.8.2p0
Pretending to add kdebase-3.5.4:lcms-1.15
Pretending to add kdebase-3.5.4:libmng-1.0.9p1
found libspec jpeg.62.0 in dependent package jpeg-6bp3
found libspec lcms.1.15 in dependent package lcms-1.15
Pretending to add kdebase-3.5.4:qt3-mt-3.5p8
found libspec iconv.4.0 in dependent package libiconv-1.9.2p3
found libspec intl.3.0 in dependent package gettext-0.14.5p1
found libspec jpeg.62.0 in dependent package jpeg-6bp3
found libspec png.5.1 in dependent package png-1.2.12
Pretending to add kdebase-3.5.4:arts-1.5.4
found libspec audiofile.0.2 in dependent package libaudiofile-0.2.6p0
found libspec esd.2.34 in dependent package esound-0.2.34p0
found libspec glib-2.0.1000.3 in dependent package glib2-2.10.3
found libspec iconv.4.0 in dependent package libiconv-1.9.2p3
found libspec intl.3.0 in dependent package gettext-0.14.5p1
found libspec jpeg.62.0 in dependent package jpeg-6bp3
found libspec mad.2.1 in dependent package libmad-0.15.1bp1
found libspec ogg.5.3 in dependent package libogg-1.1.3
found libspec png.5.1 in dependent package png-1.2.12
found libspec vorbis.5.1 in dependent package libvorbis-1.1.2p0
found libspec xml2.9.3 in dependent package libxml-2.6.26
Pretending to add kdebase-3.5.4:kdelibs-3.5.4
The file /etc/xdg/menus/applications.menu would be installed from 
/usr/local/share/apps/kde-conf-sample/xdg/menus/applications.menu
found libspec Half.3.0 in dependent package OpenEXR-1.2.2p2
found libspec art_lgpl_2.5.17 in dependent package libart-2.3.17
found libspec artsflow.2.0 in dependent package arts-1.5.4
found libspec audiofile.0.2 in dependent package libaudiofile-0.2.6p0
found libspec esd.2.34 in dependent package esound-0.2.34p0
found libspec iconv.4.0 in dependent package libiconv-1.9.2p3
found libspec idn.16.15 in dependent package libidn-0.6.1
found libspec intl.3.0 in dependent package gettext-0.14.5p1
found libspec jpeg.62.0 in dependent package jpeg-6bp3
found libspec mad.2.1 in dependent package libmad-0.15.1bp1
found libspec ogg.5.3 in dependent package libogg-1.1.3
found libspec pcre.1.0 in dependent package pcre-6.4p1
found libspec png.5.1 in dependent package png-1.2.12
found libspec vorbis.5.1 in dependent package libvorbis-1.1.2p0
Pretending to add kdebase-3.5.4
The file /etc/ksysguarddrc would be installed from 
/usr/local/share/apps/kde-conf-sample/ksysguarddrc
The file /etc/xdg/menus/applications-merged/kde-essential.menu would be 
installed from 
/usr/local/share/apps/kde-conf-sample/xdg/menus/applications-merged/kde-essential.menu
The file /etc/xdg/menus/kde-information.menu would be installed from 
/usr/local/share/apps/kde-conf-sample/xdg/menus/kde-information.menu
The file /etc/xdg/menus/kde-screensavers.menu would be installed from 
/usr/local/share/apps/kde-conf-sample/xdg/menus/kde-screensavers.menu
The file /etc/xdg/menus/kde-settings.menu would be installed from 
/usr/local/share/apps/kde-conf-sample/xdg/menus/kde-settings.menu
You may wish to update your font path for /usr/local/share/fonts/override 
/usr/local/share/fonts
/dev/wd0a: 188292454 bytes
--- qt3-mt-3.5p8 -------------------
You may wish to add /usr/local/lib/qt3/man to /etc/man.conf

        -Matt-

Reply via email to