summaryrefslogtreecommitdiff
path: root/Master/setuptl/TLPM/blng.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/setuptl/TLPM/blng.pm')
-rw-r--r--Master/setuptl/TLPM/blng.pm36
1 files changed, 36 insertions, 0 deletions
diff --git a/Master/setuptl/TLPM/blng.pm b/Master/setuptl/TLPM/blng.pm
new file mode 100644
index 00000000000..5743fdda2c4
--- /dev/null
+++ b/Master/setuptl/TLPM/blng.pm
@@ -0,0 +1,36 @@
+# This file belongs to TLPM v2.14, TeX Live Package Manager
+# Public Domain, P.Jackowski@gust.org.pl
+
+# blng [-pf] <name>
+# display which package belongs to one given
+
+sub blng
+{
+ my ($arg,$pkg);
+ my $count = 0;
+ local $inclby_method = \&get_pkg_belongs;
+ local $is_method = \&is_pkg;
+ my $pkges = $source_pkges;
+ while(defined($arg = shift))
+ {
+ $arg eq '' and next
+ or &no_opt($arg) and $pkg = $arg
+ or &is_opt($arg,'p','package') and $inclby_method = \&get_pkg_belongs
+ and $is_method = \&is_pkg
+ or &is_opt($arg,'f','file') and $inclby_method = \&get_file_belongs
+ and $is_method = \&is_file
+ or &is_opt($arg,'h','help') and return $heeelp -> ('blng')
+ or &rem_opt($arg) and return $error{'wrong_opt'} -> ($arg,'blng --help');
+ }
+ return $error{'pkg_unspec'} -> () if $pkg eq '';
+ return if &read_source();
+ $is_method -> ($pkg,$pkges) or return $error{'not_found'} -> ($pkg);
+ $mess -> (map {++$count;$_} $inclby_method -> ($pkg,$pkges));
+ $mess -> ("\n");
+ if($tlpm_redir < 2)
+ {
+ $message -> (&one_or_more($count,'parent bundle','parent bundles'));
+ }
+}
+
+1;