# Looking for documentation of /var/db/pkgs structure



## thedude (Dec 5, 2010)

Hi, I've searched a bit, but I have not found any documentation regarding the structure of the package database usually found at /var/db/pkg. I would appreciate it if anyone could point me in the right direction.
Thanks


----------



## Beastie (Dec 6, 2010)

It's really simple. There's 1 directory for every package. It contains all the files found in the "root" of the .tbz file, plus (optionally) a +REQUIRED_BY file listing all the packages that need it as a dependency.


----------



## thedude (Dec 6, 2010)

Ya, I understood that much, I guess I should have been more clear, but do you have a reference for the structure of the files contained in each directory. For example, do you have any documentation on what each of @blah keywords in the +CONTENTS file represent and what keywords are available.
Thanks again


----------



## dandelion (Dec 6, 2010)

Have a look at pkg_create(1) and its source code, e.g.
	
	



```
$ man 1 pkg_create
...
     [b]@pkgdep[/b] [i][file]pkgname[/file][/i]
             Declare a dependency on the [i][file]pkgname[/file][/i] package. The [i][file]pkgname[/file][/i] package
             must be installed before this package may be installed, and this
             package must be deinstalled before the [i][file]pkgname[/file][/i] package is deinâ€
             stalled. Multiple [b]@pkgdep[/b] directives may be used if the package
             depends on multiple other packages.
```


----------



## thedude (Dec 6, 2010)

perfect, thank you very much


----------

