My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 64: Need to be able to have tmp folder on other than boot disk - is environment variable used?
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Dec 2008


 
Reported by edbol...@gmail.com, Dec 14, 2008
What steps will reproduce the problem?
1. I have only about 3-5 GB on my MacBook - currently no chance I can make much more room
2. I have an external disk with lots of room and is where I target the final download
3. A Tivo show of about 1 GB (half hour SD) works, but a longer HD one fails.

What is the expected output? What do you see instead?
I expect it to use the external disk. Instead, the /tmp folder gets filled.  I do not know if that can 
be redirected.


What version of the product are you using? On what operating system?
1.6
10.5.5



Please provide any additional information below.
I am downloading the source to see if there is a way to use a designated tmp directory. 
Alternatively, if iTiVo used a sub-folder of /tmp, it perhaps could be soft linked to the other 
disk.  This would be an "expert" option but would halp me a lot.



Dec 14, 2008
#1 edbol...@gmail.com
It appears that /tmp is hardcoded virtually EVERYWHERE!
On the other hand it looks like it is only in Perl scripts.  Replacing it with a variable would be a good start to 
reading a configuration or environment variable.
Why couldn't it be the same place as the final target folder?
Dec 14, 2008
#2 snov...@gmail.com
I take it that originally these were stored in the final target folder, but that caused problems with FileVault.  See 
 Issue 9  -- https://code.google.com/p/itivo/issues/detail?id=9&can=1
Dec 14, 2008
#3 edbol...@gmail.com
Interesting.  In this case, the fix perhaps should be an option of WHERE the temp files should go.  The solution 
for FileVault users appears to "throw out the baby with the bathwater".

I'm not sure if I can scan the subversion tree for the changes needed to "undo" this "fix", but I will see if can be 
done.
Dec 14, 2008
Project Member #4 yoav.yer...@gmail.com
Yeah.. sadly /tmp/ is hardcoded all over the place.. did I mention the codebase is
UGLY?  It was hardcoded to be in the homedir before.. I just moved it to /tmp.. 

  Anyways, you don't want to undo the change (as there's new dependencies for
metadata and whatnot).  However, having an environment variable or .plist config
value that's hidden for most users but available for those who need it would work
(does apple/cocoa have some global tempdir setting?).

  Another option (probably the easiest for me) is to use a subdir in /tmp/... say
/tmp/iTiVo-<user>/
  and put all the tmp files in there.
  Then all you have to do is make /tmp/iTiVo-<user> a symlink into wherever you want
your tempfiles to be...
  Anyways.. marking as enhancement, and hopefully I'll get around to hacking that in
soon...  Damn this code needs a complete re-write in something OTHER than applescript...
Status: Accepted
Labels: -Type-Defect Type-Enhancement
Dec 14, 2008
#5 edbol...@gmail.com
As an experiment (which required my actually downloading the latest developer tools because they were never 
on my laptop! and finding I could actually install them on the external drive, mostly), I did search and replace 
for all of the /tmp in the Perl scripts and replaced with $TmpFolder.  I then put in some code to set it to 
"/tmp" if there was no environment variable (which there isn't ) named TmpFolder.  Perhaps better would have 
been to make that an arg to the scripts, which I think I'll do.
I changed the iTivo.applescript also so that everywhere it used /tmp, it instead used " & TmpFolder & "
I haven't figured out how or where to set TmpFolder to something - it is just /tmp right now!

I built and ran and it worked (after removing the elgato.applescript, which fails since there is no turbo.264 or 
whatever it wanted on my system).

So now that I have a duplicate of the original functions (which I managed to test with a small show), I'll change 
it to /tmp/iTiVo-bolson (hard coded still) and make a link as you suggested.



Dec 14, 2008
Project Member #6 yoav.yer...@gmail.com
Ok I made the lazy change and checked it in..
  If you want to have the tmp files go somewhere other than your main folder, before
you ever start iTiVo, open up a terminal and do (this will put it in the root volume
of your external disk):

  rm -rf /tmp/iTiVo*  
  mkdir /Volumes/<externaldiskname>/iTiVo
  ln -s /Volumes/<externaldiskname>/iTiVo /tmp/iTiVo-<username>

  (replace the <> with correct values).  Reply here if that didnt make sense, but
marking as 'fixed'... 
Status: Fixed
Dec 14, 2008
Project Member #7 yoav.yer...@gmail.com
gah well you're welcome to keep a sepeate source tree (and if any changes you make
are nice and global-friendly.. send em back!)..
  but 1.7b3 actually uses /tmp/iTiVo-<username> so it *should* fix the problem
without needing to keep a seperate source tree..

Dec 14, 2008
#8 edbol...@gmail.com
Hey, no problem.  I didn't expect a fix or change so quickly, and it was fun to figure out a solution.  I'll just 
move my code and download the latest version.

Thanks for looking at it so quickly.

Powered by Google Project Hosting