Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68050 - glsa-check sometimes tries to merge masked unstable packages
Summary: glsa-check sometimes tries to merge masked unstable packages
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 67494 72917 73537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-18 13:32 UTC by Antanas Kompanas
Modified: 2004-12-08 18:25 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antanas Kompanas 2004-10-18 13:32:49 UTC
With some GLSAs, glsa-check from gentoolkit-0.2.0_pre10 (portage-2.0.51_rc9) suggests masked versions of packages as a fix. For example:

# glsa-check -p 200408-27
Checking GLSA 200408-27
The following updates will be performed for this GLSA:
     net-im/gaim-1.0.1 (0.63-r1)

# emerge -p gaim
     net-im/gaim-1.0.0 [0.63-r1]

---

# glsa-check -p 200410-04
Checking GLSA 200410-04
The following updates will be performed for this GLSA:
     dev-php/mod_php-5.0.1 (4.3.8)
     dev-php/php-5.0.0-r1 (4.3.8)

# emerge -p mod_php
     dev-php/mod_php-4.3.9 [4.3.8]
     dev-php/php-4.3.9 [4.3.8]

---

However, for other packages it selects the least unaffected package as expected:

# glsa-check -p 200410-02
Checking GLSA 200410-02
The following updates will be performed for this GLSA:
     media-libs/netpbm-10.11.5-r3 (9.12-r4)

# emerge -p netpbm
     media-libs/netpbm-10.20 [9.12-r4]

If that would help, I have a system with 31 affected unapplied GLSAs and may be able to gather some stats on them and respective packages.
Comment 1 Robin Smidsrød 2004-11-03 23:26:56 UTC
My glsa-check also works that way from gentoolkit pre10. Anyone got a solution?

After I upgraded to portage 2.0.51 suddenly NO version of glsa-check is working as intended. :(

pre8_r1 has the unicode bug and pre10 has this masked packages bug.

*bummer*
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 02:14:09 UTC
*** Bug 73537 has been marked as a duplicate of this bug. ***
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 02:14:48 UTC
*** Bug 72917 has been marked as a duplicate of this bug. ***
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 02:16:08 UTC
Bah, I'm stupid. pkgcmp doesn't like strings so the relevant loop went on and glsa-check always used the last version in the list it got from portage.
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 02:16:49 UTC
*** Bug 67494 has been marked as a duplicate of this bug. ***
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 03:35:06 UTC
in 0.2.0_rc1
Comment 7 frank 2004-12-08 05:11:37 UTC
wouldn't be more reasonable (at least on a production server) to use the next unaffected version instead of te latest for fixing security issues?
ex: suppose php-4.3.8 is affected by a security bug and php-4.3.8-r1 fix that, but as there is also php-4.3.9 unmasked in the portage tree, glsa-check will fix the issue installing php-4.3.9 with the risk to break some dependencies (or the eventual introduction of new unknown bugs) instead of installing php-4.3.8-r1 which would imho be safer...
Comment 8 Thierry Carrez (RETIRED) gentoo-dev 2004-12-08 05:30:58 UTC
Good point...

The thing is glsa-check just shows the version that will get installed if you run the command in the GLSA instructions, which currently look this way :
  
  emerge --ask --oneshot --verbose ">=app-portage/mirrorselect-0.89"

Currently this installs the most recent version matching security. I think that instructions given in GLSAs, the glsa-check -f results and what glsa-check -t proposes must be coherent. So unless a new option is added to emerge (something like "--minimal") to have it upgrade to the nearest unaffected version and the GLSAs make use of that, I don't think this behaviour should be changed.
Comment 9 frank 2004-12-08 05:53:48 UTC
sorry if this is a stupid question, but couldn't this be done using
emerge --ask --oneshot --verbose "=app-portage/mirrorselect-0.89"
instead of
emerge --ask --oneshot --verbose ">=app-portage/mirrorselect-0.89" ?
maybe adding a "--minimal" option to glsa-check instead to emerge?
Comment 10 Thierry Carrez (RETIRED) gentoo-dev 2004-12-08 06:54:17 UTC
Specific versions get removed from the tree. So the command would fail as soon as the specific upgrade version is removed. And we can't update and reissue all GLSAs each time the "nearest secure" version changes...
Comment 11 Antanas Kompanas 2004-12-08 09:11:07 UTC
From what I've seen glsa-check selects versions on its own from those that are available and that match those allowed by glsa. emerge is used only to do the actual merging of specified version (line 238 as in gentoolkit-0.2.0_pre10-r1):
exitcode = os.system("emerge ="+pkg).

It was this version selection mechanism that caused this bug: glsa would merge
even masked versions of packages that directly called emerge would not select.

I'm just waiting to test the new version and it's likely it will again be
usable :)
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 18:25:05 UTC
The observed behavior was a bug, glsa-check is supposed to select the lowest unaffected version that's higher than the current installed version.