Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 55 lines (35 sloc) 1.01 KB
#!/usr/bin/env perl
use warnings;
use strict;
sub file_packager
my ($file_path) = @_;
my $pacman_out = `pacman -Qo $file_path`;
my ($pkg) = $pacman_out =~ /is owned by (.*)$/;
return $pkg || q{?};
open my $treepipe, "treeldd --path @ARGV |"
or die "Make sure treeldd is installed and in your PATH.\n";
my %owner_of;
while ( <$treepipe> ) {
print, next if ( /[.]{3}$/ || /[*]MISSING[*]/ );
my ($path) = reverse split;
my $pkg = $owner_of{$path} ||= file_packager( $path );
print "$_ ($pkg)\n";
exit 0;
=head1 NAME
Simple sister-script to the treeldd perl script. Lists the pacman package
which owns each library file that is displayed by treeldd.
=head1 SEE ALSO
=head1 AUTHOR
Justin Davis C<< <jrcd83 at gmail dot com> >>
Copyright 2011 Justin Davis, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Something went wrong with that request. Please try again.