Compare commits

...

2 Commits

2 changed files with 12 additions and 12 deletions

View File

@ -464,7 +464,6 @@ check_signature() { # called from $PKGMK_ROOT in the case "when"="pre-Pkgfile",
local reqfiles=(Pkgfile); local s=0; local when="$1";
local SIGNIFY_ARGS=(-C -x "$PKGMK_ROOT/.signature")
[ -n "$PKGMK_PUBLICKEY" ] || PKGMK_PUBLICKEY="$(get_repo_key public)"
if [ -f "$PKGMK_ROOT/.signature" ]; then
[ "$when" = "pre-Pkgfile" ] || reqfiles=(.footprint)
while [ "$when" = "pre-build" ] && (( s < ${#_local_[@]} )); do
@ -474,7 +473,8 @@ check_signature() { # called from $PKGMK_ROOT in the case "when"="pre-Pkgfile",
for FILE in "${reqfiles[@]}"; do
[ -e "$FILE" ] || ln -sf "$PKGMK_ROOT/$FILE" .
done
[ -r "$PKGMK_PUBLICKEY" ] && SIGNIFY_ARGS+=(-p "$PKGMK_PUBLICKEY")
[ "$PKGMK_PUBLICKEY" ] && [ -r "$PKGMK_PUBLICKEY" ] && \
SIGNIFY_ARGS+=(-p "$PKGMK_PUBLICKEY")
/usr/bin/signify "${SIGNIFY_ARGS[@]}" "${reqfiles[@]}" 2>&1
else
[ "$when" = "pre-Pkgfile" ] && echo "Pkgfile verification failed"

View File

@ -448,8 +448,8 @@ sub get_pkgfile_fields {
close(ECHO);
}
$Dependencies =~ s/, / /g; $Dependencies =~ s/,/ /g;
$SoftDeps =~ s/, / /g; $SoftDeps =~ s/,/ /g;
$Dependencies =~ s/,(| )/ /g;
$SoftDeps =~ s/,(| )/ /g;
if (shift) {
return $Name, $portpath, $Version, $Release, $descrip, $Dependencies,
$url, $SoftDeps, $maintainer, $readme, $preInstall, $postInstall;
@ -571,9 +571,9 @@ sub list_ports {
if ($subset eq "orphans") {
my %not_orphans = map { $_ => 0 } @searchspace;
foreach my $port (@searchspace) {
map { $not_orphans{$_} = 1 } split(/[ ,]/, $DEPENDS{$port});
map { $not_orphans{$_} = 1 } split(/[ ,]+/, $DEPENDS{$port});
if ($odepends{soft} == 1) {
map { $not_orphans{$_} = 1 } split(/[ ,]/, $SOFTDEPS{$port});
map { $not_orphans{$_} = 1 } split(/[ ,]+/, $SOFTDEPS{$port});
}
}
@found = grep { $not_orphans{$_} eq 0 } keys %V_INST;
@ -599,11 +599,11 @@ sub list_ports {
$ind = ($V_INST{$seed}) ? "[i]" : "[ ]";
print "$ind $seed\n" if ($odepends{tree}==1);
$seen{$seed} = 1;
my @children = ($direction eq "fwd") ? split /[ ,]/, $DEPENDS{$sseed}:
my @children = ($direction eq "fwd") ? split /[ ,]+/, $DEPENDS{$sseed}:
grep { " $DEPENDS{$_} " =~ / $sseed / } @searchspace;
if ($odepends{soft}==1) {
@fosters = ($direction eq "fwd") ?
grep { ($V_INST{$_}) } split /[ ,]/, $SOFTDEPS{$sseed}:
grep { ($V_INST{$_}) } split /[ ,]+/, $SOFTDEPS{$sseed}:
grep { " $SOFTDEPS{$_} " =~ / $sseed / } @searchspace;
}
@ -619,11 +619,11 @@ sub list_ports {
return if (($seen{$s}) and ($odepends{all} !=1));
$seen{$s} = 1;
my %curdeps = ($direction eq "fwd") ?
map {$_ => 0} split /[ ,]/, $DEPENDS{$s} :
map {$_ => 0} split /[ ,]+/, $DEPENDS{$s} :
map {$_ => 0} grep { " $DEPENDS{$_} " =~ / $s / } @searchspace;
if ($odepends{soft} == 1) {
my @optionals = ($direction eq "fwd") ?
grep { ($V_INST{$_}) } split /[ ,]/, $SOFTDEPS{$s} :
grep { ($V_INST{$_}) } split /[ ,]+/, $SOFTDEPS{$s} :
grep { " $SOFTDEPS{$_} " =~ / $s / } @searchspace;
map {$curdeps{$_} = 1} @optionals;
}
@ -717,13 +717,13 @@ sub deporder { # returns a sorted list of packages required.
push(@treewalk, $s); $imark{$s}=1;
# assemble the list of dependencies that must be visited next
%curdeps = map { $_ => $greedy } split /[ ,]/, $DEPENDS{$s};
%curdeps = map { $_ => $greedy } split /[ ,]+/, $DEPENDS{$s};
# if the user toggles --softdeps, consider the optional dependencies
# that are already installed or are given on the command line
if ($odepends{soft} == 1) {
foreach (grep { ($V_INST{$_}) or ($given{$_}) }
split /[ ,]/, $SOFTDEPS{$s}) { $curdeps{$_} = 1; }
split /[ ,]+/, $SOFTDEPS{$s}) { $curdeps{$_} = 1; }
}
foreach my $sd (keys %curdeps) {