diff-ing back moonbase module updates into zlocal

Duncan Gibson duncan.gibson at xs4all.nl
Sun Dec 2 14:31:53 CET 2007


> [...]
> So, I am thinking about a sort of diff-ing back the new foo version
> from the moonbase into my local foo version. I would then manually
> check the differences, and obtain my personal new version without
> breaking the "official" version on the moonbase and at the same time
> saving my valuable system-specific parameters/compilation options, etc.
>
> Is there something like that in Lunar already?
> [...]

Whenever I download a new moonbase, I run "lvu expired" to see what
might need updating, and then check whether the moonbase version of
anything in my zlocal has been updated using the script below. It's
then a simple matter of [tk]diffing the zlocal and moonbase files.
Is this what you are after?

Cheers
Duncan / engelsman

PS. I keep meaning to automate the [tk]diffing part and to look at how
to incorporate this into the coretools to run it as "lvu zlocal"

#!/bin/sh

. /etc/lunar/config

if [[ "${ZLOCAL_OVERRIDES:-off}" != "on" ]] ; then
  echo "ZLOCAL_OVERRIDES != \"on\" so not checking further"
else
  for MODULE in $(list_modules zlocal); do
    ZVERSION="$(installed_version $MODULE)"
    if [ -z "$ZVERSION" ] ; then
      echo "zlocal/$MODULE (not installed!)"
    else
      LINE=$(grep "^$MODULE:" $MODULE_STATUS | awk -F: '{print "ZDATE="$2}')
      eval $LINE
      ZINFO="zlocal/$MODULE ($ZVERSION installed $ZDATE)"
      ZLOCAL_OVERRIDES="off"
      section="$(find_section $MODULE)"
      if [ -z "$section" -o "$section" == "zlocal" ] ; then
        echo "$ZINFO"
      else
        run_details $MODULE > /dev/null
	MINFO="$section/$MODULE ($VERSION updated $UPDATED)"
	if [ "$ZDATE" -lt "$UPDATED" ] ; then
	  echo "$ZINFO  older than  $MINFO"
	else
	  echo "$ZINFO  newer than  $MINFO"
	fi
      fi
      ZLOCAL_OVERRIDES="on"
    fi
  done
fi





More information about the Lunar mailing list