src package conundrum
Don Armstrong
don at donarmstrong.com
Thu Jul 12 13:38:38 PDT 2007
On Thu, 12 Jul 2007, Rick Moen wrote:
> I don't know, offhand, and was hoping someone would save me the
> research.
>
> ----- Forwarded message from Richard Couture <rrc at myrddin.imat.com> -----
>
> Date: Thu, 12 Jul 2007 09:49:47 -0700
> From: Richard Couture <rrc at myrddin.imat.com>
> To: Rick Moen <rick at linuxmafia.com>
> Subject: Re: Resend of previous message
>
> [...]
>
> When a user dpkg -d source vrms for example and then uses the Debian
> tools to compile the download and create a .deb from the result, and
> then actually installs the resultant .deb... I see that if user then
> does and apt-get upgrade that it will result in reinstalling the vrms
> package from the binary repository. I have tried copying the .deb of the
> source generated process to the cache with the same results...
The reason this happens is because the version in the archive has a
higher priority than the installed version:
APT then applies the following rules, listed in order of
precedence, to determine which version of a package to
install.
- Never downgrade unless the priority of an available
version exceeds 1000. ("Downgrading" is installing a
less recent version of a package in place of a more
recent version. Note that none of APT's default
priorities exceeds 1000; such high priorities can
only be set in the preferences file. Note also that
downgrading a package can be risky.)
- Install the highest priority version.
- If two or more versions have the same priority,
install the most recent one (that is, the one with
the higher version number).
- If two or more versions have the same priority and
version number but either the packages differ in some
of their metadata or the --reinstall option is given,
install the uninstalled one.
Specifically, it's rule #2 that is causing the problem here; the main
reason why this is done is to resolve cases where something bad
happened to the mirror you're using, corrupting the deb.
> How does a user insure that an upgrade will not replace a source
> installed package with the same name, version, etc...?
The way you do it is you change the version which you have modified so
that the current archive version doesn't reinstalled.
dch -n; will do this for you, or you can do it manually.
Don Armstrong
--
For a moment, nothing happened. Then, after a second or so, nothing
continued to happen.
-- Douglas Adams
http://www.donarmstrong.com http://rzlab.ucr.edu
More information about the bad
mailing list