David J. wrote:
> Dear Eric,
> 
> I've been tried to run the qtp-newmodel script to upgrade my
> qmailtoaster. But I gave me the following error. I had run over to file
> at line 357: still cannot guess what's the script failed on doing.
> 
> Could you gave me some clues ??
> 
> [EMAIL PROTECTED] ~]# /usr/sbin/qtp-newmodel
> qtp-newmodel v0.2.4 starting Mon Feb  5 19:54:26 WIT 2007
> qtp-whatami v0.2.2
> DISTRO=CentOS
> OSVER=4.3
> ARCH=x86_64
> BUILD_DIST=cnt4064
> BUILD_DIR=/usr/src/redhat
> This machine's OS is supported and has been tested
> Let's get on with it!
> Do you want to include development packages?
> (This is *not* recommended for production servers)
> Shall we continue? (yes, no|skip, batch, quit) y / [n]|s / b / q : yes
> Getting package lists ...
> 
> qmail Toaster is an integrated distribution.
> Packages are preconfigured for the whole distro.
> As a result, a partial install might be misconfigured.
> Upgrading all packages to their latest version is strongly recommended.
> Now that you've been warned, we will proceed with package selection ...
> 
> /usr/sbin/qtp-newmodel: line 357: 1.2
> zlib-1.2.3-1: syntax error in expression (error token is ".2
> zlib-1.2.3-1")
> 
> Best Regards,
> 
> David J.
> 

You've found a defect, David. Congrats! Before we get to your solution, let
me make a bit of an announcement.

While it's not yet official, I've implemented Trac for the qmailtoaster-plus
project at http://trac.shubes.net/qtp. When you visit there, you'll see some
(imo) very cool things, including a "New Ticket" tab. Please do me a favor
and try creating a Ticket for this defect. It'll be the very first one (I
haven't even done a test ticket yet), so if you have a problem, don't be
upset. Simply let me know what problems you may have with it, and what you
generally think of it. Thanks for being a guinea pig.

You might also notice while you're there that there's a "Browse Source" tab
which allows you to browse the SVN repository in a powerful way. While you
can browse (only) the latest revision at http://svn.shubes.net/qtp, Trac
gives you visibility of all revisions. If you browse to
releases/<your_qtp-release>/bin/qtp-newmodel), you'll see the exact same
code that you're running. Scroll down to line 357, and there's the culprit.
Pretty cool.

In this case, the defect is in the compare_versions function, which was
added with the enhancement for development packages (the change log should
probably reflect this, but doesn't).

Without looking at the code in much detail, I can tell that the problem lies
with version numbering. This routine assumes (erroneously) that packages
have a version number that conforms to n.n.n-n.n.n format. While this is
true for toaster packages, it's not true for other packages such as zlib
which have both non-toaster and toaster versions. Why the toaster version of
zlib isn't named zlib-toaster, I've no idea. I also don't know what the
difference is between the toaster and non-toaster versions. I think it's
safe to say that you probably want the toaster version though (that's what
I'm running).

If your toaster is not currently deployed (running live), the fix is easy.
Simply
# rpm -e --nodeps zlib
to remove the existing package. The toaster's zlib should be automatically
selected and installed, and away you go.

If your toaster is running live, I can get a fix committed to svn right away
(today, probably in a couple hours).

Let me know your situation.

-- 
-Eric 'shubes'

---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to