Bug 1003858 - RFE: create "anaconda-tb" element instead of "anaconda-tb-<RANDOM>"
Summary: RFE: create "anaconda-tb" element instead of "anaconda-tb-<RANDOM>"
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-meh
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Kolman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-03 11:35 UTC by Denys Vlasenko
Modified: 2018-02-15 02:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Denys Vlasenko 2013-09-03 11:35:45 UTC
Description of problem:

When anaconda passes bug data to libreport, one of the elements is named "anaconda-tb-<RANDOM>".
I didn't trace its origins completely, I reached only up to this code:

python-meh-0.26/meh/handler.py

        for fpath in self.conf.fileList:
            try:
                with open(fpath, "r") as fobj:
                    # would be better to use the full path here, but libreport
                    # doesn't allow '/' characters in the item name
                    filename = os.path.basename(fpath)
                    if filename not in params:
                        params[filename] = fobj.read()
                    else:
                        params[filename+"_file"] = fobj.read()
            except:
                #skip files we cannot read
                continue

My guess is that self.conf.fileList contains "anaconda-tb-<RANDOM>", and it gets read and added to params in the code above.

This isn't the best name to use. Consider what users of these bug reports might want to do.
How about "search for the string FOO in all anaconda-tb's in all filed BZs"?
See the problem? You can't fetch "anaconda-tb" BZ attachment by name, because it has the variable -RANDOM suffix.

Here is a real-world example: BZ 875312. To satisfy this BZ, I want to add

     %attach: anaconda-tb

line to bugzilla_formatdup_anaconda.conf. Whoops, this won't work.

I suggest changing anaconda to use "anaconda-tb" element name.

Comment 1 Vratislav Podzimek 2013-09-04 09:09:41 UTC
The code that creates the '*-tb*' item is a bit above what you've found [1].

        tb_item_name = "%s-tb" % self.conf.programName
        params[tb_item_name] = self.exnText

[1] https://git.fedorahosted.org/cgit/python-meh.git/tree/meh/handler.py#n246

It should do exactly what you are requesting and it appeared in python-meh-0.14-1.


Note You need to log in before you can comment on or make changes to this bug.