>>>> "sb" == SL Baur <steve(a)xemacs.org>
writes:
sb> Um, it appears I've screwed up package-get-base.el in both 21.2-b1 and
sb> this release. Could someone please propose some code to deal with
sb> this file coming from ftp.xemacs.org? The whole XEmacs community will
sb> love you if you do.
This is one of the things i've been puzzling over for a couple days now.
Ideally, you'd like to have a use packages, but it you get wrapped up in
the chicken & egg problem because it has to somehow include itself in the
finished product.
hmm, just had an idea. How about this scenario.
1) generate package-get-base.el as usual, but also make a package out of
it. Actually, I'd put all the package stuff in it. I suspect a lot of
the package issues will be raised up in priority once 21.0 comes out
and it'll be a lot easier if we have a package package.
2) create a secondary .el file, mmm, something like
package-get-base-addendum.el. This file would have the package info
for the package that package-get-base.el & co are in.
3) Now the trick is to get this addendum file to the user. A couple ideas
pop to mind.
*) just have a package-get-addendum function which grabs if via ftp.
This file will be less than 512 bytes, so we don't lose much by just
grabbing it regardless of version.
*) you could also have similar functions that could grab it out of an
email or via http
4) This file would also have a bit a lisp code around it such that when
package-get-base-addendum gets it, it also loads it. This would set
package-get-base to basically just the info for new (or current)
package stuff.
5) Package-get-base-addendum, could then do a package-get on this package
stuff package and load package-get-base.
6) At this point, package updates would proceed as normal.
I've done a meager amount of testing and it looks like this could work.
i built a test package-tools package and generated a test
package-get-base-addendum.el I put these in the anon ftp area on my pc .
i hacked package-get to just pull package-get-addendum and do the
loading. I think it just might work in the real world.
here is the first stab at package-get-addendum
(defun package-get-base-addendum ()
"Testing Testing Testing!"
(interactive)
(let* ((found nil)
(search-dirs package-get-remote)
(filename "package-get-base-addendum.el"))
;; Find the package from search list in package-get-remote
;; and copy it into the staging directory. Then validate
;; the checksum. Finally, install the package.
(while (and search-dirs
(not (file-exists-p (package-get-staging-dir filename))))
(if (file-exists-p (package-get-remote-filename
(car search-dirs) filename))
(copy-file (package-get-remote-filename (car search-dirs) filename)
(package-get-staging-dir filename))
(setq search-dirs (cdr search-dirs))
))
(if (not (file-exists-p (package-get-staging-dir filename)))
(error "Unable to find file %s" filename))
(message "Retrieved package %s" filename) (sit-for 0)
;; now grab the addendum file & eval it
;; This gives us the latest package-get-base info
(load-file (package-get-staging-dir filename))
(setq found t)
(if (and found package-get-remove-copy)
(delete-file (package-get-staging-dir filename)))
)
(package-get 'package-tools nil)
(load "package-get-base")
)
my test package-get-base-addendum.el. yes, I just modified the ldap entry
enough to get it to work. :-)
(setq package-get-base
'((package-tools
(standards-version 1.0
version "1.04"
author-version "1.04"
date "1998-06-30"
build-date "1998-06-30"
maintainer "Oscar Figueiredo <Oscar.Figueiredo(a)epfl.ch>"
distribution stable
priority low
category "comm"
dump nil
description "Emacs Unified Directory Client (LDAP, PH)."
filename "package-tools-1.04-pkg.tar.gz"
md5sum "6c4deffdd01be3b397fb71a5e5544894"
size 37313
provides (package-get package-info packages package-get-base)
requires ()
type regular
))
))
my package-tools pkg was basically just all the package* stuff in our
included lisp dir.
Which brings me to my other point.
I'd would recommend we have a directory called bootstrap in our
xemacs-21.0 source dir. Bootstrap would contain a current version of the
package-tools, efs, and xemacs-base packages. (these are all that's
required right?). These packages could either be installed with the make
install target.
I really think we need to include this capability, otherwise we will be
getting royally flamed by the normal, everyday user who doesn't have any
idea what packages our about. If even some of our beta testers continue
to have problems, I don't think we can expect more out of someone who just
wants a working editor.
Now to see if you love me or hate me. :-D
jeff