maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #03935
Re: Using tilde in the version for debs?
On Mon, Feb 21, 2011 at 9:47 AM, Kristian Nielsen
<knielsen@xxxxxxxxxxxxxxx> wrote:
> Henrik Ingo <henrik.ingo@xxxxxxxxxxxxx> writes:
>
>> Hi Kristian
>
> Hi Henrik, nice to hear from you again!
I miss you too :-) It's nice to be active again, in fact I enjoy what
I'm doing now, it is much more hands on with the code than anything I
did previously related to MySQL. (Except using MySQL from PHP, of
course.)
>> In dpkg tilde is a special character with superpowers, it is sorted as
>> greater than anything else:
>
>> You probably know that, of course,
>
> ... so I didn't know this. Do you think it is important?
Yes. If you don't need to, don't use it. Use the dot.
> The reason is just to make package file names unique between different
> distributions. And the reason for this is to be able to get repositories
> working.
>
> I recently made a script that creates a repository for Ubuntu:
>
> lp:mariadb-tools/buildbot/mkrepo-ubuntu.sh
>
> This uses `reprepro`, and when I tried to create a repository for multiple
> version of Ubuntu, I kept getting errors about duplicate files. Appending the
> ~<distro> solved this, I think Kurt suggested to do this the same as bzr.
Yes, I hit the same thing :-)
>> Percona uses a dot
>> http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.54-12.5/deb/lucid/x86_64/
>> ...and I use that with the MepSQL packages too.
>
> Aha, so same solution, just with dot instead of tilde.
>
> Right, so maybe it should be changed. Do you know of any technical reason to
> prefer one over the other?
Yes. It seems the tilde is reserved for special meaning so it is
probably wise not to use it before you really have to, since you can
only use it once. Well, apparently you can then append 2 or more tilde
after each other, but still...
I'm just guessing the special sort order for tilde exists to solve
this problem:
* Suppose you have released
mariadb-server-5.2_5.2.2-mariadb86_i386.deb ie package version is
"5.2.2-mariadb86".
* You now realize that you need to append "lucid" (etc) due to how
reprepro works. So you want to release a new version
"5.2.2-mariadb86.lucid" (the dot could be a dash, anything, or
nothing).
* The problem now is that for some reason dpkg compares version
numbers such that, the latter version is considered smaller (earlier)
than the first. Ie "a" > "ab" > "aa". So anything you append to "a" is
always smaller than "a" alone. (This is unlike alphatebical order, so
very confusing.)
* As a result, people that have 5.2.2-mariadb86 installed will not get
5.2.2-mariadb86.lucid, as it is not considered an upgrade.
* This is why tilde is given special meaning, as a workaround,
5.2.2-mariadb86~lucid is considered to be a higher version than either
of the previous alternatives.
* For you this is not a problem, since you will just introduce the new
version format in the next version, so (in this example)
5.2.3-mariadbNN.lucid will be considered as an update to
5.2.2-anything.
So you can, and should, use the dot. And then we'll have the same
format between the three of us. (And if I ever create an apt
repository for vanilla MySQL, that too.)
>> cheers and I'll get back later with more interesting comments.
>
> Yes, please do, and good luck!
Thanks. I think I'm 2 blog posts and one new website away from that.
(The Loitsut bootstrap script I created needs a website of its own, it
is useful outside MepSQL.)
> Let me know if you need help with accessing/finding some of the MariaDB
> stuff. I suppose you have most already as we tried to make it open and public,
> eg. lp:mariadb-tools/buildbot/. Do you want a copy of all the VM images for
> the different distros? (I think it is around 50GB or so total, not 100% sure).
The scripts are public, well documented and I was familiar with them
while working with you, so I've found everything, thank you. I think
the only gotcha was to look for the ourdelta scripts not in
lp:ourdelta but in lp:~maria-captains, this came up in some IRC
conversation with you just before I left, nice coincidence that I
actually needed that info shortly afterwards.
Since I've done a lot of less technical work in the past years, it was
also a good feeling to prove to myself I can still do something
without asking too many questions :-) Going forward I intend to be
more interactive again.
I was actually wondering if I should ask for the VM's, but since I
went to use Amazon EC2 I didn't/couldn't need them.
I know how strongly you feel about making sure everything is open
source, available and even documented. Just as an idea, it could be a
nice touch to document in the KB buidlbot articles that you can make
the VM's available if anyone asks. (Keeping 50GB downloadable when
nobody probably needs them is kind of going too far, some bot will end
up downloading them and clogging the bandwidth. And there is the
burden of keeping them up to date when you tweak them.)
henrik
--
henrik.ingo@xxxxxxxxxxxxx
+358-40-5697354 skype: henrik.ingo irc: hingo
www.openlife.cc
My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559
References