From ccfdd1920f72e52b047f74677eb7730090f8e633 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 25 Jul 2020 17:06:23 +0100 Subject: [PATCH] nailing-cargo: Change read_manifest return convention Now it returns $ws too, which is going to be workspace information. Right now it's just undef, so no functional change. Signed-off-by: Ian Jackson --- nailing-cargo | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nailing-cargo b/nailing-cargo index d18e3ad..dae805c 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -309,7 +309,7 @@ sub read_manifest ($$$) { next; } $manifests{$manifest} = $toml; - return $p; + return ($p, undef); } return undef; } @@ -318,7 +318,8 @@ sub readorigs () { foreach my $p (keys %{ $nail->{packages} }) { my $v = $nail->{packages}{$p}; my $subdir = ref($v) ? $v->{subdir} : $v; - my $gotpackage = read_manifest($subdir, $subdir, "from [packages]") // ''; + my ($gotpackage, $ws) = read_manifest($subdir, $subdir, "from [packages]"); + $gotpackage //= ''; if ($gotpackage ne $p) { print STDERR "$self: warning: honouring Cargo.nail packages.$subdir=$p even though $subdir contains package $gotpackage!\n"; @@ -327,7 +328,7 @@ sub readorigs () { $packagemap{$p} = $subdir; } foreach my $subdir (@{ $nail->{subdirs} }) { - my $gotpackage = read_manifest($subdir, $subdir, "from [subdirs]"); + my ($gotpackage,$ws) = read_manifest($subdir, $subdir, "from [subdirs]"); if (!defined $gotpackage) { print STDERR "$self: warning: ignoring subdir $subdir which has no (suitable) Cargo.toml\n"; -- 2.30.2