[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Locally overriding packages via chroot_local-packages (Bug#569619)



Hi,

After trying to replace a package by a modified version in
"chroot_local-packages", I discovered that this doesn't work because the
entries in /etc/apt/sources.list have decreasing priority. I modified
lh_chroot_sources to put the local packages in front of the other package
sources (which works as intended). I was just going to send in a patch,
when I discovered, that somebody had already filed a bug for the same problem
(Bug#569619) and this is fixed in the newest version.

Unfortunately, putting the local packages into "/etc/apt/sources.d" does not
alleviate the problem: "/etc/apt/sources.list" is always given a _higher_
priority than anything in "/etc/apt/sources.d" (the documentation doesn't
mention this, but a comment in the apt sources indicates that this is
intentional). Another possibility would be not to use sources.list at all
and put everything into "/etc/apt/sources.d" but in this scenario, there
does not seem to be any reliable way to prioritize an entry.

I'd suggest to return to the previous solution to put the local packages
into "/etc/apt/sources.list" but put them at the beginning of the file:
This way, even if the same package version is available from different
sources, the local package will always "win" (and because the apt
documentation explicitly mentions this, it's hopefully going to stay
this way ...)

Regards,
               Peter


Reply to: