Revision 53107064
Added by Vinicius Coque almost 14 years ago
etc/inc/pkg-utils.inc | ||
---|---|---|
99 | 99 |
* |
100 | 100 |
******/ |
101 | 101 |
function remove_freebsd_package($packagestring) { |
102 |
exec("/usr/local/sbin/pbi_info {$packagestring} | /usr/bin/awk '/Prefix/ {print $2}'",$pbidir); |
|
103 |
$pbidir = $pbidir[0]; |
|
104 |
$linkdirs = array('bin','sbin'); |
|
105 |
foreach($linkdirs as $dir) { |
|
106 |
if(is_dir("{$pbidir}/{$dir}")) { |
|
107 |
file_put_contents('/tmp/vcoque.debug',"{$pbidir}/{$dir}",FILE_APPEND); |
|
108 |
$files = scandir("{$pbidir}/{$dir}"); |
|
109 |
foreach($files as $f) { |
|
110 |
if($f != '.' && $f != '..') { |
|
111 |
unlink("/usr/local/{$dir}/{$f}"); |
|
112 |
} |
|
113 |
} |
|
114 |
} |
|
115 |
} |
|
116 |
|
|
102 | 117 |
exec("/usr/local/sbin/pbi_delete {$packagestring} 2>>/tmp/pbi_delete_errors.txt"); |
103 | 118 |
} |
104 | 119 |
|
Also available in: Unified diff
remove symlinks for PBI binaries