summaryrefslogtreecommitdiff
path: root/net/ocsinventory-agent/patches
diff options
context:
space:
mode:
authorabs <abs>2011-05-22 22:41:09 +0000
committerabs <abs>2011-05-22 22:41:09 +0000
commit198a0050fb949e85f4d94d63ebac6a480f8871c9 (patch)
treec5a716c8a205b3f1276576e510090837b1e69570 /net/ocsinventory-agent/patches
parent3d43d97dc95deaca7d36d34c6f820cf01584246e (diff)
downloadpkgsrc-198a0050fb949e85f4d94d63ebac6a480f8871c9.tar.gz
When reporting packages detected by BSDpkg indicate them as 'BSDpkg' by
default, and 'pkgsrc' if appropriate
Diffstat (limited to 'net/ocsinventory-agent/patches')
-rw-r--r--net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm26
1 files changed, 26 insertions, 0 deletions
diff --git a/net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm b/net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm
new file mode 100644
index 00000000000..bc03945a3ba
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm
@@ -0,0 +1,26 @@
+$NetBSD: patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm,v 1.1 2011/05/22 22:41:09 abs Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/BSDpkg.pm.orig 2010-10-12 18:02:53.000000000 +0000
++++ lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/BSDpkg.pm
+@@ -6,6 +6,11 @@ sub run {
+ my $params = shift;
+ my $inventory = $params->{inventory};
+
++ my $from = 'BSDpkg';
++ if (can_run("pkg_admin") && `pkg_admin config-var PKG_REFCOUNT_DBDIR` =~ m{^/}) {
++ $from = 'pkgsrc';
++ }
++
+ foreach(`pkg_info`){
+ /^(\S+)-(\d+\S*)\s+(.*)/;
+ my $name = $1;
+@@ -15,7 +20,8 @@ sub run {
+ $inventory->addSoftware({
+ 'COMMENTS' => $comments,
+ 'NAME' => $name,
+- 'VERSION' => $version
++ 'VERSION' => $version,
++ 'FROM' => $from
+ });
+ }
+ }