[PATCH 1/5] Fix --import
From: Joachim Breitner <mail@joachim-breitner.de>
Previously, it requered a Package: _and_ a User: field. Now either is
ok, and the checks for Packages are skipped for User: stanzas.
---
bin/wanna-build | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/bin/wanna-build b/bin/wanna-build
index 457ee27..6571b7a 100755
--- a/bin/wanna-build
+++ b/bin/wanna-build
@@ -2090,7 +2090,10 @@ sub check_entry {
return if $op_mode eq "manual-edit"; # no checks then
# check for required fields
- if (!exists $pkg->{'Package'} || !exists $pkg->{'User'}) {
+ if (exists $pkg->{'User'}) {
+ return;
+ }
+ if (!exists $pkg->{'Package'}) {
print STDERR "Bad entry: ",
join( "\n", map { "$_: $pkg->{$_}" } keys %$pkg ), "\n";
die "Database entry lacks Package or User: field\n";
--
1.6.3.3
Reply to: