Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12e2ccd510 |
@@ -1 +0,0 @@
|
|||||||
*.bak
|
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use v5.10;
|
use v5.10;
|
||||||
no feature "say";
|
no feature "say";
|
||||||
use Storable 'dclone';
|
|
||||||
|
|
||||||
my $profile = $ENV{BUILDER_PROFILE} // 3;
|
my $profile = $ENV{BUILDER_PROFILE} // 3;
|
||||||
my $jobs = $ENV{BUILDER_JOBS} // 1;
|
my $jobs = $ENV{BUILDER_JOBS} // 1;
|
||||||
@@ -92,8 +91,6 @@ sub append_to_file {
|
|||||||
close $fh_a;
|
close $fh_a;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub parse_overlays { map{ $_ =~ s/.*?\:\://g; $_ } @{ dclone(\@_) }; }
|
|
||||||
|
|
||||||
sub add_portage_repository {
|
sub add_portage_repository {
|
||||||
my $repo = $_[0];
|
my $repo = $_[0];
|
||||||
my $reponame;
|
my $reponame;
|
||||||
@@ -309,15 +306,6 @@ sub help {
|
|||||||
|
|
||||||
say "****************************************************";
|
say "****************************************************";
|
||||||
|
|
||||||
my $per_package_useflags;
|
|
||||||
my @packages = @ARGV;
|
|
||||||
my @injected_packages = $build_injected_args ? split( / /, $build_injected_args ) : ();
|
|
||||||
my @parsed_overlays = grep { $_ !~ /gentoo/i } parse_overlays(@packages,@injected_packages);
|
|
||||||
|
|
||||||
say "Detected overlays: @parsed_overlays" if @parsed_overlays;
|
|
||||||
|
|
||||||
@overlays = uniq(@overlays,@parsed_overlays);
|
|
||||||
|
|
||||||
if ( @overlays > 0 ) {
|
if ( @overlays > 0 ) {
|
||||||
say "Overlay(s) to add";
|
say "Overlay(s) to add";
|
||||||
foreach my $overlay (@overlays) {
|
foreach my $overlay (@overlays) {
|
||||||
@@ -478,9 +466,15 @@ if ($use_equo) {
|
|||||||
|
|
||||||
system("cp -rf $make_conf /etc/portage/make.conf") if $make_conf;
|
system("cp -rf $make_conf /etc/portage/make.conf") if $make_conf;
|
||||||
|
|
||||||
if( @injected_packages ) {
|
my $per_package_useflags;
|
||||||
|
my @packages = @ARGV;
|
||||||
|
my @injected_packages = ();
|
||||||
|
if ($build_injected_args) {
|
||||||
|
@injected_packages = split( / /, $build_injected_args );
|
||||||
say "[*] Injected installs:";
|
say "[*] Injected installs:";
|
||||||
|
|
||||||
say "\t* " . $_ for @injected_packages;
|
say "\t* " . $_ for @injected_packages;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Allow users to specify atoms as: media-tv/kodi[-alsa,avahi]
|
# Allow users to specify atoms as: media-tv/kodi[-alsa,avahi]
|
||||||
@@ -555,6 +549,16 @@ if ($use_equo) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $qualityassurance_checks == 1 ) {
|
||||||
|
say "*** Repoman checks ***";
|
||||||
|
for ( @packages, @injected_packages ) {
|
||||||
|
say "*** QA checks for $_";
|
||||||
|
system(
|
||||||
|
"pushd \$(dirname \$(equery which $_ 2>/dev/null)); repoman; popd"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
say "*** Ready to compile, finger crossed ***";
|
say "*** Ready to compile, finger crossed ***";
|
||||||
|
|
||||||
system("emerge --info")
|
system("emerge --info")
|
||||||
@@ -588,16 +592,11 @@ if ( $preserved_rebuild and !$pretend ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $qualityassurance_checks == 1 ) {
|
if ( $qualityassurance_checks == 1 ) {
|
||||||
say "*** Quality assurance ***";
|
say "*** Missing dependencies checks ***";
|
||||||
foreach my $pn ( @packages, @injected_packages ) {
|
for (@packages) {
|
||||||
say ">> Running repoman on $pn";
|
say "*** DEPEND for $_";
|
||||||
system(
|
system("dynlink-scanner $_");
|
||||||
"pushd \$(dirname \$(equery which $pn 2>/dev/null)); repoman; popd"
|
system("depcheck $_");
|
||||||
);
|
|
||||||
$pn =~ s/\:\:.*//g;
|
|
||||||
say ">> Detecting missing dependencies for $pn";
|
|
||||||
system("dynlink-scanner $pn");
|
|
||||||
system("depcheck $pn");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Executable
+84
@@ -0,0 +1,84 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
# This code is licenced GPLv2 or newer.
|
||||||
|
|
||||||
|
use warnings;
|
||||||
|
use strict;
|
||||||
|
use 5.010;
|
||||||
|
|
||||||
|
my $g_thres = shift // 3;
|
||||||
|
|
||||||
|
sub set_atoms {
|
||||||
|
my %atoms = ();
|
||||||
|
my $fh = shift;
|
||||||
|
while (my $line = <$fh>) {
|
||||||
|
chomp $line;
|
||||||
|
my @words = split(' ', $line, 2);
|
||||||
|
next if $words[0] eq "??"; # allow "dangling" files
|
||||||
|
my $what = $words[1];
|
||||||
|
@words = split(m:/:, $what);
|
||||||
|
my $pkg;
|
||||||
|
if (@words >= 2) {
|
||||||
|
$pkg = join("/", @words[0..1]);
|
||||||
|
} else {
|
||||||
|
$pkg = $words[0]
|
||||||
|
}
|
||||||
|
$atoms{$pkg} = 1;
|
||||||
|
}
|
||||||
|
keys %atoms
|
||||||
|
}
|
||||||
|
|
||||||
|
sub num {
|
||||||
|
my $what = shift;
|
||||||
|
my @arr = @_;
|
||||||
|
my $num = 0;
|
||||||
|
for (@arr) {
|
||||||
|
$num++ if index($_, "$what-") == 0
|
||||||
|
}
|
||||||
|
$num
|
||||||
|
}
|
||||||
|
|
||||||
|
sub replace {
|
||||||
|
my $atom = shift;
|
||||||
|
my @arr = @_;
|
||||||
|
my @new_arr;
|
||||||
|
for my $item (@arr) {
|
||||||
|
if( index($item, $atom) == 0 ) {
|
||||||
|
1;
|
||||||
|
} else {
|
||||||
|
push @new_arr, $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
push @new_arr, "$atom*";
|
||||||
|
@new_arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
# try to make (a*, b, c*) from (a-1, a, a-2, b, c, c-1),
|
||||||
|
# for example, if numberOf(/^a-?/) >= $thres
|
||||||
|
sub do_reduce {
|
||||||
|
my $thres = shift;
|
||||||
|
my @atoms = @_;
|
||||||
|
my @processed_atoms = @atoms;
|
||||||
|
for my $atom (@atoms) {
|
||||||
|
@processed_atoms = replace($atom, @processed_atoms)
|
||||||
|
if (num($atom, @processed_atoms) >= $thres);
|
||||||
|
}
|
||||||
|
@processed_atoms
|
||||||
|
}
|
||||||
|
|
||||||
|
#my @atoms = set_atoms(*DATA);
|
||||||
|
my @atoms = set_atoms(*STDIN);
|
||||||
|
@atoms = do_reduce($g_thres, @atoms);
|
||||||
|
say join ",", sort @atoms;
|
||||||
|
|
||||||
|
__DATA__
|
||||||
|
M net-p2p/transmission-base/metadata.xml
|
||||||
|
M net-p2p/transmission-cli/metadata.xml
|
||||||
|
M net-p2p/transmission-daemon/metadata.xml
|
||||||
|
M net-p2p/transmission-gtk/metadata.xml
|
||||||
|
M net-p2p/transmission-qt4/metadata.xml
|
||||||
|
M net-p2p/transmission/metadata.xml
|
||||||
|
M cat/pkg-1
|
||||||
|
M cat/pkg-2
|
||||||
|
M cat/pkg
|
||||||
|
M net-p2p/nic
|
||||||
|
?? betr.pl
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# This code is licenced GPLv2 or newer.
|
||||||
|
|
||||||
|
# An example hook script to prepare the commit log message.
|
||||||
|
# Called by "git commit" with the name of the file that has the
|
||||||
|
# commit message, followed by the description of the commit
|
||||||
|
# message's source. The hook's purpose is to edit the commit
|
||||||
|
# message file. If the hook fails with a non-zero status,
|
||||||
|
# the commit is aborted.
|
||||||
|
|
||||||
|
_out=$(git status -s | overlays-commit-msg.pl)
|
||||||
|
_ver=$(git status -s | sed -rn 's/^[AR] *(.* -> )?.*-([^-]+)\.ebuild$/\2/p' | head -n 1)
|
||||||
|
_bump=${_ver:+version bump to $_ver}
|
||||||
|
|
||||||
|
case $2 in
|
||||||
|
#message)
|
||||||
|
# sed -i -e "1s:^:[$_subdir/$_curdir] :" "$1" ;;
|
||||||
|
"")
|
||||||
|
sed -i -e "1i[$_out] $_bump" "$1" ;;
|
||||||
|
esac
|
||||||
Reference in New Issue
Block a user