Merge lp:~andersk/update-notifier/lp1200044 into lp:update-notifier/ubuntu
Proposed by
Anders Kaseorg
Status: | Merged |
---|---|
Merged at revision: | 813 |
Proposed branch: | lp:~andersk/update-notifier/lp1200044 |
Merge into: | lp:update-notifier/ubuntu |
Diff against target: |
66 lines (+14/-30) 1 file modified
data/update-motd-updates-available (+14/-30) |
To merge this branch: | bzr merge lp:~andersk/update-notifier/lp1200044 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Pending | ||
Ubuntu Core Development Team | Pending | ||
Review via email: mp+174093@code.launchpad.net |
To post a comment you must log in.
On Thu, Jul 11, 2013 at 02:01:24AM -0000, Anders Kaseorg wrote: /code.launchpad .net/~anders- kaseorg/ update- notifier/ lp1200044/ +merge/ 174093
> You have been requested to review the proposed merge of lp:~anders-kaseorg/update-notifier/lp1200044 into lp:update-notifier.
>
> For more details, see:
> https:/
Thanks for your merge proposal. This looks good, +1 from me.
Cheers,
Michael
> /code.launchpad .net/~anders- kaseorg/ update- notifier/ lp1200044/ +merge/ 174093
> --
> https:/
> You are requested to review the proposed merge of lp:~anders-kaseorg/update-notifier/lp1200044 into lp:update-notifier.
> === modified file 'data/update- motd-updates- available' motd-updates- available 2009-07-13 16:14:27 +0000 motd-updates- available 2013-07-11 01:59:28 +0000 CHECK=yes /var/lib/ update- notifier/ updates- available" "/var/lib/ apt/" $ListDir" CHECK=yes "sources. list" :sourcelist) $SourceList" ) -gt $stampt ]; then :sourcelist) " $ListDir" "/$EtcDir/ $SourceList" -type f -newer "$stamp" -print -quit)" ]; then CHECK=yes UPDATE_ CHECK" ]; then update- notifier/ apt-check --human-readable >> $stamp update- notifier/ apt-check --human-readable >> "$stamp"
> --- data/update-
> +++ data/update-
> @@ -8,48 +8,32 @@
> NEED_UPDATE_
> fi
>
> -# check time when we did the last udpate check
> +# check time when we did the last update check
> stamp="
> -if [ -e "$stamp" ]; then
> - stampt=$(stat -c %Y $stamp)
> -else
> - stampt=0
> -fi
>
> # get list dir
> StateDir=
> ListDir="lists/"
> -eval $(apt-config shell StateDir Dir::State)
> -eval $(apt-config shell ListDir Dir::State::Lists)
> -
> -# check if we have a list file that needs checking
> -d="/$StateDir/
> -for f in $d/*; do
> - # ignore dirs
> - if [ ! -f $f ]; then
> - continue
> - fi
> - t=$(stat -c %Y $f)
> - if [ $t -gt $stampt ]; then
> - NEED_UPDATE_
> - fi
> -done
> -
> -# check if sources.list was modified since last check
> +eval "$(apt-config shell StateDir Dir::State)"
> +eval "$(apt-config shell ListDir Dir::State::Lists)"
> +
> +# get sources.list file
> EtcDir="etc/apt/"
> SourceList=
> -eval $(apt-config shell EtcDir Dir::Etc)
> -eval $(apt-config shell SourceList Dir::Etc:
> -if [ $(stat -c %Y "/$EtcDir/
> +eval "$(apt-config shell EtcDir Dir::Etc)"
> +eval "$(apt-config shell SourceList Dir::Etc:
> +
> +# check if we have a list file or sources.list that needs checking
> +if [ "$(find "/$StateDir/
> NEED_UPDATE_
> fi
>
> # output something for update-motd
> if [ -n "$NEED_
> - echo "" > $stamp
> - /usr/lib/
> - echo "" >> $stamp
> + echo "" > "$stamp"
> + /usr/lib/
> + echo "" >> "$stamp"
> fi
>
> # output what we have (either cached or newly generated)
> -cat $stamp
> +cat "$stamp"
>