Re: Understanding versioning.

2011-11-08 Thread Walter Hurry
On Tue, 08 Nov 2011 15:56:02 -0500, Rick Thomas wrote:

> On Nov 8, 2011, at 2:07 AM, Sthu Deus wrote:
> 
>> it seems to me to be weird having those "epoches"
> 
> If all software developers were "well behaved" and they all co- operated
> in their versioning, it would be weird to have "epochs".  All versions,
> from all sources, would be monotonically increasing as a function of
> time.
> 
> But, as we know, software developers are an independent bunch of
> cowboys.  Sometimes, for reasons that seem good and reasonable to the
> individual upstream developer involved, software version time seems to
> run backwards.  "Epochs" are there so the rest of us (who aren't
> upstream developers) can pretend it didn't do that -- when the
> developers glitch their versions, we just move into a different epoch
> and go on about our lives.

It might be less confusing for the uninitiated though, if the term used 
were "incarnation" rather than "epoch"; at least IMHO. Especially so in 
the light of the other *nix use of the term epoch regarding time.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/j9c9cb$3jh$1...@dough.gmane.org



Re: Understanding versioning.

2011-11-08 Thread Rick Thomas


On Nov 8, 2011, at 2:07 AM, Sthu Deus wrote:


it seems to me to be weird having those "epoches"


If all software developers were "well behaved" and they all co- 
operated in their versioning, it would be weird to have "epochs".  All  
versions, from all sources, would be monotonically increasing as a  
function of time.


But, as we know, software developers are an independent bunch of  
cowboys.  Sometimes, for reasons that seem good and reasonable to the  
individual upstream developer involved, software version time seems to  
run backwards.  "Epochs" are there so the rest of us (who aren't  
upstream developers) can pretend it didn't do that -- when the  
developers glitch their versions, we just move into a different epoch  
and go on about our lives.


Rick


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/edf1249b-a1d0-429f-abc5-524dd9621...@pobox.com



Re: Understanding versioning.

2011-11-07 Thread Sthu Deus
Thank You for Your time and answer, Dan:

>First, don't think of second or fifth (per
>http://dictionary.reference.com/browse/epoch) senses of "epoch"--
>the _beginning_ of some period (the meaning used re Unix time).
>Think of the first or fourth senses--a _period_ of time.
>
>Then, think of a package version epoch as the period of time during
>which a coherent (i.e., ascending) sequence of version numbers is
>used.
>
>If such a period ends because, say because you issue a new version
>number that is lower than (and therefore seems older than) an older
>version number, a way to resolve the confusion is to declare that
>you have switched to using a new system of version numbers.

Yes, I got that. Just wanted more explanation on the matter - of course
I am not an expert in software development and in industrial scale,
therefore it seems to me to be weird having those "epoches" - for there
is number positioning in versions like a.b.c.d - each number saying
about how significant development progressed, and there is "-e.f"
saying about patches in a distro being applied.

But thank You, Dan, and all others that took Your time to make things
clearer to me.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4eb8d55e.c820cc0a.5e23.0...@mx.google.com



Re: Understanding versioning.

2011-11-07 Thread Dan B.

Sthu Deus wrote:

Thank You for Your time and answer, Camaleón:


It is provided to allow mistakes in the version numbers of older
versions of a package, and also a package's previous version numbering
schemes, to be left behind.


What does this mean? From other posts in the thread it is still not
clear to me. If You can explain, please do so.

Also what is epoch in this sense? I now time is measured in UNIX
systems since the first system ran - it's obvious - a new great OS
generation has started and till now rolls on. But what about the
package epoch they use?


First, don't think of second or fifth (per
http://dictionary.reference.com/browse/epoch) senses of "epoch"--
the _beginning_ of some period (the meaning used re Unix time).
Think of the first or fourth senses--a _period_ of time.

Then, think of a package version epoch as the period of time during
which a coherent (i.e., ascending) sequence of version numbers is
used.

If such a period ends because, say because you issue a new version
number that is lower than (and therefore seems older than) an older
version number, a way to resolve the confusion is to declare that
you have switched to using a new system of version numbers.

The package version epoch number identifies in which system of
version numbers a given version number reference is written.


Daniel



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4eb85a7a.8030...@kempt.net



Re: Understanding versioning.

2011-11-07 Thread Camaleón
On Mon, 07 Nov 2011 15:37:58 +0700, Sthu Deus wrote:

> Thank You for Your time and answer, Camaleón:
> 
>>It is provided to allow mistakes in the version numbers of older
>>versions of a package, and also a package's previous version numbering
>>schemes, to be left behind.
> 
> What does this mean? From other posts in the thread it is still not
> clear to me. If You can explain, please do so.
> 
> Also what is epoch in this sense? I now time is measured in UNIX systems
> since the first system ran - it's obvious - a new great OS generation
> has started and till now rolls on. But what about the package epoch they
> use?

I think Henrique de Moraes already explained this quite well :-)

Although I was not aware of the inners, I was taking that number as a 
kind of internal string to help packagers to control software versioning.

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.11.07.14.52...@gmail.com



Re: Understanding versioning.

2011-11-07 Thread Sthu Deus
Thank You for Your time and answer, Camaleón:

>It is provided to allow mistakes in the version numbers of older
>versions of a package, and also a package's previous version numbering
>schemes, to be left behind.

What does this mean? From other posts in the thread it is still not
clear to me. If You can explain, please do so.

Also what is epoch in this sense? I now time is measured in UNIX
systems since the first system ran - it's obvious - a new great OS
generation has started and till now rolls on. But what about the
package epoch they use?


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4eb798f3.0611cc0a.3bf2.6...@mx.google.com



Re: Understanding versioning.

2011-11-06 Thread Harry Putnam
Henrique de Moraes Holschuh  writes:

[...]

>> What does that non-sensical sounding explanation mean?  Its not as if
>> it is explained at the URL cited.
>
> It is a version override.  For an epoch of "n", *any* version without an epoch
> or with an epoch that is lower than "n" will be considered *older*.
>
> So 5:0.0.1 is NEWER than 10.2.3, or than 1:9.1.4.

[...]

Javier Barroso  writes:


[...]

> Hi,
>
> bash-completion has a clear example of use:
> See /usr/share/doc/bash-completion/changelog.Debian.gz
> After bash-completion (20080705) version the next version is 1.0, so
> epoch had to be used
>
> busybox has another example (developper simply upload an package with
> incorrect version):
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=97290
>
> You can have fun time investigating which packages you have installed
> has epoch in their version and why they have it, running attached perl
> script ( I was boring this night ...)

(I'll be stealing off that for a while... hehe).
 
Ok, that all clears things up very nicely.
Thank you both for taking time to clue me in.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87lirsr91p@newsguy.com



Re: Understanding versioning.

2011-11-06 Thread Javier Barroso
On Sun, Nov 6, 2011 at 11:09 PM, Harry Putnam  wrote:
> Camaleón  writes:
>> http://www.debian.org/doc/debian-policy/ch-controlfields.html
>
>  > epoch
>
>> This is a single (generally small) unsigned integer. It may be omitted,
>> in which case zero is assumed. If it is omitted then the upstream_version
>> may not contain any colons.
>>
>> It is provided to allow mistakes in the version numbers of older versions
>> of a package, and also a package's previous version numbering schemes, to
>> be left behind.
>
> What does that non-sensical sounding explanation mean?  Its not as if
> it is explained at the URL cited.
>
> I'm sure its perfectly reasonable if you know enough about debian
> generally, but if not it sounds kind of off the wall.
>
> Can you show an example of how it works?
Hi,

bash-completion has a clear example of use:
See /usr/share/doc/bash-completion/changelog.Debian.gz
After bash-completion (20080705) version the next version is 1.0, so
epoch had to be used

busybox has another example (developper simply upload an package with
incorrect version):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=97290

You can have fun time investigating which packages you have installed
has epoch in their version and why they have it, running attached perl
script ( I was boring this night ...)

Regards
#!/usr/bin/perl -w
use strict;

if ( not -e "/usr/bin/dpkg-parsechangelog" )
{
	printf "You need dpkg-parsechangelog (in dpkg-dev package)";
	exit 1;
}

my @packages_version=`aptitude search --disable-columns "?and(?version(:),?installed)" -F"%p"`;
my %revised;
chomp @packages_version;
my $tmpfile = "/tmp/changelog.tmp";
foreach my $package (sort @packages_version)
{
	my $found=0;
	if ( -e "/usr/share/doc/$package/changelog.Debian.gz" )
	{
		my $md5sum=`md5sum /usr/share/doc/$package/changelog.Debian.gz`;
		chomp $md5sum; $md5sum=~s/\s+.*//;
		if (defined ($revised{$md5sum})) 
		{
			printf "Skipping $package, shared changelog\n"; next;
		}
		$revised{$md5sum}=1;
		`zcat /usr/share/doc/$package/changelog.Debian.gz >	$tmpfile`;
	}
	elsif ( -f "/usr/share/doc/$package/changelog.gz" )
	{
		my $md5sum=`md5sum /usr/share/doc/$package/changelog.gz`;
		chomp $md5sum; $md5sum=~s/\s+.*//;
		if (defined ($revised{$md5sum})) 
		{
			printf "Skipping $package, shared changelog\n"; next;
		}
		$revised{$md5sum}=1;
		`zcat /usr/share/doc/$package/changelog.gz > $tmpfile`
	}
	else
	{
		printf "Didn't find $package changelog\n";
		next;
	}
	printf "Examining $package changelog \n";
	open my $changelog,"$tmpfile" or die ;

	my $new_version="";
	my $version="";
	while  (<$changelog>)
	{
		if (/ \((\d[^)]*)\) .*urgency=/)
		{
			$new_version=$version;
			$version=$1;
			if ($new_version =~ /:/ and	$version !~ /:/)
			{
system (qq(dpkg-parsechangelog --from "$version" --to "$new_version" -l$tmpfile));
$found=1;
last;
			}
		}
	}
	if ($found == 0)
	{
		print "Didn't find version with epoch in $package changelog, maybe source package is different ...\n";
	}
}
unlink "$tmpfile";


Re: Understanding versioning.

2011-11-06 Thread Henrique de Moraes Holschuh
On Sun, 06 Nov 2011, Harry Putnam wrote:
> Camaleón  writes:
> > http://www.debian.org/doc/debian-policy/ch-controlfields.html
> 
>  > epoch
> 
> > This is a single (generally small) unsigned integer. It may be omitted, 
> > in which case zero is assumed. If it is omitted then the upstream_version 
> > may not contain any colons.
> >
> > It is provided to allow mistakes in the version numbers of older versions 
> > of a package, and also a package's previous version numbering schemes, to 
> > be left behind.
> 
> What does that non-sensical sounding explanation mean?  Its not as if
> it is explained at the URL cited.

It is a version override.  For an epoch of "n", *any* version without an epoch
or with an epoch that is lower than "n" will be considered *older*.

So 5:0.0.1 is NEWER than 10.2.3, or than 1:9.1.4.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2006222144.gc29...@khazad-dum.debian.net



Re: Understanding versioning.

2011-11-06 Thread Harry Putnam
Camaleón  writes:
> http://www.debian.org/doc/debian-policy/ch-controlfields.html

 > epoch

> This is a single (generally small) unsigned integer. It may be omitted, 
> in which case zero is assumed. If it is omitted then the upstream_version 
> may not contain any colons.
>
> It is provided to allow mistakes in the version numbers of older versions 
> of a package, and also a package's previous version numbering schemes, to 
> be left behind.

What does that non-sensical sounding explanation mean?  Its not as if
it is explained at the URL cited.

I'm sure its perfectly reasonable if you know enough about debian
generally, but if not it sounds kind of off the wall.

Can you show an example of how it works?


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87pqh4rjht@newsguy.com



Re: Understanding versioning.

2011-11-06 Thread Camaleón
On Mon, 07 Nov 2011 00:38:32 +0700, Sthu Deus wrote:

> When I see this aptitude note:
> 
> [UPGRADE] libavcodec52 5:0.6.1+svn20101128-0.2squeeze2 -> 5:0.7.7-0.0
> 
> how do I interpret number "5:" in "5:0.6.1"?

***
http://www.debian.org/doc/debian-policy/ch-controlfields.html

5.6.12 Version

The version number of a package. The format is: [epoch:]upstream_version[-
debian_revision]

The three components here are:

epoch

This is a single (generally small) unsigned integer. It may be omitted, 
in which case zero is assumed. If it is omitted then the upstream_version 
may not contain any colons.

It is provided to allow mistakes in the version numbers of older versions 
of a package, and also a package's previous version numbering schemes, to 
be left behind.
***

HTH :-)

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.11.06.17.46...@gmail.com