[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Howto Keep a self compiled deb updated



I am running Woody.  Unfortunately, the ldapdns package I am using is
only in Testing/Unstable.  I have no problem downloading and compiling
the deb source package from unstable with a command like:
apt-get source --build ldapdns
(after adding unstable to my /etc/apt/sources.list)

What I am after is some method whereby a cron job can notify me if the
unstable source package for ldapdns has been updated.

I already have a cron job which runs daily to tell me if any woody
binary packages have been updated.  This script is:
-- snip --
# Definitions
APT_GET="/usr/bin/apt-get"
MAIL="/usr/bin/mail"
HOSTNAME="/bin/hostname"
ADMIN="root@localhost"
LOGGER="/usr/bin/logger"

$LOGGER "Checking for updated packages"
$APT_GET clean
$APT_GET update -qq
$APT_GET dist-upgrade -qq -s | $MAIL -e -s \
    "`$HOSTNAME`: Updated packages available" $ADMIN
exit 0
-- end snip --

Is there some command I can add which will check the unstable source
package for ldapdns and email me if it is different to the one I have
already compiled and installed on my system?

I thought of using something like:
apt-get source --print-uris --diff-only ldapdns

To get the uri of the latest source package which I could then use perl
to extract the version number out.

And then something like:
dpkg -s ldapdns | grep Version

To get the version of the currently installed package.  Then again use
perl to extract this version.  Then compare the two.

There must be an easier way though?
I would have thought that this is a fairly common problem since Woody
often doesn't contain that much wanted package which must be compiled
yourself.

Any ideas?

Regards.
Mark.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: