RE: 0.99 vs redhat
Rob Hagopian <[email protected]>
| Newsgroups | gmane.network.up2date.current.devel |
|---|---|
| Message-ID | <F4A736AE282FD511BC28009027CC7C590236B4D6@gopostal> |
Did you try my method to reproduce it - rh7.1, directory order mattered, etc - or did you try calling the functions directly? -Rob > -----Original Message----- > From: John Berninger [mailto:[email protected]] > Sent: Friday, March 08, 2002 12:53 PM > To: [email protected] > Subject: Re: [Current-server] 0.99 vs redhat > > > Well, unfortunately, yes, since the bug in question is > (evidently) with > rpm-python-4.0.2-8. What's really strange is that the labelCompare on > my 7.1 system worked as expected, and gave the correct results both > ways. > > Hunter and I have looked at the RPM code in this narrow little > area, and as best we can determine, there is no material difference > between the versionCompare and labelComapre. The specifics are as > follows: > > labelCompare takes two tuples as args, each tuple > consisting of > (epoch, version, release). First, it looks at the epochs. > If one epoch > is not NULL and the other is NULL, the non-NULL is more recent. If > they're both non-NULL, and not equal, the newer is newer. > This is done > by converting to ints and doing a '<' or '>' test. > > If the epochs are both NULL or are equal, a call to > rpmvercmp is > ussues with the versions as arguments. This returns a -1, 0, or 1 to > determine which is equal. If it is -1 or 1, that value is > returned, if > 0, another call to rpmvercmp() is issued with the releases as > arguments. > This return value is returned, whatever value it is. > > For some reason, this works for me on a 7.1 platform, but > obviously not for everyone. Since the algorithm is identical for > versionCompare(), except that it takes the header and it extracts the > (epoch, version, release) for you, rather than expecting you > to extract > it, there's no reason to switch to versionCompare, as > tracking the full > header would be difficult at best. BLOB's are not known for > performance > in database functions, which is what the header object would > have to be > stored as. > > On Fri, 08 Mar 2002, Rob Hagopian wrote: > > > Not quite yet :-) > > > > This makes v7.2, and more specificly rpm-python-4.0.3-1.03 > a prerequsite for > > current-0.99 and the spec file should be updated to reflect that... > > > > Personally, I'd prefer to see a workaround for 7.1, esp if > there are other > > rpm-python calls that would correctly version the dbs... > > -Rob > > > > > -----Original Message----- > > > From: John Berninger [mailto:[email protected]] > > > Sent: Friday, March 08, 2002 11:45 AM > > > To: [email protected] > > > Subject: Re: [Current-server] 0.99 vs redhat > > > > > > > > > Well, with that, I'll assume that the problem was a bug > in 7.1's rpm > > > module and was fixed in 7.2. Any objections to closing this > > > issue? :) > > > > > > On Fri, 08 Mar 2002, Rob Hagopian wrote: > > > > > > > [root@abbott i386]# for i in * ; do rpm -qp $i > > > --queryformat "%{NAME} > > > > %{EPOCH} %{VERSION} %{RELEASE}\n"; done > > > > php (none) 3.0.18 1.6.x > > > > php (none) 3.0.18 8 > > > > php-imap (none) 3.0.18 1.6.x > > > > php-imap (none) 3.0.18 8 > > > > php-ldap (none) 3.0.18 1.6.x > > > > php-ldap (none) 3.0.18 8 > > > > php-manual (none) 3.0.18 1.6.x > > > > php-manual (none) 3.0.18 8 > > > > php-pgsql (none) 3.0.18 1.6.x > > > > php-pgsql (none) 3.0.18 8 > > > > [root@abbott i386]# > > > > > > > > You're right, the server above is v7.1, our other current > > > servers are v7.2, > > > > sorry... But 7.2 does work better (correctly, even): > > > > > > > > [root@x2hvd test]# rpm -q rpm-python > > > > rpm-python-4.0.3-1.03 > > > > [root@x2hvd test]# cadmin create dh-test > > > > Mar 03 16:39:13 Adding php-3.0.18-8.i386.rpm > > > > Mar 03 16:39:13 Adding php-imap-3.0.18-8.i386.rpm > > > > Mar 03 16:39:13 Adding php-ldap-3.0.18-8.i386.rpm > > > > Mar 03 16:39:13 Adding php-manual-3.0.18-8.i386.rpm > > > > Mar 03 16:39:14 Adding php-pgsql-3.0.18-8.i386.rpm > > > > Mar 03 16:39:14 Adding php-3.0.18-1.6.x.i386.rpm > > > > Mar 03 16:39:14 type(hit) = <type 'string'> > > > > Mar 03 16:39:14 hit = php:3.0.18:8: > > > > Mar 03 16:39:14 Comparing packages: php-3.0.18-1.6.x and > > > php-3.0.18-8 > > > > Mar 03 16:39:14 Package is older than package already > in database. > > > > Mar 03 16:39:14 Adding php-imap-3.0.18-1.6.x.i386.rpm > > > > Mar 03 16:39:14 type(hit) = <type 'string'> > > > > Mar 03 16:39:14 hit = php-imap:3.0.18:8: > > > > Mar 03 16:39:14 Comparing packages: php-imap-3.0.18-1.6.x and > > > > php-imap-3.0.18-8 > > > > Mar 03 16:39:14 Package is older than package already > in database. > > > > Mar 03 16:39:14 Adding php-ldap-3.0.18-1.6.x.i386.rpm > > > > Mar 03 16:39:14 type(hit) = <type 'string'> > > > > Mar 03 16:39:14 hit = php-ldap:3.0.18:8: > > > > Mar 03 16:39:14 Comparing packages: php-ldap-3.0.18-1.6.x and > > > > php-ldap-3.0.18-8 > > > > Mar 03 16:39:14 Package is older than package already > in database. > > > > Mar 03 16:39:14 Adding php-manual-3.0.18-1.6.x.i386.rpm > > > > Mar 03 16:39:14 type(hit) = <type 'string'> > > > > Mar 03 16:39:14 hit = php-manual:3.0.18:8: > > > > Mar 03 16:39:14 Comparing packages: php-manual-3.0.18-1.6.x and > > > > php-manual-3.0.18-8 > > > > Mar 03 16:39:14 Package is older than package already > in database. > > > > Mar 03 16:39:14 Adding php-pgsql-3.0.18-1.6.x.i386.rpm > > > > Mar 03 16:39:14 type(hit) = <type 'string'> > > > > Mar 03 16:39:14 hit = php-pgsql:3.0.18:8: > > > > Mar 03 16:39:14 Comparing packages: php-pgsql-3.0.18-1.6.x and > > > > php-pgsql-3.0.18-8 > > > > Mar 03 16:39:14 Package is older than package already > in database. > > > > [root@x2hvd test]# > > > > > > > > > -Rob > > > > > > > > > -----Original Message----- > > > > > From: John Berninger [mailto:[email protected]] > > > > > Sent: Friday, March 08, 2002 11:26 AM > > > > > To: [email protected] > > > > > Subject: Re: [Current-server] 0.99 vs redhat > > > > > > > > > > > > > > > Rob - > > > > > > > > > > Could you issue the following RPM query for each > > > of the files > > > > > involved (i.e. php-3.0.18-8.i386.rpm vs > > > php-3.0.18-1.6.x.i386.rpm): > > > > > > > > > > rpm -qp $filename --queryformat "%{NAME} %{EPOCH} > > > %{VERSION} > > > > > %{RELEASE}" and send us the output? > > > > > > > > > > Also, you mentioned you're running on 7.2, but the > > > > > rpm-python-4.0.2-8 package is a 7.1 RPM; the version > > > shipped with 7.2 > > > > > was rpm-python-4.0.3-1.03. Do you have a spare machine you > > > > > can do a new > > > > > install of 7.2 on available, then up2date it through RHN, > > > then test a > > > > > fresh install of the current-0.99.0 RPM, to see what a > > > > > sanitized install > > > > > does for you? > > > > > > > > > > On Fri, 08 Mar 2002, Rob Hagopian wrote: > > > > > > > > > > > rpm-python-4.0.2-8 > > > > > > > > > > > > I am able to reproduce it: > > > > > > Make the package directory > > > > > > Move in the most recent (php-3.0.18-8) packages > > > > > > [cadmin create <- shouldn't be necessary, but I > > > did do it] > > > > > > Move in the old (php-3.0.18-1.6.x) packages > > > > > > cadmin create > > > > > > > > > > > > Yields: > > > > > > Mar 03 10:25:22 Adding php-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:22 Adding php-imap-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:22 Adding php-ldap-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:22 Adding php-manual-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:23 Adding php-pgsql-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:23 Adding php-3.0.18-1.6.x.i386.rpm > > > > > > Mar 03 10:25:23 type(hit) = <type 'string'> > > > > > > Mar 03 10:25:23 hit = php:3.0.18:8: > > > > > > Mar 03 10:25:23 Comparing packages: php-3.0.18-1.6.x and > > > > > php-3.0.18-8 > > > > > > Mar 03 10:25:23 Removing php-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:23 Older package deleted from db. > > > > > > Mar 03 10:25:23 Adding php-imap-3.0.18-1.6.x.i386.rpm > > > > > > Mar 03 10:25:23 type(hit) = <type 'string'> > > > > > > Mar 03 10:25:23 hit = php-imap:3.0.18:8: > > > > > > Mar 03 10:25:23 Comparing packages: > php-imap-3.0.18-1.6.x and > > > > > > php-imap-3.0.18-8 > > > > > > Mar 03 10:25:23 Removing php-imap-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:23 Older package deleted from db. > > > > > > Mar 03 10:25:23 Adding php-ldap-3.0.18-1.6.x.i386.rpm > > > > > > Mar 03 10:25:23 type(hit) = <type 'string'> > > > > > > Mar 03 10:25:23 hit = php-ldap:3.0.18:8: > > > > > > Mar 03 10:25:23 Comparing packages: > php-ldap-3.0.18-1.6.x and > > > > > > php-ldap-3.0.18-8 > > > > > > Mar 03 10:25:23 Removing php-ldap-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:23 Older package deleted from db. > > > > > > Mar 03 10:25:23 Adding php-manual-3.0.18-1.6.x.i386.rpm > > > > > > Mar 03 10:25:23 type(hit) = <type 'string'> > > > > > > Mar 03 10:25:23 hit = php-manual:3.0.18:8: > > > > > > Mar 03 10:25:23 Comparing packages: > php-manual-3.0.18-1.6.x and > > > > > > php-manual-3.0.18-8 > > > > > > Mar 03 10:25:23 Removing php-manual-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:23 Older package deleted from db. > > > > > > Mar 03 10:25:24 Adding php-pgsql-3.0.18-1.6.x.i386.rpm > > > > > > Mar 03 10:25:24 type(hit) = <type 'string'> > > > > > > Mar 03 10:25:24 hit = php-pgsql:3.0.18:8: > > > > > > Mar 03 10:25:24 Comparing packages: > php-pgsql-3.0.18-1.6.x and > > > > > > php-pgsql-3.0.18-8 > > > > > > Mar 03 10:25:24 Removing php-pgsql-3.0.18-8.i386.rpm > > > > > > Mar 03 10:25:24 Older package deleted from db. > > > > > > > > > > > > > > > > > > This does NOT happen if you add in the old (-1.6.x) > > > packages to the > > > > > > directory first (or both at the same time using 'mv > > > php-* i386/.'), > > > > > > suggesting that the label comparison isn't really working > > > > > and that the > > > > > > directory listings are really providing the ordering? > > > > > > > > > -Rob > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: John Berninger [mailto:[email protected]] > > > > > > > Sent: Friday, March 08, 2002 10:07 AM > > > > > > > To: [email protected] > > > > > > > Cc: Rob Hagopian > > > > > > > Subject: Re: [Current-server] 0.99 vs redhat > > > > > > > > > > > > > > > > > > > > > Rob - > > > > > > > > > > > > > > I've just tested the compare you indicated, and > > > > > I'm getting a > > > > > > > different result. The compare is issuing: > > > > > > > rpm.labelCompare( ('', '3.0.18', '1.6.x'), ('', > > > > > > > '3.0.18', '8')) > > > > > > > which should result in a -1, and which should > then exit the > > > > > > > routine and > > > > > > > go on to the next RPM. When I manually issue > this compare, I > > > > > > > do indeed > > > > > > > get a -1: > > > > > > > > > > > > > > >>> rpm.labelCompare( ('', '3.0.18', '1.6.x'), ('', > > > > > '3.0.18', '8')) > > > > > > > -1 > > > > > > > > > > > > > > What version of the rpm-python package are you using? > > > > > > > > > > > > > > On Fri, 08 Mar 2002, Rob Hagopian wrote: > > > > > > > > > > > > > > > Yes, that was from the 6.2 tree (hence the > question about > > > > > > > rpm v3 perhaps > > > > > > > > being different)... > > > > > > > > > > > > > > > > Server is RH 7.2, running current 0.99, clients > are 6.2, > > > > > > > 7.0, 7.1, and > > > > > > > > 7.2... > > > > > > > > > > > > > -Rob > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: John Berninger [mailto:[email protected]] > > > > > > > > > Sent: Friday, March 08, 2002 9:24 AM > > > > > > > > > To: [email protected] > > > > > > > > > Subject: Re: [Current-server] 0.99 vs redhat > > > > > > > > > > > > > > > > > > > > > > > > > > > Rob - > > > > > > > > > > > > > > > > > > I'm trying to confirm this is a bug in the > > > > > > > rpm.labelCompare() > > > > > > > > > function / code, but in my 7.2 tree I see > only php 4.x > > > > > > > packages. What > > > > > > > > > release level are you attempting to server > with Current? > > > > > > > Also, what > > > > > > > > > release level is your Current server (Red Hat > > > > > version, not Current > > > > > > > > > version)? > > > > > > > > > > > > > > > > > > On Thu, 07 Mar 2002, Rob Hagopian wrote: > > > > > > > > > > > > > > > > > > > inlined too... > > > > > > > > > > > > > > > > > > > > > Eww. This is not good - the code > > > used to compare > > > > > > > > > the package > > > > > > > > > > > ages is take directly from the Python RPM > > > bindings - we > > > > > > > > > actually make a > > > > > > > > > > > call to rpm.labelCompare() which is > > > implemented inside > > > > > > > > > the rpm-python > > > > > > > > > > > shared library. I'll check Red Hat's > bugzilla and if > > > > > > > > > encessary submit a > > > > > > > > > > > bug about this. I don't think we can do > > > much, since we > > > > > > > > > don't want to be > > > > > > > > > > > in the business of comparing RPM ages... > > > that gets ugly > > > > > > > > > real quick. > > > > > > > > > > > > > > > > > > > > Of course not... strangely enough it did > > > correctly figure > > > > > > > > > out the other > > > > > > > > > > associated php packages (kicking out -1.6.x > in favor of > > > > > > > > > -8)... could this be > > > > > > > > > > related to the fact that these are redhat 6.2 > > > > > packages (rpm v3)? > > > > > > > > > > > > > > > > > > > > > This is definitely somewhere in the > > > Current code > > > > > > > > > - I'll try to > > > > > > > > > > > take a look at it tonight / tomorrow / this > > > weekend. I'm > > > > > > > > > not /too/ > > > > > > > > > > > surprised at this, but having it warn me about > > > > > > > symlink issues on > > > > > > > > > > > different archs doesn't really seem quite > right. :) > > > > > > > > > > > > > > > > > > > > And I wasn't too concerned about it (I've > > > gotten real used > > > > > > > > > to spurious > > > > > > > > > > warnings with gcc :-) ), but I did clean up the > > > tree rather > > > > > > > > > than gamble, so > > > > > > > > > > I can't tell you if it actually did > > > the-right-thing(tm)... > > > > > > > > > > > > > > > > > > > > > Except for the PHP thing above, you > > > > > really shouldn't > > > > > > > > > > > have to do that anymore - or, at least, we'd > > > hoped so... > > > > > > > > > > > > > > > > > > > > As long as v1.0 is perfect ;-) > > > > > > > > > > > > > > > > > -Rob > > > > > > > > > > _______________________________________________ > > > > > > > > > > Current-server mailing list > > > > > > > > > > [email protected] > > > > > > > > > > > > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > > > > > > > > > > > > > > > > > -- > > > > > > > > > Thank you, > > > > > > > > > John Berninger > > > > > > > > > > > > > > > > > > Systems Administrator [email protected] > > > > > > > > > Department of Mathematics Box 8205, Harrelson Hall > > > > > > > > > NC State University Raleigh, NC 27695 > > > > > > > > > Phone: (919)515-6315 Fax: (919)515-3798 > > > > > > > > > > > > > > > > > > GPG Key ID: A8C1D45C > > > > > > > > > Fingerprint: B1BB 90CB 5314 3113 CF22 > > > 66AE 822D 42A8 > > > > > > > > > A8C1 D45C > > > > > > > > > -- > > > > > > > > > _______________________________________________ > > > > > > > > > Current-server mailing list > > > > > > > > > [email protected] > > > > > > > > > > > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Current-server mailing list > > > > > > > > [email protected] > > > > > > > > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > > > > > > > > > > > > > -- > > > > > > > Thank you, > > > > > > > John Berninger > > > > > > > > > > > > > > Systems Administrator [email protected] > > > > > > > Department of Mathematics Box 8205, Harrelson Hall > > > > > > > NC State University Raleigh, NC 27695 > > > > > > > Phone: (919)515-6315 Fax: (919)515-3798 > > > > > > > > > > > > > > GPG Key ID: A8C1D45C > > > > > > > Fingerprint: B1BB 90CB 5314 3113 CF22 > 66AE 822D 42A8 > > > > > > > A8C1 D45C > > > > > > > -- > > > > > > > > > > > > > _______________________________________________ > > > > > > Current-server mailing list > > > > > > [email protected] > > > > > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > > > > > > > > > -- > > > > > Thank you, > > > > > John Berninger > > > > > > > > > > Systems Administrator [email protected] > > > > > Department of Mathematics Box 8205, Harrelson Hall > > > > > NC State University Raleigh, NC 27695 > > > > > Phone: (919)515-6315 Fax: (919)515-3798 > > > > > > > > > > GPG Key ID: A8C1D45C > > > > > Fingerprint: B1BB 90CB 5314 3113 CF22 66AE 822D 42A8 > > > > > A8C1 D45C > > > > > -- > > > > > _______________________________________________ > > > > > Current-server mailing list > > > > > [email protected] > > > > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > > > > > > > > _______________________________________________ > > > > Current-server mailing list > > > > [email protected] > > > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > > > > > -- > > > Thank you, > > > John Berninger > > > > > > Systems Administrator [email protected] > > > Department of Mathematics Box 8205, Harrelson Hall > > > NC State University Raleigh, NC 27695 > > > Phone: (919)515-6315 Fax: (919)515-3798 > > > > > > GPG Key ID: A8C1D45C > > > Fingerprint: B1BB 90CB 5314 3113 CF22 66AE 822D 42A8 > > > A8C1 D45C > > > -- > > > _______________________________________________ > > > Current-server mailing list > > > [email protected] > > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > > > > _______________________________________________ > > Current-server mailing list > > [email protected] > > http://lists.dulug.duke.edu/mailman/listinfo/current-server > > -- > Thank you, > John Berninger > > Systems Administrator [email protected] > Department of Mathematics Box 8205, Harrelson Hall > NC State University Raleigh, NC 27695 > Phone: (919)515-6315 Fax: (919)515-3798 > > GPG Key ID: A8C1D45C > Fingerprint: B1BB 90CB 5314 3113 CF22 66AE 822D 42A8 > A8C1 D45C > -- > _______________________________________________ > Current-server mailing list > [email protected] > http://lists.dulug.duke.edu/mailman/listinfo/current-server >