Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45182 - emerge -puD world doesn't show update for a package although upgrade available(PATCH)
Summary: emerge -puD world doesn't show update for a package although upgrade availabl...
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: Sparc All
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-19 18:27 UTC by devsk
Modified: 2005-07-28 20:29 UTC (History)
0 users

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 devsk 2004-03-19 18:27:49 UTC
"emerge -puD world" was not showing kde as a package which has upgrade available, although 3.2.1 is in portage and kde-base/kde is in "world" file. This is with ROOT feature being used.

Reproducible: Always
Steps to Reproduce:
1. Set ROOT to /opt/
2. Install kde in ${ROOT}
3. emerge -puD world

Actual Results:  
It didn't say that update for kde was available when there indeed was an upgrade
available.

Expected Results:  
It should have listed kde in output.

I changed following in ${ROOT}usr/lib/portage/bin/emerge:

---------------------------------------
#actually available -- this prevents emerge from bombing out due to no match
being found (we want a silent ignore)
                                if "empty" in myparams:
                                        if
portage.db["/"]["vartree"].dbapi.match(x):
                                                sysdict[x]=worlddict[x]
                                elif
portage.db[portage.root]["vartree"].dbapi.match(x):
                                        #package is installed
                                        sysdict[x]=worlddict[x]
                                else:
                                        print "\n*** Package in world file is
not installed: "+x

----------------------
TO
----------------------
#actually available -- this prevents emerge from bombing out due to no match
being found (we want a silent ignore)
                                if "empty" in myparams:
                                        if
portage.db["/"]["vartree"].dbapi.match(x):
                                                sysdict[x]=worlddict[x]
                                        elif
portage.db[portage.root]["vartree"].dbapi.match(x):
                                                #package is installed
                                                sysdict[x]=worlddict[x]
                                        else:
                                                print "\n*** Package in world
file is not installed: "+x
--------------------------

please note the extra tabs. And it reported the correct results.
Comment 1 SpanKY gentoo-dev 2004-03-20 05:49:20 UTC
we cant notice the extra tabs ... posting patches in comments is wrong, it always mangles it

please post your patch as an attachment ... also, using an unified diff format is prefered
Comment 2 devsk 2004-03-21 08:30:45 UTC
OK, forget the patch. I had to make more changes for that file for it to work on solaris and true ROOT form, so posting a diff here will be major digressing. Here is what I think should be the behaviour in precedence view and by looking at that part of file 'emerge', you can figure what to do:

if empty in myparams; then
(if match in "/"; then sysdict[x]=worlddict[x]
else if match in ${ROOT}; then sysdict[x]=worlddict[x]
else print message that world package not installed.
)

Current tabbing doesn't allow this behaviour. Please note the '(', ')' parenthesis.
Comment 3 devsk 2004-03-23 08:49:27 UTC
have a look at this and you will get a visual diff:

http://forums.gentoo.org/viewtopic.php?t=113387&postdays=0&postorder=asc&start=75
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-07-28 20:29:57 UTC
If you have a patch for current stable please attach it and re-open the bug.