Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49339 - qpkg --info outputs ghost information if DESCRIPTION and HOMEPAGE are not defined in ebuild files
Summary: qpkg --info outputs ghost information if DESCRIPTION and HOMEPAGE are not def...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-28 19:01 UTC by Keith Ball
Modified: 2004-08-21 13:43 UTC (History)
0 users

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


Attachments
bug fix: diff-generated patch file adding variable reset statements (bug49339_qpkg.patch,51 bytes, patch)
2004-04-28 19:24 UTC, Keith Ball
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Ball 2004-04-28 19:01:18 UTC
When qpkg -i lists information for more than one package, and the ebuild file corresponding to a given package is missing the DESCRIPTION and/or HOMEPAGE definition lines, the corresponding values(s) which appear are those of the last package with non-null values for these variables.

The problem appears in the qpkg versions from packages gentoolkit-0.2.0_pre6 and 
gentoolkit-0.2.0_pre8, at least. Here is the relevant snippet from the qpkg script from the latter package:

  (line #)
    383         if [ "${info}" ]; then
    384                 source ${p} 2> /dev/null
    385                 home="${HOMEPAGE}"
    386                 desc="${DESCRIPTION}"
    387                 #home=`grep HOMEPAGE ${p}| cut -d\" -f2`
    388                 #desc=`grep DESCRIPTION ${p}|cut -d= -f2-|cat`
    389                 echo -e "${T}${BL}${desc}${NO} [ ${YL}${home}${NO} ]"





The values of the home and desc variables should be cleared just before line 385, since the source command in line 384 will not reset these variables from their previous values if no DESCRIPTION or HOMEPAGE line exists in the ebuild file.

The commented-out lines 387-388 would aviod this problem, so I don't know why they were commented out in favor of lines 385-386; no mention of this change is in the ChangeLog for gentoolkit. It seems like this ahange might be an attempted fix for bug #20570, even though that bug is still marked as "NEW".

An easy fix would be to clear the variables just before the source command (i.e. between lines 383 and 384):

home=""
desc=""

Perhaps ebuild files should be REQUIRED to have these lines present, even if the ir values are null?


 

Reproducible: Always
Steps to Reproduce:
1. Run qpkg -i | less
2. Search doen the output for "primegen" (as one instance)
3. Note that the description and homepage fields for   media-plugins/gst-plugins-oss-0.6.4 and media-plugins/gst-plugins-vorbis-0.6.4 (the two following packages in the output) have the same fields as primegen!
Upon inspection, you will find that their ebuild files are missing the DESCRIPTION and HOMEPAGE lines. The three packages after that still have the same homepage as primegen. Finally, the following package (net-analyzer/netselect-0.3) has both variables defined and displayed properly.


Actual Results:  
(...output elided...)

app-sci/primegen-0.97 *
        A small, fast library to generate primes in order [ http://cr.yp.to/prim
egen.html ]
media-plugins/gst-plugins-oss-0.6.4 *
        A small, fast library to generate primes in order [ http://cr.yp.to/prim
egen.html ]
media-plugins/gst-plugins-vorbis-0.6.4 *
        A small, fast library to generate primes in order [ http://cr.yp.to/prim
egen.html ]
media-plugins/gst-plugins-libpng-0.6.4 *
        plug-in to encode png images [ http://cr.yp.to/primegen.html ]
media-plugins/gst-plugins-gnomevfs-0.6.4 *
        plug-in to encode png images [ http://cr.yp.to/primegen.html ]
media-plugins/gst-plugins-mad-0.6.4 *
        plug-in to encode png images [ http://cr.yp.to/primegen.html ]
net-analyzer/netselect-0.3 *
        Ultrafast implementation of ping. [ http://www.worldvisions.ca/~apenwarr
/netselect/ ]

(...output elided...)


Expected Results:  
(...output elided...)

app-sci/primegen-0.97 *
        A small, fast library to generate primes in order [ http://cr.yp.to/prim
egen.html ]
media-plugins/gst-plugins-oss-0.6.4 *  [ ]
media-plugins/gst-plugins-vorbis-0.6.4 *  [ ]
media-plugins/gst-plugins-libpng-0.6.4 *
        plug-in to encode png images [  ]
media-plugins/gst-plugins-gnomevfs-0.6.4 *  [ ]
media-plugins/gst-plugins-mad-0.6.4 *  [ ]
net-analyzer/netselect-0.3 *
        Ultrafast implementation of ping. [ http://www.worldvisions.ca/~apenwarr
/netselect/ ]

(...output elided...)
Comment 1 Keith Ball 2004-04-28 19:24:15 UTC
Created attachment 30292 [details, diff]
bug fix: diff-generated patch file adding variable reset statements

In the text of my bug report, I suggested hastily a fix which won't work! 
One has to clear the variables "DESCRIPTION" and "HOMEPAGE", since they are
used to set the "desc" and "home" variables.

The attached patch will insert statements to clear the variables before the
ebuild file is sourced.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-08-21 13:43:38 UTC
this tool is deprecated