ddodds / instadmg

Automatically exported from code.google.com/p/instadmg
0 stars 0 forks source link

cron:ing instaup2date gives curses error #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add instaup2date to root's crontab

What is the expected output? What do you see instead?

Traceback (most recent call last):
 File "./AddOns/InstaUp2Date/instaUp2Date.py", line 12, in <module>
   import Resources.displayTools            as displayTools
 File "/Volumes/Butler HD/Deployment/instadmg-10.6/AddOns/InstaUp2Date/Resources/displayTools.py", line 5, in <module>
   curses.setupterm()
_curses.error: setupterm: could not find terminfo database

What version of InstaDMG are you running? What revision number (this should
be the second line of your package log)?

svn rev 371

What OS are you running on (booted from)?

10.6.4 Server

What OS are you installing?

10.6.4

Please provide any additional information below.

TERM is not set when crontab executes:

butler:butler lits$ unset TERM
butler:butler lits$ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
>>> curses.setupterm()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_curses.error: setupterm: could not find terminfo database
>>> 

Original issue reported on code.google.com by MagerV...@gmail.com on 24 Sep 2010 at 7:20

GoogleCodeExporter commented 8 years ago
And just setting TERM=xterm doesn't fix it (for obvious reasons):

Parsing the catalog files for lits
    Mac OS X 10.6.4 Combo Update
    Remote Desktop Client 3.3.2
    iLife Support 9.0.4
    AirPort Base Station Update 2010-001 5.5.1
    Security Update 2010-005 for SnowLeopard
    Java For MacOS X 10.6 Update 2
    Snow Leopard Graphics Update 1.0
    Security Update 2010-006 for SnowLeopard
    LED Cinema Display Update 1.0
    Safari 5.0.2 SnowLeopard
    iTunes 10.0.1
    Apple Magic Trackpad MultiTouch Update 1.0
    Digital Camera RAW Compatibility Update 3.3

Finding and validating the sources for lits
Traceback (most recent call last):
 File "./AddOns/InstaUp2Date/instaUp2Date.py", line 665, in <module>
   main()
 File "./AddOns/InstaUp2Date/instaUp2Date.py", line 620, in main
   thisController.findItems()
 File "./AddOns/InstaUp2Date/instaUp2Date.py", line 284, in findItems
   progressReporter = displayTools.statusHandler(taskMessage='  ' + thisItem.displayName + ' -')
 File "/Volumes/Butler HD/Deployment/instadmg-10.6/AddOns/InstaUp2Date/Resources/displayTools.py", line 99, in __init__
   self.update(taskMessage=taskMessage, statusMessage=statusMessage, progressTemplate=progressTemplate, value=value, expectedLength=expectedLength)
 File "/Volumes/Butler HD/Deployment/instadmg-10.6/AddOns/InstaUp2Date/Resources/displayTools.py", line 115, in update
   self.outputChannel.seek(-1 * (len(self.lastTaskMessage) + len(self.lastStatusMessage) + len(self.lastProgressMessage)), 1)
IOError: [Errno 29] Illegal seek

Original comment by MagerV...@gmail.com on 30 Sep 2010 at 11:29

GoogleCodeExporter commented 8 years ago
Alright, here's my fugly hack workaround.

Original comment by MagerV...@gmail.com on 30 Sep 2010 at 1:03

Attachments:

GoogleCodeExporter commented 8 years ago
OK, cleaner, but still not there - there is no guarantee that the last update 
has been printed (when running on a tty).

Original comment by MagerV...@gmail.com on 30 Sep 2010 at 3:42

Attachments:

GoogleCodeExporter commented 8 years ago
And now we're getting somewhere.

Original comment by MagerV...@gmail.com on 1 Oct 2010 at 6:08

Attachments:

GoogleCodeExporter commented 8 years ago
Added atexit handler.

Original comment by MagerV...@gmail.com on 1 Oct 2010 at 7:57

Attachments:

GoogleCodeExporter commented 8 years ago
Made curses entirely optional.

Original comment by MagerV...@gmail.com on 3 Oct 2010 at 8:08

Attachments:

GoogleCodeExporter commented 8 years ago
I have tested the "nocurses.patch" on the latest 434 revision and it is 
successfully working with a LaunchDaemon on Mac OS X 10.7.2.

Requesting that this patch be applied to the next 435 revision of instadmg.

Original comment by n8felton on 14 Dec 2011 at 7:42

GoogleCodeExporter commented 8 years ago
Will run tests after applying, if they pass I'll be glad to merge. Thanks for 
your patience!

Allister

Original comment by a...@aru-b.com on 15 Dec 2011 at 7:16

GoogleCodeExporter commented 8 years ago
integrated as of r468. It makes my jenkinsCI work!

Original comment by a...@aru-b.com on 11 Jan 2013 at 3:14