diff options
author | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
commit | 530a16ec071db0e24e6e949e265a96848864967c (patch) | |
tree | fe40cacd28d67b98186754c551b7fd339ebc7e17 /tools/get-needed-drakx-modules | |
download | drakx-530a16ec071db0e24e6e949e265a96848864967c.tar drakx-530a16ec071db0e24e6e949e265a96848864967c.tar.gz drakx-530a16ec071db0e24e6e949e265a96848864967c.tar.bz2 drakx-530a16ec071db0e24e6e949e265a96848864967c.tar.xz drakx-530a16ec071db0e24e6e949e265a96848864967c.zip |
add mes5-2.6.33 branch
Diffstat (limited to 'tools/get-needed-drakx-modules')
-rwxr-xr-x | tools/get-needed-drakx-modules | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/get-needed-drakx-modules b/tools/get-needed-drakx-modules new file mode 100755 index 000000000..019820c04 --- /dev/null +++ b/tools/get-needed-drakx-modules @@ -0,0 +1,19 @@ +#!/usr/bin/perl + +use MDK::Common; + +my ($rel, $dest, $script) = @ARGV; + +$rel =~ s!/?$!!; + +foreach (`strace -efile perl -cw -I $rel $script 2>&1`) { + my ($f) = /^open\("(.*?)",.*\)\s*=\s*\d+$/ or next; + $f !~ m!/usr/lib/perl5/[^/]*/warnings.pm! or next; + if (begins_with($f, $rel)) { + print $f, "\t", $dest . substr($f, length($rel)), "\n"; + } elsif (begins_with($f, '/dev/')) { + # skip + } elsif (begins_with($f, '/')) { + print "$f\n"; + } +} |