Compare commits

..

2 Commits

Author SHA1 Message Date
79b47c2223 pkg-repgen.pl: sort by date, when multiple versions of a port have been packaged 2023-08-07 08:41:52 -04:00
47ca04508a pkg-get.pl: suppress false warnings
(dependencies might be satisfied using tools other than pkg-get)
2023-08-07 08:40:08 -04:00
2 changed files with 20 additions and 1 deletions

View File

@ -384,6 +384,9 @@ sub getdependencies {
$depstring .= $pkgname;
$deps{$pkgname} = $depstring;
push(@dependencies, $depstring);
} elsif ($installed{$pkgname}) {
$depstring = ($checkver) ? "[i] $pkgname" : $pkgname;
push(@dependencies, $depstring);
} else {
return 0 if ($pkgparent eq "");
$missingdeps{$pkgname} = $pkgparent;

View File

@ -32,13 +32,28 @@ $prtget .= " --no-std-config --config-set=\"prtdir $prtdir\"" if ($prtdir);
my @dirlist = glob("*#*.pkg.tar.$compress");
my @packages; my %isDup;
sub pkg_mtime {
my $aName = $a; my $bName = $b;
my $aTime; my $bTime;
$aName =~ s/#.*//;
$bName =~ s/#.*//;
if ($aName lt $bName) { return -1; }
elsif ($aName gt $bName) { return 1; }
else {
$aTime = (stat $a)[9];
$bTime = (stat $b)[9];
}
if ($aTime le $bTime) { return -1; }
else { return 1; }
}
if ($#ARGV >= 0) { # single packages
foreach my $name (sort @ARGV) {
my @hits = glob("$name#*.pkg.tar.$compress");
push(@packages,@hits);
}
} else {
@packages = @dirlist;
@packages = sort pkg_mtime @dirlist;
%isDup = map { $_ => 0 } @packages;
}
@ -255,6 +270,7 @@ run_script() {
foreach my $name (@dirlist) {
$name =~ s/\#.*//; next if ($seen{$name});
$seen{$name} = 1;
next if (! $path{$name});
if (-f "$path{$name}/README"){
print $fR "##### PKGREADME: $name\n";
open(my $readme, "$path{$name}/README");