More than 1 version of the same package can exist in a dist.

Post your Debian questions here.

More than 1 version of the same package can exist in a dist.

Postby sriman » March 29th, 2012, 6:01 am

Hi,

I have an query on Debian Repository - whether More than one version of the same package can exist in a distribution ?

Here by same package I mean same package name, I have seen packages like gcc-1 and gcc-2 etc which are different version of the same package but have different names. We referred repository @ ftp://130.119.16.19/. I could not find any package with multiple version in a distribution.

Thanks in advance :)

Regards,
Sriman
sriman
 
Posts: 1
Joined: March 29th, 2012, 5:59 am

Only one version can exist in an APT repository's index

Postby SoulSingin » March 29th, 2012, 9:22 am

It is not possible for more than one version of the same package to exist in an APT repository's index. However, multiple versions often appear in the pool of packages.

Why? When a new version of a particular package is uploaded to a repository, the old version is not immediately deleted. The DEB files of the old version remain in place. Consequently, there can be multiple versions in the pool of packages.

However, when the repository's index (i.e. the Packages.gz file) is updated, only the newer version will appear. Consequently, only one version of a given package appears in the index.

Because apt-get update fetches the Packages.gz file, the presence of multiple versions in the pool does not affect your upgrade. You will only install the version that was listed in the last Packages.gz file that you downloaded.
.
Wildflower seed in the sand and wind
May the four winds blow you home again
User avatar
SoulSingin
 
Posts: 441
Joined: February 9th, 2011, 1:21 pm

Re: More than 1 version of the same package can exist in a d

Postby lester] » March 29th, 2012, 3:29 pm

After you start to understand why there are so many versions of the same package. you will begin to understand how two different versions of the same package can be installed on a debian system.
And ( if I understand this correctly) when some kind of problem comes up related to how the version of a package is
installed, one method of dealing with the problem is by using a diversion to override the version control.

Personally, I'm not a fan of diversions, so I usually only see the ( bad) results of diversions.
User avatar
lester]
 
Posts: 200
Joined: January 28th, 2012, 8:13 am
Location: hienlien

Re: More than 1 version of the same package can exist in a d

Postby SoulSingin » March 29th, 2012, 6:19 pm

lester] wrote:how two different versions of the same package can be installed on a debian system.
lester] wrote:one method of dealing with the problem is by using a diversion to override the version control.

That is a terrible idea! . APT's version control is not "the problem." Overriding APT's version control is the problem.

The only safe way to install two different versions is to do one standard install (via APT) and manually install the other version in a location that APT does not use (e.g. /usr/local/ or /opt/ or $HOME/.local/). But even that method is problematic because both versions will use the same set of user settings.

lester] wrote:Personally, I'm not a fan of diversions, so I usually only see the ( bad) results of diversions.

Gee. I wonder why. . :roll:
.
Wildflower seed in the sand and wind
May the four winds blow you home again
User avatar
SoulSingin
 
Posts: 441
Joined: February 9th, 2011, 1:21 pm


Return to General Questions

Who is online

Users browsing this forum: No registered users and 1 guest

x