#349: Depcheck - prefilter the list of packages passed to yum instance's rpmdb ----------------------+----------------------------------------------------- Reporter: jskladan | Owner: Type: task | Status: new Priority: major | Milestone: 0.6.0 Component: core | Keywords: ----------------------+----------------------------------------------------- Recent problem with libreport http://autoqa.fedoraproject.org/results/140482-autotest/172.16.0.20/depcheck/results/libreport-2.0.4-3.fc.html is most probably caused by depcheck selecting too old packages (i.e. ignoring the newest packages in repos) due to the fact that YUM selects packages alphabeticaly on fist-comes-first served basis.
Because YUM is hacked into believing that all packages are installed by passing the content of _whole_ pkgsack into the rpmdb, it contains multiple versions of the same package.
I belive, that this can be easily solved by pre-filtering the list, so it contains only the newest from each package.
<code> # This YumBase object will act like all repo packages are already installed y = YumDepcheck() y.tsInfo = yum.transactioninfo.TransactionData() y.tsInfo.debug = 1
# this line is causing the problems y.rpmdb = MetaSackRPMDB(yum_repos.pkgSack)
y.xsack = yum.packageSack.PackageSack() # Hacky way to set up the databases (this is copied from yum's testbase.py) y.tsInfo.setDatabases(y.rpmdb, y.xsack) </code>
the yum_repos.pkgSack is a list of tuples NAEVR <code>[('libreport', 'x86_64', '0', '2.0.2', '5.fc15'), ('libreport', 'i686', '0', '2.0.2', '5.fc15'), ('libreport', 'x86_64', '0', '2.0.4', '1.fc15'), ('libreport', 'i686', '0', '2.0.4', '1.fc15')]</code>
After the filtering, only the newest package for each architecture should be left. Newest = the first while sorting using E,V,R as keys with decreasing importance in this order. I.e. <code> [('libreport', 'x86_64', '0', '2.0.4', '1.fc15'), ('libreport', 'i686', '0', '2.0.4', '1.fc15')]</code>. koji_utils.compareEVR() can be used to compare EVRs.
#349: Depcheck - prefilter the list of packages passed to yum instance's rpmdb ----------------------+----------------------------------------------------- Reporter: jskladan | Owner: Type: task | Status: new Priority: major | Milestone: 0.6.0 Component: core | Resolution: Keywords: | ----------------------+----------------------------------------------------- Old description:
Recent problem with libreport http://autoqa.fedoraproject.org/results/140482-autotest/172.16.0.20/depcheck/results/libreport-2.0.4-3.fc.html is most probably caused by depcheck selecting too old packages (i.e. ignoring the newest packages in repos) due to the fact that YUM selects packages alphabeticaly on fist-comes-first served basis.
Because YUM is hacked into believing that all packages are installed by passing the content of _whole_ pkgsack into the rpmdb, it contains multiple versions of the same package.
I belive, that this can be easily solved by pre-filtering the list, so it contains only the newest from each package.
<code> # This YumBase object will act like all repo packages are already installed y = YumDepcheck() y.tsInfo = yum.transactioninfo.TransactionData() y.tsInfo.debug = 1
# this line is causing the problems y.rpmdb = MetaSackRPMDB(yum_repos.pkgSack)
y.xsack = yum.packageSack.PackageSack() # Hacky way to set up the databases (this is copied from yum's
testbase.py) y.tsInfo.setDatabases(y.rpmdb, y.xsack)
</code>
the yum_repos.pkgSack is a list of tuples NAEVR <code>[('libreport', 'x86_64', '0', '2.0.2', '5.fc15'), ('libreport', 'i686', '0', '2.0.2', '5.fc15'), ('libreport', 'x86_64', '0', '2.0.4', '1.fc15'), ('libreport', 'i686', '0', '2.0.4', '1.fc15')]</code>
After the filtering, only the newest package for each architecture should be left. Newest = the first while sorting using E,V,R as keys with decreasing importance in this order. I.e. <code> [('libreport', 'x86_64', '0', '2.0.4', '1.fc15'), ('libreport', 'i686', '0', '2.0.4', '1.fc15')]</code>. koji_utils.compareEVR() can be used to compare EVRs.
New description:
Recent problem with libreport http://autoqa.fedoraproject.org/results/140482-autotest/172.16.0.20/depcheck/results/libreport-2.0.4-3.fc.html is most probably caused by depcheck selecting too old packages (i.e. ignoring the newest packages in repos) due to the fact that YUM selects packages alphabeticaly on fist-comes-first served basis.
Because YUM is hacked into believing that all packages are installed by passing the content of _whole_ pkgsack into the rpmdb, it contains multiple versions of the same package.
I belive, that this can be easily solved by pre-filtering the list, so it contains only the newest from each package.
{{{ # This YumBase object will act like all repo packages are already installed y = YumDepcheck() y.tsInfo = yum.transactioninfo.TransactionData() y.tsInfo.debug = 1
# this line is causing the problems y.rpmdb = MetaSackRPMDB(yum_repos.pkgSack)
y.xsack = yum.packageSack.PackageSack() # Hacky way to set up the databases (this is copied from yum's testbase.py) y.tsInfo.setDatabases(y.rpmdb, y.xsack) }}}
the yum_repos.pkgSack is a list of tuples NAEVR {{{ [('libreport', 'x86_64', '0', '2.0.2', '5.fc15'), ('libreport', 'i686', '0', '2.0.2', '5.fc15'), ('libreport', 'x86_64', '0', '2.0.4', '1.fc15'), ('libreport', 'i686', '0', '2.0.4', '1.fc15')] }}}
After the filtering, only the newest package for each architecture should be left. Newest = the first while sorting using E,V,R as keys with decreasing importance in this order. I.e. {{{ [('libreport', 'x86_64', '0', '2.0.4', '1.fc15'), ('libreport', 'i686', '0', '2.0.4', '1.fc15')] }}}
koji_utils.compareEVR() can be used to compare EVRs.
#349: Depcheck - prefilter the list of packages passed to yum instance's rpmdb ----------------------+----------------------------------------------------- Reporter: jskladan | Owner: jskladan Type: task | Status: new Priority: major | Milestone: 0.6.0 Component: core | Resolution: Keywords: | ----------------------+----------------------------------------------------- Changes (by kparal):
* owner: => jskladan
#349: Depcheck - prefilter the list of packages passed to yum instance's rpmdb ----------------------+----------------------------------------------------- Reporter: jskladan | Owner: jskladan Type: task | Status: assigned Priority: major | Milestone: 0.6.0 Component: core | Resolution: Keywords: | ----------------------+----------------------------------------------------- Changes (by jskladan):
* status: new => assigned
Comment:
Patch is in reviewboard. Working OK on my setup.
https://fedorahosted.org/reviewboard/r/175/
#349: Depcheck - prefilter the list of packages passed to yum instance's rpmdb ----------------------+----------------------------------------------------- Reporter: jskladan | Owner: jskladan Type: task | Status: closed Priority: major | Milestone: 0.6.0 Component: core | Resolution: fixed Keywords: | ----------------------+----------------------------------------------------- Changes (by jskladan):
* status: assigned => closed * resolution: => fixed
Comment:
Pushed as 045c60ee25d830ddba0b8cfc75133756bb019a8f
autoqa-devel@lists.fedorahosted.org