On 5/15/2017 12:20 PM, Ken Brown wrote:
The relevant code is in pkg_pkg.cygpart around lines 149--163,
especially this part:
elif (( pkg_count == 1 ))
then
pkg_contents="*"
else
pkg_contents=
We get here if PKG_CONTENTS is unset or empty. (There's actually no
test to see if it's set but empty.) In the situation under discussion,
this results in pkg_contents="*" followed by a tar error.
Yaakov, shouldn't the user be allowed to explicitly set PKG_CONTENTS
empty and have cygport honor that, at least for obsolete packages?
The attached patch implements this, and not just for obsolete packages.
Ken
From e6c3f77e9b9c2e0767c0c098111531157e639309 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Tue, 16 May 2017 13:46:30 -0400
Subject: [PATCH] Honor the PKG_CONTENTS variable if it is set, even if it is
empty
---
lib/pkg_pkg.cygpart | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index c59b9aa2..5008eadd 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -146,10 +146,10 @@ __pkg_binpkg() {
*) distsubdir=${pkg_name[${n}]} ;;
esac
- if defined ${pkg_contents_var}
+ if [ "${!pkg_contents_var+set}" = "set" ]
then
pkg_contents=${!pkg_contents_var}
- elif defined PKG_CONTENTS[${n}]
+ elif [ "${PKG_CONTENTS[${n}]+set}" = "set" ]
then
pkg_contents=${PKG_CONTENTS[${n}]}
elif [ -f ${C}/${pkg_list[${n}]}.list ]
--
2.12.3