forked from pool/obs-service-format_spec_file
- move pkgconfig() and co to the end of the buildrequires
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-format_spec_file?expand=0&rev=29
This commit is contained in:
parent
9174eae526
commit
996a0af0af
@ -1,3 +1,4 @@
|
|||||||
|
SPDX Name in Spec File
|
||||||
AAL AAL
|
AAL AAL
|
||||||
AFL-2.1 Academic Free License 2.1
|
AFL-2.1 Academic Free License 2.1
|
||||||
AGPL-3.0 Affero GPL
|
AGPL-3.0 Affero GPL
|
||||||
@ -288,7 +289,6 @@ MS-PL Ms-Pl
|
|||||||
MS-PL MS-PL
|
MS-PL MS-PL
|
||||||
MS-RL MS-RL
|
MS-RL MS-RL
|
||||||
Multics Multics
|
Multics Multics
|
||||||
SPDX Name in Spec File
|
|
||||||
NASA-1.3 NASA-1.3
|
NASA-1.3 NASA-1.3
|
||||||
Naumen Naumen
|
Naumen Naumen
|
||||||
NCSA NCSA
|
NCSA NCSA
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 7 14:04:46 UTC 2011 - coolo@suse.com
|
||||||
|
|
||||||
|
- move pkgconfig() and co to the end of the buildrequires
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 7 08:22:29 UTC 2011 - coolo@suse.com
|
Wed Dec 7 08:22:29 UTC 2011 - coolo@suse.com
|
||||||
|
|
||||||
|
16
prepare_spec
16
prepare_spec
@ -231,6 +231,18 @@ sub set_current_pkg {
|
|||||||
return ($curpack, $curlang);
|
return ($curpack, $curlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub sort_buildrequires_helper {
|
||||||
|
if (($a =~ /^[^#]*\(/) != ($b =~ /^[^#]*\(/)) {
|
||||||
|
if ($a =~ /^[^#]*\(/) {
|
||||||
|
1;
|
||||||
|
} else {
|
||||||
|
-1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$a cmp $b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub read_and_parse_old_spec {
|
sub read_and_parse_old_spec {
|
||||||
my ( $specfile, $base_package ) = @_;
|
my ( $specfile, $base_package ) = @_;
|
||||||
my $current_package = $base_package;
|
my $current_package = $base_package;
|
||||||
@ -614,9 +626,9 @@ while ($linesmoved) {
|
|||||||
} else {
|
} else {
|
||||||
# if there are already buildrequires, we need to sort and exit
|
# if there are already buildrequires, we need to sort and exit
|
||||||
if (@buildrequires > 0) {
|
if (@buildrequires > 0) {
|
||||||
my @sortedbrs = sort(@buildrequires);
|
my @sortedbrs = sort sort_buildrequires_helper @buildrequires;
|
||||||
$linesmoved = !compare_arrays(\@buildrequires, \@sortedbrs);
|
$linesmoved = !compare_arrays(\@buildrequires, \@sortedbrs);
|
||||||
@oldspec = (@firstlines, sort(@buildrequires), $l, @oldspec);
|
@oldspec = (@firstlines, @sortedbrs, $l, @oldspec);
|
||||||
@firstlines = ();
|
@firstlines = ();
|
||||||
@buildrequires = ();
|
@buildrequires = ();
|
||||||
last;
|
last;
|
||||||
|
Loading…
Reference in New Issue
Block a user