"Slotted" packages (multiple versions on same system)

Contribute DEB packages
Forum rules
No support questions here please

"Slotted" packages (multiple versions on same system)

Postby caibbor on Fri Jan 28, 2011 8:50 pm

Gentoo had this, and I'd bet debian/mint/ubuntu does as well, since there can be multiple versions of the linux kenel installed.

my question is, how is it done? I've seen various documentation on the .deb package format but haven't seen anything about this.

bottom line is, I'd like to manually package up multiple versions of a package and have them all installed on the same system. (wine, for one).
caibbor
Level 1
Level 1
 
Posts: 25
Joined: Fri Jan 28, 2011 3:28 am

Linux Mint is funded by ads and donations.
 

Re: "Slotted" packages (multiple versions on same system)

Postby willie42 on Fri Jan 28, 2011 9:08 pm

Kernels can be found in the package manager :D
Comptia A+ Certified Technician
Comptia Network + Certified Technician
You can not have Success without Failures.
User avatar
willie42
Level 7
Level 7
 
Posts: 1977
Joined: Tue Jun 22, 2010 7:52 pm
Location: Oak Ridge, TN USA

Re: "Slotted" packages (multiple versions on same system)

Postby olligod on Sun Jan 30, 2011 10:16 am

There is one crucial difference between
- kernel (packages called mostly "linux-image-2.6.x.x-generic; the "generic" part may vary, the x.x of course being the minor versions)
- and other packages:
kernel packages' file paths go STRICTLY by version number, i.e. each file contained in the package has a "version dependent unique full path"
=> there will never be duplicate paths when comparing to other package VERSIONS.
Try
Code: Select all
dpkg --listfiles linux-image-`uname -r`

(be sure to use the right apostrophes ` )
and look at it - you may get the idea.
Therefore, what willie42 intended to say is very true - more than one kernel on one system is *easy* - they are in the package manager.

However, for other packages that is not the case!

Try (if you've got the "stable" wine version installed)
(or on an older system it may be wine1.0)
Code: Select all
dpkg --listfiles wine1.2

...and you see what I mean. Two versions would by default conflict: No difference would be in the paths for almost ALL files if it were wine1.3.x (some development version) - which is why package management would prevent that both are there at the same time: One overwrites the other at install time.

Of course, Wine would be the PRIME example where you would want more than one version....everybody that has played with wine more extensively knows that :wink:

What to do?
(1) The dpkg (base command of all package management commands that installs single packages but does not solve dependencies) has flags that allow for different paths.
You may play with that (try dpkg --help and look for the admindir and instdir; some research may be required as well)
(2) If you install the wine packages from the http://www.winhq.org website (the tar.bz2 packages, NOT the .deb, otherwise you'd be at square-1 :wink: ) into, say, /opt
/opt is a place that is meant for 3rd party software outside of package management. If you do that, you should be fine, too. It may actually be the easiest way.
Of course, you always need to manage your non-standard wine paths when running it...

If gentoo or any other distro has an elegant, quick and SAFE way to install packages "slotted" as you call it - kudos to them. With the .deb and .rpm based distros it is not that straightforward.

In any case, good luck!
And have fun with wine. :D
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany


Return to Packages

Who is online

Users browsing this forum: No registered users and 2 guests