Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 100938 | Differences between
and this patch

Collapse All | Expand All

(-)genlop-0.30.4/genlop (-20 / +10 lines)
Lines 441-450 Link Here
441
                my $handle;
441
                my $handle;
442
                open_file($logfile, \$handle);
442
                open_file($logfile, \$handle);
443
                foreach (<$handle>) {
443
                foreach (<$handle>) {
444
                    if (m/^(.*?)\:  \>\>\> emerge.*?$ebuild_arg.*/) {
444
                    if (m/^(.*?)\:  \>\>\> emerge.*?\/$ebuild_arg-[0-9].*/) {
445
                        $e_start = $1;
445
                        $e_start = $1;
446
                    }
446
                    }
447
                    if (m/^(.*?)\:  ::: completed .*?\) .*$ebuild_arg.* to \//)
447
                    if (m/^(.*?)\:  ::: completed .*?\) .*\/$ebuild_arg-[0-9].* to \//)
448
                    {
448
                    {
449
                        $e_end = $1;
449
                        $e_end = $1;
450
                        $tm_secondi += ($e_end - $e_start);
450
                        $tm_secondi += ($e_end - $e_start);
Lines 498-523 Link Here
498
    # we need to check for it, basically sandboxing is on if
498
    # we need to check for it, basically sandboxing is on if
499
    # FEATURES contains 'sandbox' and does not contain 'userpriv'
499
    # FEATURES contains 'sandbox' and does not contain 'userpriv'
500
    # FEATURES contains 'sandbox' and contains both 'userpriv' and 'usersandbox'
500
    # FEATURES contains 'sandbox' and contains both 'userpriv' and 'usersandbox'
501
    my $FEATURES = qx(/usr/bin/portageq envvar FEATURES);
501
    
502
    if ($FEATURES !~ /sandbox/) {
502
    # 20050815 - JeR: On slow systems, running portageq takes a lot of time,
503
        # that should match usersandbox too :-)
503
    # sometimes enough to miss all the sandbox action completely. Better to
504
        print "It looks like you don't have sandboxing enabled in portage.\n";
504
    # not check for sanity and have users check their FEATURES instead.
505
        print "Please enable it to use the --current option\n";
506
        exit;
507
    }
508
    if ($FEATURES =~ /userpriv/ && $FEATURES !~ /usersandbox/) {
509
        print "It looks like you are using the portage \'userpriv\' FEATURE.\n";
510
        print "If you want to use the --current option you should either:\n";
511
        print "disable \'userpriv\' or add \'usersandbox\'\n";
512
        exit;
513
    }
514
    my @targets      = ();
505
    my @targets      = ();
515
    my @sandbox_pids = qx{ps --no-header -o pid -C sandbox};
506
    my @sandbox_pids = qx{pgrep sandbox};
516
    if (scalar @sandbox_pids == 0) {
507
    if (scalar @sandbox_pids == 0) {
517
        print colored("!!!", $COLORS{'red'});
508
        print colored("!!!", $COLORS{'red'});
518
        print " Error: no working merge found.\n";
509
        print " Error: no working merge found.\n";
519
        print "(the -c option only works if there is"
510
        print "(If you feel this may be in error, please consult the manual.)\n";
520
          ." an ongoing compilation, sorry)\n";
521
        exit;
511
        exit;
522
    }
512
    }
523
    foreach my $pid (@sandbox_pids) {
513
    foreach my $pid (@sandbox_pids) {
Lines 542-553 Link Here
542
            my $handle;
532
            my $handle;
543
            open_file($logfile, \$handle);
533
            open_file($logfile, \$handle);
544
            foreach (<$handle>) {
534
            foreach (<$handle>) {
545
                if (m/^(.*?)\:  \>\>\> emerge .*?\)(.*?\/$ebuild_arg.*?)to \//)
535
                if (m/^(.*?)\:  \>\>\> emerge .*?\)(.*?\/$ebuild_arg-[0-9].*?)to \//)
546
                {
536
                {
547
                    $e_start   = $1;
537
                    $e_start   = $1;
548
                    $e_current = $2;
538
                    $e_current = $2;
549
                }
539
                }
550
                if (m/^(.*?)\:  ::: completed .*?\) .*$ebuild_arg.* to \//) {
540
                if (m/^(.*?)\:  ::: completed .*?\) .*\/$ebuild_arg-[0-9].* to \//) {
551
                    $e_end = $1;
541
                    $e_end = $1;
552
                    $e_count++;
542
                    $e_count++;
553
                    &gtime($e_end - $e_start);
543
                    &gtime($e_end - $e_start);
(-)genlop-0.30.4/genlop.1 (+2 lines)
Lines 168-173 Link Here
168
.br
168
.br
169
Perl module Time::Duration is no longer required since genlop 0.30
169
Perl module Time::Duration is no longer required since genlop 0.30
170
.SH "BUGS"
170
.SH "BUGS"
171
.RB "- The " "--current" " option only works if FEATURES contains 'sandbox' and does not contain 'userpriv', or if FEATURES contains 'sandbox' and 'userpriv' and 'usersandbox'. You can check this by running `portageq envvar FEATURES\' and checking its output."
172
.TP
171
 - definitley too many options !
173
 - definitley too many options !
172
.SH "AUTHORS"
174
.SH "AUTHORS"
173
.LP 
175
.LP 

Return to bug 100938