Removed the "cellname delete \(UNNAMED\)" commands from the
generate_magic.tcl scripts, because this is causing a database
corruption in magic.  This is a "quick fix", as the nature of the
database corruption needs to be investigated.  This fix prevents
apparently unrelated errors in the port indexing in the installed
files in the library mag/ directories.
diff --git a/common/foundry_install.py b/common/foundry_install.py
index 1ee1503..dca4029 100755
--- a/common/foundry_install.py
+++ b/common/foundry_install.py
@@ -1221,7 +1221,6 @@
                 # .mag files from the database.
 
                 print('Creating magic generation script to generate magic database files.') 
-
                 with open(destlibdir + '/generate_magic.tcl', 'w') as ofile:
                     print('#!/usr/bin/env wish', file=ofile)
                     print('#--------------------------------------------', file=ofile)
@@ -1271,6 +1270,7 @@
 
                             leffiles = os.listdir(lefsrclibdir)
                             leffiles = list(item for item in leffiles if os.path.splitext(item)[1] == '.lef')
+                            print('puts stdout "Annotating cells from LEF"', file=ofile)
                             for leffile in leffiles:
                                 print('lef read ' + lefsrclibdir + '/' + leffile, file=ofile)
                      
@@ -1282,11 +1282,17 @@
                                 netdir = slibdir
 
                             # Find CDL/SPICE file names in the source
+                            # Ignore "sources.txt" if it is in the list.
                             netfiles = os.listdir(netdir)
+                            print('puts stdout "Annotating cells from CDL/SPICE"',
+					file=ofile)
                             for netfile in netfiles:
-                                print('readspice ' + netdir + '/' + netfile, file=ofile)
+                                if os.path.split(netfile)[1] != 'sources.txt':
+                                    print('catch {readspice ' + netdir + '/' + netfile
+						+ '}', file=ofile)
 
-                    print('cellname delete \(UNNAMED\)', file=ofile)
+                    # print('cellname delete \(UNNAMED\)', file=ofile)
+                    print('puts stdout "Writing all magic database files"', file=ofile)
                     print('writeall force', file=ofile)
 
                     leffiles = []
@@ -1436,6 +1442,7 @@
                             print('   load ' + lefmacro, file=ofile)
                             print('   lef write ' + lefmacro + ' -hide', file=ofile)
                             print('}', file=ofile)
+
                     print('puts stdout "Done."', file=ofile)
                     print('quit -noprompt', file=ofile)
 
@@ -1648,7 +1655,7 @@
                     # an error message.
                     if len(lefmacros) > 0:
                         print('load ' + lefmacros[0], file=ofile)
-                        print('cellname delete \(UNNAMED\)', file=ofile)
+                        # print('cellname delete \(UNNAMED\)', file=ofile)
                     else:
                         err_no_macros = True
                     print('writeall force', file=ofile)
@@ -1987,7 +1994,7 @@
                 else:
                     gdslibroot = os.path.split(allgdslibname)[1]
                     print('load ' + os.path.splitext(gdslibroot)[0], file=ofile)
-                print('cellname delete \(UNNAMED\)', file=ofile)
+                # print('cellname delete \(UNNAMED\)', file=ofile)
 
                 print('ext2spice lvs', file=ofile)