Bug#387938: [Pkg-uml-pkgs] Bug#387938: rootstrap: run apt-get upgrade
after installing sources.list?
Mattia Dongili
malattia at linux.it
Sun Sep 17 18:27:58 UTC 2006
On Sun, Sep 17, 2006 at 05:45:50PM +0200, Andreas Beckmann wrote:
> Package: rootstrap
> Version: 0.3.23-1
> Severity: wishlist
>
> Hi,
>
> might it be useful, to run apt-get upgrade after installing a custom
> sources.list? The new sources.list might contain the security updates
> source and there may be newer versions available than installed by
> debootstrap.
>
> I tried the following:
>
> to rootstrap.conf, section [debian] I added (below apt_force_yes)
>
> # Run apt-get upgrade after updating the package lists, useful e.g.
> # after adding the security updates archive using sources= (see above)
> apt_upgrade=true
>
> and to modules/debian I added (between 'apt-get update' and
> 'apt-get install'):
>
> if test "$apt_upgrade" = "true"; then
> chroot $TARGET apt-get $apt_options upgrade
> fi
>
> One caveat: this currently only works if $install is not empty.
>
> Furthermore I'd like to have the possibility to run 'apt-get update'
> after 'apt-get install', again. I have local packages that install new
> trusted keys for some local package archive (using apt_force_yes=true).
> Running 'apt-get update' again would refresh the package lists using the
> newly configured trusted keys.
> (The first package list update is only done if $install is not empty,
> too.)
ok, let's try to summarize (commands are intentionally incomplete):
if test -n "$install"; then
...
apt-get update
if test -n "$sources"; then
#
# is this enough to tell you want an up-to-date
# system wrt your preferred sources?
#
apt-get upgrade # dist-upgrade ?
fi
apt-get install
...
else if test -n "$sources"; then
apt-get update
apt-get upgrade # dist-upgrade ?
fi
I'm only missing the last "apt-get update", if the only really useful
case is the one you described we could make it depend on the the output
of "apt-key list" being different before and after upgrading.
Or we (I actually as you already suggested something different) smarter
and manage additionl keys by means of apt-key _before_ running the whole
code described above.
Thanks again
--
mattia
:wq!
More information about the Pkg-uml-pkgs
mailing list