29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
$NetBSD: patch-library_packaging_pkgin,v 1.3 2015/06/25 13:21:03 jperkin Exp $
|
|
|
|
Fix hardcoded paths to be replaced with SUBST framework.
|
|
Handle newer pkgin non-tty ';' delimited output.
|
|
|
|
--- library/packaging/pkgin.orig 2014-07-25 20:48:49.000000000 +0000
|
|
+++ library/packaging/pkgin
|
|
@@ -87,7 +87,10 @@ def query_package(module, pkgin_path, na
|
|
|
|
# Strip description
|
|
# (results in sth. like 'gcc47-libs-4.7.2nb4')
|
|
- pkgname_with_version = out.split(' ')[0]
|
|
+ if len(out.split(';')) >= 3:
|
|
+ pkgname_with_version = out.split(';')[0]
|
|
+ else:
|
|
+ pkgname_with_version = out.split(' ')[0]
|
|
|
|
# Strip version
|
|
# (results in sth like 'gcc47-libs')
|
|
@@ -150,7 +153,7 @@ def main():
|
|
state = dict(default="present", choices=["present","absent"]),
|
|
name = dict(aliases=["pkg"], required=True)))
|
|
|
|
- pkgin_path = module.get_bin_path('pkgin', True, ['/opt/local/bin'])
|
|
+ pkgin_path = module.get_bin_path('pkgin', True, ['@PREFIX@/bin'])
|
|
|
|
p = module.params
|
|
|