jnraine/munkiserver — Issue #124: package view broken after uploading copy_from_dmg item with custom pkginfo file
Author: dayglojesus
Created: 2012-01-16 21:30:26+00:00
State: open

I created a custom pkginfo file for the new version Audacity.

installer_type
copy_from_dmg
installs

CFBundleIdentifier
net.sourceforge.audacity
CFBundleName
Audacity
CFBundleShortVersionString
1.3.14.0
path
/Applications/Audacity/Audacity.app
type
application

items_to_copy

destination_path
/Applications
group
admin
mode
go-w
source_item
Audacity
user
root

name
Audacity
preinstall_script
#!/bin/bash

{
rm -rf /Applications/Audacity
rm -rf /Library/Receipts/Audacity-1.3.13.0.pkg
pkgutil --forget ca.sfu.its.audacity.pkg
} &> /dev/null

exit 0
uninstall_method
remove_copied_items
uninstallable

version
1.3.14.0

The installation works, removal works, but the package cannot be viewed. The package can be edited, but not viewed.
The server log says...

Started GET "/package-dev/packages/Audacity" for redacted at 2012-01-16 13:28:30 -0800
Processing by PackagesController#show as HTML
Parameters: {"unit_shortname"=>"package-dev", "package_branch"=>"Audacity"}
Rendered packages/_record_header.html.erb (17.3ms)
Rendered packages/show.html.erb within layouts/application (23.5ms)
Completed 500 Internal Server Error in 81ms

ActionView::Template::Error (undefined method `<' for nil:NilClass):
64:	Package size
65:	<%= humanize_kilobytes(@package.installer_item_size) %>
66:

67:	<% if !@package.installer_item_size == 0 or @package.installer_item_size < 0 %>
68:

69:	Installed size
70:	<%= humanize_kilobytes(@package.installed_size) %>
app/views/packages/show.html.erb:67:in `_app_views_packages_show_html_erb___3645490799690217461_2212178360_2069702012152338288'
app/controllers/packages_controller.rb:16:in `show'