Bug#586438: update-notifier-common: illegitimate assumption about sources.list

2010-06-19 Thread Julian Andres Klode
On Sa, 2010-06-19 at 20:28 +0200, Toni Mueller wrote:
> Hi,
> 
> On Sat, 19.06.2010 at 20:11:31 +0200, Julian Andres Klode  
> wrote:
> > I couldn't care less about this bug (OK, maybe a bit less is possible),
> > as the functionality causing it is disabled in the version in unstable.
> 
> this would imho be your task, right?
The only one using this script is Ubuntu, we don't use it anymore since
we don't have Ubuntu's update-mot.d infrastructure (#580286). But I'll
fix it in Ubuntu and it might or might not be fixed before Squeeze (as
it's useless for us now, we should drop this file completely).
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.






-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#586438: update-notifier-common: illegitimate assumption about sources.list

2010-06-19 Thread Toni Mueller

Hi,

On Sat, 19.06.2010 at 20:11:31 +0200, Julian Andres Klode  
wrote:
> I couldn't care less about this bug (OK, maybe a bit less is possible),
> as the functionality causing it is disabled in the version in unstable.

this would imho be your task, right?


-- 
Kind regards,
--Toni++




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#586438: update-notifier-common: illegitimate assumption about sources.list

2010-06-19 Thread Julian Andres Klode
On Sa, 2010-06-19 at 19:45 +0200, Toni Mueller wrote:
> Hi,
> 
> On Sat, 19.06.2010 at 16:54:37 +0200, Toni Mueller  wrote:
> > NEED_UPDATE_CHECK=no
> > 
> > for i in /$EtcDir/$SourceList /$EtcDir/${SourceList}.d/*; do
> > test -f $i && NEED_UPDATE_CHECK=yes
> > done
> 
> I suggest the following change instead:
> 
> 
> $ diff -uw update-motd-updates-available 
> /usr/lib/update-notifier/update-motd-updates-available 
> --- update-motd-updates-available   2010-05-05 12:27:47.0 +0200
> +++ /usr/lib/update-notifier/update-motd-updates-available  2010-06-19 
> 18:56:52.0 +0200
> @@ -40,9 +40,17 @@
>  SourceList="sources.list"
>  eval $(apt-config shell EtcDir Dir::Etc)
>  eval $(apt-config shell SourceList Dir::Etc::sourcelist)
> -if [ $(stat -c %Y "/$EtcDir/$SourceList") -gt $stampt ]; then
> +
> +NEED_UPDATE_CHECK=no
> +
> +for i in /$EtcDir/$SourceList /$EtcDir/${SourceList}.d/*; do
> +if [ -f $i ] && [ $(stat -c %Y "$i") -gt $stampt ]; then
>  NEED_UPDATE_CHECK=yes
>  fi
> +done
> +
> +
> +

The whole thing is broken anyway and needs to be reworked. BTW, the
location of sources.list.d is not the location of sources.list
(Dir::Etc::sourcelist) and a '.d', but Dir::Etc::sourceparts.

I couldn't care less about this bug (OK, maybe a bit less is possible),
as the functionality causing it is disabled in the version in unstable.


-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#586438: update-notifier-common: illegitimate assumption about sources.list

2010-06-19 Thread Toni Mueller

Hi,

On Sat, 19.06.2010 at 16:54:37 +0200, Toni Mueller  wrote:
> NEED_UPDATE_CHECK=no
> 
> for i in /$EtcDir/$SourceList /$EtcDir/${SourceList}.d/*; do
>   test -f $i && NEED_UPDATE_CHECK=yes
> done

I suggest the following change instead:


$ diff -uw update-motd-updates-available 
/usr/lib/update-notifier/update-motd-updates-available 
--- update-motd-updates-available   2010-05-05 12:27:47.0 +0200
+++ /usr/lib/update-notifier/update-motd-updates-available  2010-06-19 
18:56:52.0 +0200
@@ -40,9 +40,17 @@
 SourceList="sources.list"
 eval $(apt-config shell EtcDir Dir::Etc)
 eval $(apt-config shell SourceList Dir::Etc::sourcelist)
-if [ $(stat -c %Y "/$EtcDir/$SourceList") -gt $stampt ]; then
+
+NEED_UPDATE_CHECK=no
+
+for i in /$EtcDir/$SourceList /$EtcDir/${SourceList}.d/*; do
+if [ -f $i ] && [ $(stat -c %Y "$i") -gt $stampt ]; then
 NEED_UPDATE_CHECK=yes
 fi
+done
+
+
+
 
 # output something for update-motd
 if [ -n "$NEED_UPDATE_CHECK" ]; then



Kind regards,
--Toni++




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#586438: update-notifier-common: illegitimate assumption about sources.list

2010-06-19 Thread Toni Mueller
Package: update-notifier-common
Version: 0.99.3debian4
Severity: normal
Tags: squeeze sid


Hi,

everytime I log in, I see this:

$ sh   /usr/lib/update-notifier/update-motd-updates-available 
stat: cannot stat `/etc/apt//sources.list': No such file or directory
/usr/lib/update-notifier/update-motd-updates-available: line 43: [: -gt: unary 
operator expected
...


The reason is that I have modularized sources.list into individual
snippets in /etc/apt/sources.list.d, and no /etc/sources.list anymore.
This is to ease adapting to changing network conditions - I can now copy
appropriate snippets to and fro, instead of having to mangle the
sources.list file.

The test in line 43 is too simplistic to catch this case, but I'm
uncertain about what the program should really do. Maybe this:


NEED_UPDATE_CHECK=no

for i in /$EtcDir/$SourceList /$EtcDir/${SourceList}.d/*; do
test -f $i && NEED_UPDATE_CHECK=yes
done


Just a shot into the dark.



Kind regards,
--Toni++



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (250, 'unstable'), (50, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-4-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages update-notifier-common depends on:
ii  python2.5.4-9An interactive high-level object-o
ii  python-apt0.7.95 Python interface to libapt-pkg

Versions of packages update-notifier-common recommends:
pn  cpu-checker(no description available)
ii  libpam-modules1.1.1-3Pluggable Authentication Modules f

update-notifier-common suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org