On Sat, Apr 05, 2003 at 12:16:10AM -0600, Stephen Hargrove wrote: > Based on a recent thread on this list, I've constructed the following > bash script: > > #!/bin/sh > # /etc/cron.daily/apt-show-versions: email alerts when new packages > # are available > # > # 2003-03-10, Shaun Crossley, [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > /usr/bin/apt-show-versions -u | /usr/bin/mail -e -s "`/bin/hostname`: > updated packages available" $ADMINMAIL > > I have one machine that _never_ reports any available updates, and I > have another machine that _always_ reports available updates -- even > when there are none available. For example, recently I performed: > > # apt-get update > # apt-get upgrade > > And received a response that no updates were available. However, the > script emailed me a list of approximately 50 available updates in the > form of: > > dnsutils/testing upgradeable from 1:9.2.1-4 to 1:9.2.2-2 > ksirc 4:2.2.2-14.6 newer than version in archive > khexedit 4:2.2.2-9.2 newer than version in archive > libpng3/testing upgradeable from 1.2.1-1.1 to 1.2.5-10 > korn 4:2.2.2-14.6 newer than version in archive > etc. > > Am I missing something? I'm sure that I'm doing something wrong, but > I'm not seeing it. Any input would be appreciated.
I'm the author of that snippet of code. I can't tell from what you've quoted, but it looks like you might have an earlier version that omits the "/usr/bin/apt-get update -qq" which runs prior to the apt-show-versions line. Perhaps that's the trouble you're having (in which case I apologize). If apt-get upgrade is not run prior to apt-show-versions you may not get an accurate report of what new packages are available. Or perhaps your problem is related to a similar problem I'm having where I've used pinning, to make apt-get aware of all three versions (stable/testing/unstable). When I apt-get upgrade or apt-get dist-upgrade, it doesn't automatically upgrade those packages I've obtained from testing or unstable. I recall reading that you could only track two versions at once; perhaps I should be using some other method of getting testing packages into my stable systems. Currently, when I find that a testing package has been upgraded, I simply apt-get install -t testing $PACKAGENAME and it gets the upgrade. That's all I've got for now as far as insight -- hope it's of some use. And, thanks for using my script, such as it is! :-) One of these days I intend to figure out how to create an apt repository of my own so that scripts and custom kernel compiles can go there, and I can point people at it if they're interested -- and so that they will obtain the bug-fixes too. -- Shaun Crossley mailto:[EMAIL PROTECTED] http://www.whatever.ca -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]