drpkg

standalone dependency.inc

If anyone is interested - here is a version extracted from svn of dependency.inc. There are example uses in drpkg.

It provides an api to parse and process dependency info - no storage - that is a separate concern. You have a tree walker with callbacks + a bunch of cosmetic functions.

It is generally self-explanatory.

drpkg and relations svn

The bryght repository seems to be down.

So here are the urls to the drpkg and relations svn repositories maintained at MEC by me. I will be syncing them to bryght regularly.

svn://mec0026.engi.cf.ac.uk/relations
svn://mec0026.engi.cf.ac.uk/drpkg

To checkout the relations code do:
svn co svn://mec0026.engi.cf.ac.uk/relations

To checkout the drpkg code do:
svn co svn://mec0026.engi.cf.ac.uk/drpkg

Update: It is back up, but I'll keep both in sync.
Update: repair

drpkg - todo

Install

  1. download - download the packages into the cache diractory
  2. unpack - unpack the selected packages, if not unpacked into the staging area
  3. pre-config - get all required data from the user, either from a kick-start file or from some UI
  4. prepare - copy or link the files from the staging to the vhost directory (including the remote host)
  5. install-db - poll the remote host, to do the database install
  6. post-config - poll the remote host, to do the post-db configuration, based on the pre-config answers

Update

  1. download - downloads PACKAGES from the repconfigured URL
  2. update-cache - updates then local package info cache

Package

  • package - packages the directories specified by a package description
  • package-db - packages the database

Upgrade

  1. download
  2. unpack
  3. pre-config
  4. prepare
  5. update-db - apply the required database updates
  6. post-config

Dist upgrade

  1. changedist - gets the DISTS file
  2. upgrade - same as upgrade

Notes

All this is shamelessly ripped off the supercow powered apt, and twisted a bit to suit Drupal installs

An initial phase runner for drupal install

I uploaded an initial phase runner, drpkg.inc, and an interface to dependency.inc to the bryght svn.

It is a short and self explanatory file.

drpkg_install_exec($packages,$uri) is the thing to be called by installer routines, where $packages is an array of package name and uri should point to a PACKAGES file.

The code assumes that for each package there is a file in modules|themes|theme_engines for each install phase, called package_name.phase, for example relations.install .

Please discuss this in this drupal forum thread

Drupal package management presentation

It was quiet, I wonder why? Nevermind. I'll try and summarise my talk.

The main aim was to describe some of the ideas behind the dependency and installer api we ( Adrian and me) were working for some time on.

drpkg - drupal package manager

drpkg is a package manager for drupal. It is inspired by the Debian's dpkg, hence the name, and apt.

Long term you should be able to update, install, upgrade and clone a drupal setup using the package manager. Maybe more.

At the moment the code is in an early phase. Pre-alpha.

To get a working copy do svn checkout svn://mec0026.engi.cf.ac.uk/drpkg

You can browse the repository using your favourite web browser.

Powered by Drupal, an open source content management system