[Pkg-uml-pkgs] Bug#372901: problem with setting multiple blocks in /etc/apt/preferences

Andreas Beckmann debian at abeckmann.de
Sun Sep 17 16:03:46 UTC 2006


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.

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.


Andreas




More information about the Pkg-uml-pkgs mailing list