Re: [A-A-P-develop] Win32 aap without $HOME doesn't fetch
Brought to you by:
vimboss
From: Bram M. <Br...@mo...> - 2003-03-18 19:10:39
|
Dan Sharp wrote: > Not sure what the correct solution to this should be, but here is the > problem using aap 0.123 on Win2k with ActiveState ActivePython 2.2 > trying to fetch the Vim sources with the recipe from > http://www.a-a-p.org/vim/main.aap: > > I do not have a HOME environment variable defined, so when I open a > regular cmd.exe command prompt and run aap, I get an error like > > Getting Vim version 6.1 using ftp... > Aap: Do not know how to build "patches\6.1.408" > > or if I already have all the patches > > Getting Vim version 6.1 using ftp... > Aap: Error in recipe "c:/documents and settings/administrator/my > documents/vim-src/main.aap" line 56: fetch failed for > "['vim\\main.aap', 'vim\\src\\main.aap', 'vim\\src\\config.aap.in', > 'vim\\src\\mysign', 'vim\\src\\testdir\\main.aap']" > > The problem appears to be that there is no cache directory for saving > downloaded files. Looking in Work.py where $CACHE is built, the only > entry in my cache list is 'AAPDIR/cache'. AAPDIR has been created in > the current directory and contains the logs, but the cache directory is > not created. If I create it myself and rerun the command, it works > correctly (i.e., downloads and applies the patch files). Alternatively, > if I define HOME, it works correctly as well. I'm glad you could track it down this far. The cache directory below $HOME is created automatically. The same should be done for a cache diretory below AAPDIR. Also, instead of using $HOME directly, the synthesized value is to be used. Try this patch (I can't update CVS right now, I'm in the middle of the big change to add scopes): *** Cache.py~ Tue Mar 18 19:49:05 2003 --- Cache.py Tue Mar 18 20:03:33 2003 *************** *** 437,455 **** import random for cachedir in cache_dirlist(recdict): if not os.path.exists(cachedir): ! if not os.environ.has_key("HOME"): ! # Skip cache directory that doesn't exist. ! continue ! l = len(os.environ["HOME"]) ! if len(cachedir) > l and cachedir[:l] == os.environ["HOME"]: ! # Cache dir below the user home directory, try creating it. ! # Skip the directory if creation fails. ! try: ! os.makedirs(cachedir) ! except: ! continue ! else: ! continue # Loop to try different random cache file names. while 1: --- 437,460 ---- import random for cachedir in cache_dirlist(recdict): if not os.path.exists(cachedir): ! # If the name starts with "AAPDIR/" or $HOME may create the ! # directory. ! found = '' ! for name in [ home_dir(), Globals.aap_dirname ]: ! if name: ! l = len(name) ! if (len(cachedir) > l ! and cachedir[:l] == name ! and cachedir[l + 1] in "\\/"): ! found = name ! break ! if not found: ! continue ! # Try creating the directory. When this fails silently skip it. ! try: ! os.makedirs(cachedir) ! except: ! continue # Loop to try different random cache file names. while 1: -- hundred-and-one symptoms of being an internet addict: 116. You are living with your boyfriend who networks your respective computers so you can sit in separate rooms and email each other /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html /// |