Subversion Repositories DevTools

Rev

Rev 5710 | Rev 6177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5710 Rev 6133
Line 34... Line 34...
34
my $VERSION = "1.0.0";              # Update this
34
my $VERSION = "1.0.0";              # Update this
35
my $opt_help = 0;
35
my $opt_help = 0;
36
my $opt_verbose = $ENV{'GBE_VERBOSE'};      # Allow global verbose
36
my $opt_verbose = $ENV{'GBE_VERBOSE'};      # Allow global verbose
37
my $opt_sbom_id;
37
my $opt_sbom_id;
38
my $opt_rtag_id;
38
my $opt_rtag_id;
-
 
39
my $opt_skim;
39
my $opt_test = 0;
40
my $opt_test = 0;
40
my $opt_patch = 1;
41
my $opt_patch = 1;
41
my $opt_extract;
42
my $opt_extract;
42
my $opt_rootpkg;
43
my $opt_rootpkg;
43
my $opt_rootpkg_version;
44
my $opt_rootpkg_version;
Line 121... Line 122...
121
                "rootpackage=s"     => \$opt_rootpkg,           # String
122
                "rootpackage=s"     => \$opt_rootpkg,           # String
122
                "ignore=s",         => sub{my ($a,$i) = @_; $ignore{$i} = 0 },
123
                "ignore=s",         => sub{my ($a,$i) = @_; $ignore{$i} = 0 },
123
                "test!"             => \$opt_test,              #[no]flag
124
                "test!"             => \$opt_test,              #[no]flag
124
                "patch!"            => \$opt_patch,             #[no]flag
125
                "patch!"            => \$opt_patch,             #[no]flag
125
                "extract=s"         => \$opt_extract,           # Name of file
126
                "extract=s"         => \$opt_extract,           # Name of file
-
 
127
                "skim!"             => \$opt_skim,              # Skim the packages from a release - do not recurse
126
                );
128
                );
127
 
129
 
128
#
130
#
129
#   Process help and manual options
131
#   Process help and manual options
130
#
132
#
Line 146... Line 148...
146
           "Example: -rtagid=2362, for Sydney R1/R2",
148
           "Example: -rtagid=2362, for Sydney R1/R2",
147
           "Example: -rtagid=8843 -root=StockholmSBOM",
149
           "Example: -rtagid=8843 -root=StockholmSBOM",
148
           "Example: PackageName PackageVersion, for extracting a single package",
150
           "Example: PackageName PackageVersion, for extracting a single package",
149
    )
151
    )
150
}
152
}
-
 
153
if ($opt_skim && ! $opt_rtag_id)
-
 
154
{
-
 
155
    Error ("The skim option only operates with the rtagid option");
-
 
156
}
151
 
157
 
152
#
158
#
153
#   The extract option is special
159
#   The extract option is special
154
#   It places the progam in a different mode
160
#   It places the progam in a different mode
155
#
161
#
Line 235... Line 241...
235
    }
241
    }
236
    else
242
    else
237
    {
243
    {
238
        getPkgDetailsForPVIDs (keys %Release_pvid);
244
        getPkgDetailsForPVIDs (keys %Release_pvid);
239
    }
245
    }
240
    LocateStrays(1);
246
    LocateStrays(1) unless $opt_skim;
241
}
247
}
242
elsif ( $#ARGV >= 1 )
248
elsif ( $#ARGV >= 1 )
243
{
249
{
244
    #
250
    #
245
    #   Locate package and dependents
251
    #   Locate package and dependents
Line 760... Line 766...
760
                    $Package{$name}{$ver}{deployable} = 1 if ($deployable);
766
                    $Package{$name}{$ver}{deployable} = 1 if ($deployable);
761
                    $Package{$name}{$ver}{build}{$build_mach} = $build_info if $build_mach;
767
                    $Package{$name}{$ver}{build}{$build_mach} = $build_info if $build_mach;
762
                    $Package{$name}{$ver}{description} = $description;
768
                    $Package{$name}{$ver}{description} = $description;
763
                    $Package{$name}{$ver}{vcstag} = $vcstag;
769
                    $Package{$name}{$ver}{vcstag} = $vcstag;
764
 
770
 
765
                    GetDepends( $pv_id, $name, $ver );
771
                    GetDepends( $pv_id, $name, $ver ) unless $opt_skim;
766
 
772
 
767
                }
773
                }
768
            }
774
            }
769
            else
775
            else
770
            {
776
            {
Line 1355... Line 1361...
1355
        printf  DP "<dl><dt>$name</a> Versions:<dt>\n";
1361
        printf  DP "<dl><dt>$name</a> Versions:<dt>\n";
1356
 
1362
 
1357
        foreach my $ver ( sort @versions )
1363
        foreach my $ver ( sort @versions )
1358
        {
1364
        {
1359
            my $tag = "${name}_${ver}";
1365
            my $tag = "${name}_${ver}";
1360
            printf  DP "    <dd>";
1366
            print  DP "    <dd>";
1361
            printf  DP "<a href=\"#$tag\">%s&nbsp;%s</a>\n", $name, $ver;
1367
            printf DP "<a href=\"#$tag\">%s&nbsp;%s</a>\n", $name, $ver;
1362
            print   DP " - Not in Release" if ($opt_rtag_id && $Package{$name}{$ver}{stray});
1368
            print  DP " - Not in Release" if ($opt_rtag_id && $Package{$name}{$ver}{stray});
1363
            printf  DP "</dd>\n", $name, $ver;
1369
            print  DP "</dd>\n";
1364
        }
1370
        }
1365
        print DP "</dl>\n";
1371
        print DP "</dl>\n";
1366
        print DP "</td>\n";
1372
        print DP "</td>\n";
1367
        print DP "</tr>\n";
1373
        print DP "</tr>\n";
1368
    }
1374
    }
Line 1488... Line 1494...
1488
 
1494
 
1489
                my $pv_id = $Release{$name}{$ver}{pv_id} || 'No PVID';
1495
                my $pv_id = $Release{$name}{$ver}{pv_id} || 'No PVID';
1490
                my $pv_id_ref = $rm_base . $pv_id . "&rtag_id=" . $opt_rtag_id;
1496
                my $pv_id_ref = $rm_base . $pv_id . "&rtag_id=" . $opt_rtag_id;
1491
                my $pv_id_str = "<a href=\"$pv_id_ref\" TARGET=\"_blank\">$pv_id</a>";
1497
                my $pv_id_str = "<a href=\"$pv_id_ref\" TARGET=\"_blank\">$pv_id</a>";
1492
 
1498
 
1493
                printf  DP "$name $ver ", $name, $ver;
1499
                print DP $name, $ver;
1494
                print DP "</td>\n";
1500
                print DP "</td>\n";
1495
 
1501
 
1496
                print DP $td;
1502
                print DP $td;
1497
                printf DP "Pvid: %s\n", $pv_id_str;
1503
                printf DP "Pvid: %s\n", $pv_id_str;
1498
                print DP "</td>\n";
1504
                print DP "</td>\n";
Line 1900... Line 1906...
1900
    -ignore=name       - Ignore packages with the specified name
1906
    -ignore=name       - Ignore packages with the specified name
1901
    -extract=fname     - Extract files from a previous run
1907
    -extract=fname     - Extract files from a previous run
1902
    -verbose           - Enable verbose output
1908
    -verbose           - Enable verbose output
1903
    -[no]patch         - Ignore/Include patches. Default:Include
1909
    -[no]patch         - Ignore/Include patches. Default:Include
1904
    -[no]test          - Reduced package scanning for test
1910
    -[no]test          - Reduced package scanning for test
-
 
1911
    -[no]skim          - Skim packages from release. Do not extract dependencies
1905
 
1912
 
1906
=head1 OPTIONS
1913
=head1 OPTIONS
1907
 
1914
 
1908
=over 8
1915
=over 8
1909
 
1916
 
Line 1971... Line 1978...
1971
 
1978
 
1972
This option is used for testing. It will only process the first two OS entries
1979
This option is used for testing. It will only process the first two OS entries
1973
in the SBOM. This speeds up processing. It does not generate a complete list of
1980
in the SBOM. This speeds up processing. It does not generate a complete list of
1974
packages.
1981
packages.
1975
 
1982
 
-
 
1983
=item B<-[no]skim>
-
 
1984
 
-
 
1985
This option is only valid with the -rtag option. It will only process the package versions
-
 
1986
specified in the release. It will not locate dependent packages that may be required for 
-
 
1987
pegged packages.
-
 
1988
 
1976
=item B<-verbose>
1989
=item B<-verbose>
1977
 
1990
 
1978
This option will display progress information as the program executes.
1991
This option will display progress information as the program executes.
1979
 
1992
 
1980
=back
1993
=back