[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Running two releases at once
We've been using both of those solutions at Schlumberger Palo Alto Research,
ever since Release 5, and they work pretty well in combination. (Releases 5
and 7 make me thing there should be three levels of release numbering:
"minor", "major", and "catastrophic".)
We call it #+R6 rather than #+rel6 and have no equivalent to #+rel6,
but it's a good idea to have one macro for "exactly Release 6" and one
for "Release 6 or greater" and I wish we had thought of it.
As for the bin file type, we fixed it locally to use the extension .6BIN
or whatever. (We also made Release 6 accept .5BIN files if they exist,
which may not have been the right thing to do.) We've been doing it this
way for years and it works fine. It was a little inconvenient when
importing or exporting software, until we hit on the idea of having a macro
that suppresses those extensions. Wrapping the macro around
dis:load-distribution-tape causes .BIN files to be loaded as .6BIN files
(or whatever), and wrapping the same macro around dis:write-distribution-tape
causes .6BIN and all other bin files to be dumped as .BIN files. We just
used the same mechanism that translates ".LISP" files to ".l" files when
writing to old UNIX systems.
The code for both hacks follows. To be effective, it should be stored
in the default world at your site.
--Kanef
P.S. We just recently got Release 7 installed and received the documentation.
I haven't started converting code yet and agree that it looks
like a formidable task, but I'm excited about the new features.
Much of this is stuff I've been wishing for for years.
===============================================================================
;;;Make #+R5 etc. work.
;;;(Note that this implementation does not work before Release 6!)
(eval-when (load compile eval)
(loop for release-number from 4 to (si:get-release-version)
for feature = (intern (format nil "R~D" release-number) si:pkg-keyword-package)
do (cl:pushnew feature cl:*features*)))
;;; -*- Mode: LISP; Package: FILE-SYSTEM; Base: 8 -*-
;;This code changes the release-6 system so that BIN files are stored with filetypes
;;of 6BIN instead of BIN, or 6BN instead of BN, etc.
;;We will also look for 5BIN files in preference to BIN. We may want to change this later...
;;The algorithm is:
;; For each type of system, if there is no translation for :BIN, then use (:BIN "6BIN" "5BIN" "BIN"),
;; i.e. write 6BIN files and look for those or for 5BIN or BIN files.
;; If there is already a translation for BIN, then if one of it's members begins with 6 we
;; leave that translation alone. If there isn't such a one, then we look at the prefered translation
;; (e.g. "BN" for UNIX) and put a 6 on the front and stick that at the front of the list.
;; Thus (:UNIX (:BIN "BN" "BIN")) becomes (:UNIX (:BIN "6BN" "5BN" "BN" "BIN"))
(defun add-6-bin-types ()
(loop for entry in fs:*canonical-types-alist*
for (system-type . translations) = entry
for btrans = (assoc ':BIN translations) ;Get (:BIN ... )
doing
(cond ((null btrans) ;Not one there yet?
(push (copylist '(:BIN "6BIN" "5BIN" "BIN"))
(cdr entry))) ;Push it on the front of the translations list
(t ;There is an entry
(unless (loop for type in (cdr btrans) ;Look down the type list
thereis (= (aref type 0) #/6)) ;for a type beginning with 6. If there is one, exit now
(setf (cdr btrans)
(list* (string-append #/6 (second btrans)) ;Put type with a 6 before it
(string-append #/5 (second btrans)) ;then type with a 5
(cdr btrans))) ;And insert this Before the other :BIN translations
)))))
(add-6-bin-types)
(defmacro suppressing-bin-type-hack ((&optional (for-host-type :logical))
&body body)
`(letf (((nth (cl:position :bin (rest1 (assoc ,for-host-type *canonical-types-alist*)) :key 'first)
(rest1 (assoc :LOGICAL *canonical-types-alist*)))
'(:bin "BIN")))
,@body))
#|| ;;;For exporting systems to other sites that do not use this hack, you want to write all the .6BIN files
;;;onto tape as .BIN files. To do this, simply say:
(suppressing-bin-type-hack ()
(dis:write-distribution-tape))
||#
-------