]> git.pld-linux.org Git - projects/cleanbuild.git/blobdiff - findbr
move ccache to cache dir; fix permission issues and logging
[projects/cleanbuild.git] / findbr
diff --git a/findbr b/findbr
index 9e6fc5fb624e8ac6944250f53bde455af14a80c3..aeea384dc7c3814b85404d55ab7e873ea13301d6 100755 (executable)
--- a/findbr
+++ b/findbr
@@ -4,14 +4,24 @@ use strict;
 use warnings;
 use IPC::Open2;
 use Cwd;
+use constant DOCKER => -e '/.dockerenv';
 
 my $pwd = getcwd();
 # how to run poldek
 my @ignore = qw(vserver-packages python-devel-src);
-my @poldek = (qw(sudo poldek -n th-x86_64-ready), "--cachedir=$pwd/poldekcache",
-       "--skip-installed", "--conf=$pwd/poldekconf/poldek.conf",
+my @poldek;
+if (DOCKER) {
+       push(@poldek, "poldek");
+} else {
+       push(@poldek, qw[sudo poldek -n th-x86_64-ready],
+               "--cachedir=$pwd/poldekcache",
+               "--conf=$pwd/poldekconf/poldek.conf",
+       );
+}
+push(@poldek, (
+       "--skip-installed",
        "-O", "ignore=" . (join " ", @ignore)
-);
+));
 
 # if multiple packages provide some funcionality those will be selected:
 my %preferred = (
@@ -55,7 +65,7 @@ my %skip;
 # for m4 in *.m4; do R=$(rpm -qf $m4); R=${R%-*-*}; \
 #   awk -vr=$R '/^\s*(AC_DEFUN|AU_ALIAS)/ { gsub(/\].*/,""); gsub(/.*\[/,""); print r " " $0}' $m4; \
 # done | sort | awk '{print "\t\"" $2 "\" => \"" $1 "\","}'
-my %ac2br = do "findbr-ac2br";
+my %ac2br = do (DOCKER ? 'cleanbuild/findbr-ac2br' : 'findbr-ac2br');
 
 my %cmake2br = (
        "findkde4:44" => "kde4-kdelibs",
@@ -446,6 +456,9 @@ while ( $_ = shift @lines ) {
                warn "Looking for docbook file $db\n";
                poldek_file( "/usr/share/sgml/*/$db" );
        }
+       if (m{Could not find HTML docbook.xsl}) {
+               add_br("docbook-style-xsl");
+       }
 
        if ( m{LaTeX Error: File `(\S+)' not found} ) {
                my $tex = $1;
@@ -655,6 +668,14 @@ while ( $_ = shift @lines ) {
                        poldek_file( "/usr/bin/$exec", "/bin/$exec" );
                }
        }
+
+
+       if (
+               m{Could not find (\S+)}
+       ) {
+               my $exec = $1;
+               poldek_file("/usr/bin/$exec", "/bin/$exec" );
+       }
 }
 
 
This page took 0.026863 seconds and 4 git commands to generate.