diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-08-17 11:02:11 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-08-17 11:02:11 +0000 |
commit | f1324c9a45889f6e129505848f717bd233646903 (patch) | |
tree | c5fef9b5c71d973601c36fabd0500f94ec2504cd | |
parent | 13678bfee13793d010c5499840a9222b06ceea08 (diff) |
works better with the actual file.
-rw-r--r-- | usr.sbin/pkg_add/pod/OpenBSD::RequiredBy.pod | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/usr.sbin/pkg_add/pod/OpenBSD::RequiredBy.pod b/usr.sbin/pkg_add/pod/OpenBSD::RequiredBy.pod new file mode 100644 index 00000000000..6eb4d648762 --- /dev/null +++ b/usr.sbin/pkg_add/pod/OpenBSD::RequiredBy.pod @@ -0,0 +1,57 @@ +$OpenBSD: OpenBSD::RequiredBy.pod,v 1.1 2005/08/17 11:02:10 espie Exp $ + +=head1 NAME + +OpenBSD::RequiredBy - manage installed package dependencies + +=head1 SYNOPSIS + + use OpenBSD::RequiredBy; + + + # let's do things for real + our $not = 0; + + my $o = OpenBSD::RequiredBy->new($pkgname); + + my $o2 = OpenBSD::Requiring->new($pkgname); + + print "Requirements for $pkgname are ", join(' ',$o2->list()), "\n"; + + # add some reverse dependencies + $o->add($reverse_dep1, $reverse_dep2); + + # remove some dependency + $o2->delete($dep); + + # forget some cache entry + OpenBSD::RequiredBy->forget(installed_info($pkgname)); + + +=head1 DESCRIPTION + +=for comment should add a reference to L<PackageInfo/installed_info> +when it's documented. + +C<OpenBSD::RequiredBy> handles lists of forward and reverse dependencies +for installed packages. + +If C<$main::not> is true, all change operations are done internally and +never written to disk. + +C<$o = OpenBSD::RequiredBy-E<gt>new($pkgname)> gives access to the reverse +dependencies, +C<$o =OpenBSD::Requiring-E<gt>new($pkgname)> gives access to the forward +dependencies. + +Such an object can be used to list the dependencies C<$o-E<gt>list()>, +add names to them C<$o-E<gt>add(name1, name2,...)> or remove name from +them C<$o-E<gt>delete(name1, name2, ...)>. + +Those lists of dependencies trim duplicates and, unless C<$main::not> is true, +disk files are automatically synchronized whenever the lists change. + +C<OpenBSD::RequiredBy> maintains a cache for efficiency. When an +installed package is deleted completely, +C<OpenBSD::RequiredBy-E<gt>forget($dir)> and +C<OpenBSD::Requiring-E<gt>forget($dir)> will remove the cache entries. |