Bug#494640: live-helper: Doesn't follow APT_RECOMMENDS settings in lh_chroot_sources
On Mon, Aug 11, 2008 at 1:04 AM, Chris Lamb <chris at chris-lamb.co.uk> wrote:
> Jeremy Salwen wrote:
>
> > I found that it was doing an apt-get dist-upgrade which was making it
> > install recommended packages (I believe the default for apt?). This was
> > contrary to the file rootdir/config/common in which I had the line
> >
> > LH_APT_RECOMMENDS="disabled"
>
> Hm, whilst `lh_chroot_sources` does call dist-upgrade, the chroot's APT
> config should have already been modified to not install recommended
> packages
> by the `lh_chroot_apt` helper.
>
> Are you running helpers manually and missing this one? Are you using
> chroot_local-packages?
>
>
> Regards,
>
> --
> Chris Lamb, UK
> chris at chris-lamb.co.uk
> GPG: 0x634F9A20
>
I stumbled upon this issue when I ran lh_binary first. It was installing
many java packages (gcj, bsh, openoffice.org-java), which I didn't request.
I recognized that these were the same packages that aptitude was trying to
install before I had turned recommends off (openoffice.org was recommending
it, I believe).
I then looked at the command tree at the wiki, and ran all the commands
in order, until I ran 'lh_chroot_sources install' and it tried to install
the packages again. I then googled that script and I found some stuff about
putting 'apt-get dist-upgrade' in the script at some point.
In chroot, I tried apt-get dist-upgrade, and sure enough, it tried to
install the packages. However, when I gave it the option
--no-install-recommends, it didn't try to install them.
I then returned to the script, and opened it in an editor. I found the
only place in it where it called 'Apt dist-upgrade'. I looked in
/usr/share/live-helper/functions/ and found 'Apt' in wrapper.sh, and
verified that it was calling
case "${LH_APT}" in
apt|apt-get)
Chroot apt-get ${APT_OPTIONS} ${@}
;;
and that
LH_APT="apt"
I then put in the line
echo ${APT_OPTIONS}
in lh_chroot_sources right before the 'Apt dist-upgrade'
when I ran it again, it printed out '--yes' and nothing else.
I tried setting the apt settings in chroot to disable recommends.
Apt-config said *APT*::Install-*Recommends* was equal to '1' when I set it
to '0', it didn't work, but when I set it to 'false' it stopped the
unnecessary packaging at least in chroot.
However, lh_chroot_sources was still trying to install them, so I gave up
and added --no-install-recommends to the Apt dist-upgrade line and it
worked.
I am using both chroot_local-packages and chroot_local-packageslists and a
custom repository for both binary and chroot, if that means anything. I
don't believe I was missing any script because I first got this problem when
running lh_chroot, then lh_binary. However, I was doing many retries
(mostly lh_build) on it previously, with only a lh_clean --purge in between.
I hope this helps you
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20080811/b27c7442/attachment.htm
Reply to: