Do not use sbuf in pkg_dep and avoid accessors in library

There is no reason to have a buffer here instead of a regular char *