public inbox for gentoo-perl@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-perl] [Patch] up2date-ng and CPAN package list
@ 2007-02-04  0:21 Daniel Westermann-Clark
  2007-02-05  8:24 ` Christian Hartmann
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Westermann-Clark @ 2007-02-04  0:21 UTC (permalink / raw
  To: gentoo-perl

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

Hello,

Recently I noticed that dev-perl/Net-SSLeay is behind one release, and
wondered why it wasn't showing up in the weekly "Perl ebuilds needing
updates" emails.

Sometimes the CPAN package list contains lines like:

[...]
Net::SSLeay                        1.30  F/FL/FLORA/Net_SSLeay.pm-1.30.tar.gz
Net::SSLeay::Handle                0.61  S/SA/SAMPO/Net_SSLeay.pm-1.25.tar.gz
[...]

When up2date-ng iterates through the list, it assumes it will see the
highest version number last.  Attached is a patch to take into account
the rather odd way CPAN indexes packages...

-- 
Daniel Westermann-Clark

[-- Attachment #2: up2date-ng-cpan-version.patch --]
[-- Type: text/plain, Size: 2286 bytes --]

Auto-merging (0, 15093) /local/up2date-ng to /mirror/gentoo-perl/up2date-ng/trunk (base /mirror/gentoo-perl/up2date-ng/trunk:15055).
Patching locally against mirror source http://anonsvn.gentoo.org/repositories/gentoo-perl.
U   bin/up2date-ng.pl
==== Patch <-> level 1
Source: 20164c6d-cd09-0410-925d-b4c4e616b846:/local/up2date-ng:15093
Target: bfaec0a9-f8f8-0310-9c7b-c76e7ff872dc:/up2date-ng/trunk:111
        (http://anonsvn.gentoo.org/repositories/gentoo-perl)
Log:
 r15086@fortuna:  dwc | 2007-02-03 13:52:24 -0500
 Creating local branch
 r15093@fortuna:  dwc | 2007-02-03 18:44:36 -0500
 Don't replace versions from CPAN if they're older than the one we've got

=== bin/up2date-ng.pl
==================================================================
--- bin/up2date-ng.pl	(revision 111)
+++ bin/up2date-ng.pl	(patch - level 1)
@@ -689,9 +689,11 @@
 					}
 					
 					if ($cpan_version eq "") { $cpan_version=0; }
-					
-					$modules{'cpan'}{$cpan_pn} = $cpan_version;
-					$modules{'cpan_lc'}{lc($cpan_pn)} = $cpan_version;
+
+					if (! exists($modules{'cpan'}{$cpan_pn}) || $modules{'cpan'}{$cpan_pn} < $cpan_version) {
+						$modules{'cpan'}{$cpan_pn} = $cpan_version;
+						$modules{'cpan_lc'}{lc($cpan_pn)} = $cpan_version;
+					}
 				}
 			}
 		}

==== BEGIN SVK PATCH BLOCK ====
Version: svk v2.0.0 (linux)

eJyNk81u1DAQx/faPfAMRqTa7iHUdhLno3S1qMAFqSqicA2OM9mNmsaR4922qiuxb8KbwKPAm+Ak
XVoELUSR/DX/38zYM2/U6cGcmNkMG4dg8/7j2yQ54Vosd4lvHGYgL7VUTmAqWEPleKaSC8c3NT8H
e9rKlRLdRHO1AN1NSnEGejYjFhcNuNc9YovtqRnXsm6duMenWgE4xHhz38y97k8dEpsW7EmPTRWs
y7aUtQ2DBDj2rIm1J1YvG6hTJaW2kREvntNOi42oZAtpB7c786Czpo5NqDfPSwXCRnRlNVlZ96RB
3XsObtV3ZtbgF8bbOi3KygYddoT9VUNzrsGtF8+bqvf1Dx4deP0pb5rqKtVwqXOoNO99eNQIFjEQ
lEJMo7yAOGYiYplPKQZKi4I41Avt/R6PRpvvnzY/jp5s3o02X4PRZzt+Odx8ezbe6b6yQHtPEVyW
rW73nHOZryporyei4fXk5trpxrSpb6bIGPTwMXqBhvkaVPcQU3Q94Hce0Rz+rjn4qyKthBVVYm+r
mz4kvLHlce9xh/sf7ioIo4iQiAseYoj9IsqyiBdxwMLIpyTG/ROTODRI2fqJ2LyQSq9qniCUXwhk
EMU4dDF1sYeIlwQ0oT5ycYDxGB0p4LqsF6iSglcoU7wWy3EPsoX4GChKfD/x2Bb0StYTjRQ0FReA
bnNrUaHkOTo6eXmM7FPpJVxNFCBZ5aDsitfdFpI1oAuYrAEtpB7bbNzZjBqH0qHBTvsuSZIPddlh
ebXLjO3RhuulLUTbPHaxWpV5V677fRr3KnbbU47HDMWE+YLlrshx7GKfYDemQe5mvvCBEZZFPptN
qXmMf0fe12pVn3WtQEhHzwoOAvPYLaIisjfU0UWYuSJkEBZFFNJcOAz/VxTJH3kkfRY/AcUBg8A=
==== END SVK PATCH BLOCK ====

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-perl] [Patch] up2date-ng and CPAN package list
  2007-02-04  0:21 [gentoo-perl] [Patch] up2date-ng and CPAN package list Daniel Westermann-Clark
@ 2007-02-05  8:24 ` Christian Hartmann
  2007-02-05 22:37   ` Michael Cummings
  2007-02-06 19:33   ` Michael Cummings
  0 siblings, 2 replies; 6+ messages in thread
From: Christian Hartmann @ 2007-02-05  8:24 UTC (permalink / raw
  To: gentoo-perl

> When up2date-ng iterates through the list, it assumes it will see the
> highest version number last.  Attached is a patch to take into account
> the rather odd way CPAN indexes packages...

Good catch!

09:20 <+CIA-1> ian * r140 gentoo-perl/up2date-ng/trunk/bin/up2date-ng.pl: 
Added up2date-ng-cpan-version.patch by Daniel Westermann-Clark

Thanks a lot! :)

-
Christian Hartmann
http://www.gentoo.org/~ian/

PGP Key:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x2154E5EE692A4865
Key fingerprint = 4544 EC0C BAE4 216F 5981  7F95 2154 E5EE 692A 4865

-- 
gentoo-perl@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-perl] [Patch] up2date-ng and CPAN package list
  2007-02-05  8:24 ` Christian Hartmann
@ 2007-02-05 22:37   ` Michael Cummings
  2007-02-06 19:33   ` Michael Cummings
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Cummings @ 2007-02-05 22:37 UTC (permalink / raw
  To: gentoo-perl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Hartmann wrote:
> Thanks a lot! :)
yeah. thanks daniel. i'd almost caught up before the patch adjusted that
number... ;)

- --

- -----o()o----------------------------------------------
Michael Cummings   |    #gentoo-dev, #gentoo-perl
Gentoo Perl Dev    |    on irc.freenode.net
Gentoo/SPARC
Gentoo/AMD64
GPG: 0543 6FA3 5F82 3A76 3BF7  8323 AB5C ED4E 9E7F 4E2E
- -----o()o----------------------------------------------

Hi, I'm a .signature virus! Please copy me in your ~/.signature.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFx7GVq1ztTp5/Ti4RAqHsAJ46NbLr/pDZhayExmwQx/32daahhQCfXJ6m
ogZf4096k25YZ+Z+rPX5pyY=
=/LVG
-----END PGP SIGNATURE-----
-- 
gentoo-perl@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-perl] [Patch] up2date-ng and CPAN package list
  2007-02-05  8:24 ` Christian Hartmann
  2007-02-05 22:37   ` Michael Cummings
@ 2007-02-06 19:33   ` Michael Cummings
  2007-02-07  6:48     ` Daniel Westermann-Clark
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Cummings @ 2007-02-06 19:33 UTC (permalink / raw
  To: gentoo-perl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

One 'glitch' i'm seeing with this is that Class-MakeMethods is showing
up incorrectly - looks like it might be doing a decimal munge? (1.01 is
showing up as older than 1.0.14 - but in mikey math (and cpan
versioning) 1.01 == 1.01.00, which is > than 1.0.14).

Bah. Just throwing it out there, personally i'm willing to ignore it for
now :)

- --

- -----o()o----------------------------------------------
Michael Cummings   |    #gentoo-dev, #gentoo-perl
Gentoo Perl Dev    |    on irc.freenode.net
Gentoo/SPARC
Gentoo/AMD64
GPG: 0543 6FA3 5F82 3A76 3BF7  8323 AB5C ED4E 9E7F 4E2E
- -----o()o----------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFyNgVq1ztTp5/Ti4RAnosAJ9gH7Z2/yr48cOr+LCiWWzK4FTbAACeLEKr
rs1YTfstG2TVzqaH7+OveCI=
=2HEo
-----END PGP SIGNATURE-----
-- 
gentoo-perl@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-perl] [Patch] up2date-ng and CPAN package list
  2007-02-06 19:33   ` Michael Cummings
@ 2007-02-07  6:48     ` Daniel Westermann-Clark
  2007-02-07 20:28       ` Michael Cummings
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Westermann-Clark @ 2007-02-07  6:48 UTC (permalink / raw
  To: gentoo-perl

On 2007-02-06 14:33:41 -0500, Michael Cummings wrote:
> One 'glitch' i'm seeing with this is that Class-MakeMethods is
> showing up incorrectly - looks like it might be doing a decimal
> munge? (1.01 is showing up as older than 1.0.14 - but in mikey math
> (and cpan versioning) 1.01 == 1.01.00, which is > than 1.0.14).

Dang, I missed that when I was checking the output for sanity.

The comparison in the patch is too simplistic ... to catch this case I
think up2date-ng.pl would need to generate a list of version numbers
from CPAN with zeroes in place of the decimal points (instead of
having the decimal points stripped).

/me goes to check if the same process would work for version numbers
on the Perl ebuilds

-- 
Daniel Westermann-Clark
-- 
gentoo-perl@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-perl] [Patch] up2date-ng and CPAN package list
  2007-02-07  6:48     ` Daniel Westermann-Clark
@ 2007-02-07 20:28       ` Michael Cummings
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Cummings @ 2007-02-07 20:28 UTC (permalink / raw
  To: gentoo-perl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Westermann-Clark wrote:
> The comparison in the patch is too simplistic ... to catch this case I
> think up2date-ng.pl would need to generate a list of version numbers
> from CPAN with zeroes in place of the decimal points (instead of
> having the decimal points stripped).
> 
> /me goes to check if the same process would work for version numbers
> on the Perl ebuilds
> 

if we're going to go hog wild on this....split on the decimals, pad 0's
at the end for equal lengths, then compare...i think....seem to remember
using that technique once successfully, but then i dropped the code for
sanity reasons (unrelated to the padding for equal lengths bit)

- --

- -----o()o----------------------------------------------
Michael Cummings   |    #gentoo-dev, #gentoo-perl
Gentoo Perl Dev    |    on irc.freenode.net
Gentoo/SPARC
Gentoo/AMD64
GPG: 0543 6FA3 5F82 3A76 3BF7  8323 AB5C ED4E 9E7F 4E2E
- -----o()o----------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFyjaBq1ztTp5/Ti4RAlLNAJ9QLJPbeS+T15xZEOJ5Ywoh2pi9+QCbBGsm
pbAfzJldprsKc5R/3oqdlA0=
=sRTN
-----END PGP SIGNATURE-----
-- 
gentoo-perl@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-07 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-04  0:21 [gentoo-perl] [Patch] up2date-ng and CPAN package list Daniel Westermann-Clark
2007-02-05  8:24 ` Christian Hartmann
2007-02-05 22:37   ` Michael Cummings
2007-02-06 19:33   ` Michael Cummings
2007-02-07  6:48     ` Daniel Westermann-Clark
2007-02-07 20:28       ` Michael Cummings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox