Bug#372901: [Pkg-uml-pkgs] Bug#372901: problem with setting multiple
blocks in /etc/apt/preferences
Mattia Dongili
malattia at linux.it
Sun Sep 17 19:24:53 UTC 2006
On Sun, Sep 17, 2006 at 06:03:46PM +0200, Andreas Beckmann wrote:
> reopen 372901
> thanks
>
> Hi,
>
> unfortunately ConfigParser.py does not preserve empty lines indented
> with whitespace, so setting something like
>
> preferences=
> Packages: *
> Pin: release unstable
> Pin-Priority: 300
>
> Packages: *
> Pin: release testing
> Pin-Priority: 400
>
> ends as a single entry in /etc/apt/preferences and apt and friends do
> not interpret this as I intended.
argh! I only tested one preferences entry...
> As a workaround I changed the following in modules/debian:
>
> echo "$preferences" | sed -e '/^Pin-Priority/I s/$/\n/' \
> >> $TARGET/etc/apt/preferences
>
> This assumes that pin-priority is the last line of an preferences entry.
yes, for this reason I'd prefer using a dot-only line used as separator,
eg:
Pin:...
Pin-Priority: 300
.
Packages: *
Pin:...
This is common already in debian packaging files (and probably others)
and doesn't impose any other constraint.
--
mattia
:wq!
More information about the Pkg-uml-pkgs
mailing list