[cmake] pkgme.info_elements.InvalidInfoError: Package name must be at least two characters long: ''

Bug #1004505 reported by Daniel Holbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkgme
Triaged
Low
Unassigned

Bug Description

When trying to package https://myapps.developer.ubuntu.com/dev/apps/865/ pkgme fails with

Traceback (most recent call last):
  File "/home/daniel/test/virtualenv/bin/pkgme", line 9, in <module>
    load_entry_point('pkgme==0.1', 'console_scripts', 'pkgme')()
  File "/home/daniel/test/pkgme/pkgme/bin/main.py", line 128, in main
    distribution=options.distro)
  File "/home/daniel/test/pkgme/pkgme/bin/main.py", line 27, in build_package
    write_packaging(target_dir, distribution=distribution)
  File "/home/daniel/test/pkgme/pkgme/__init__.py", line 45, in write_packaging
    files = default_package_file_group.get_files(info)
  File "/home/daniel/test/pkgme/pkgme/package_files.py", line 129, in get_files
    files.append(file_cls.from_info(new_info))
  File "/home/daniel/test/pkgme/pkgme/package_files.py", line 91, in from_info
    values[element.name] = element.get_value(project_info)
  File "/home/daniel/test/pkgme/pkgme/info_elements.py", line 47, in get_value
    val = cls.clean(val)
  File "/home/daniel/test/pkgme/pkgme/info_elements.py", line 87, in clean
    % (value,))
pkgme.info_elements.InvalidInfoError: Package name must be at least two characters long: ''

CMakeLists.txt file in question attached.

Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
James Westby (james-w) wrote :

The code looks for PROJECT in the CMakeLists.txt file, but this file doesn't have one.

I'm not sure how we could find the package name from this particular file.

The error message could certainly be improved.

Thanks,

James

Revision history for this message
Daniel Holbach (dholbach) wrote :

I just dug around in the code of this specific project and found:

/Doxyfile:PROJECT_NAME = Songbook-Client
./cmake/songbook-client-config.cmake:set(PROJECT_NAME songbook-client)

Maybe these files could be used somehow to extract the information, if they exist? I don't know if pkgme's design has any room for "clues"...

Revision history for this message
Jonathan Lange (jml) wrote : Re: [Bug 1004505] Re: [cmake] pkgme.info_elements.InvalidInfoError: Package name must be at least two characters long: ''

On 30 May 2012 08:13, Daniel Holbach <email address hidden> wrote:
> I just dug around in the code of this specific project and found:
>
> /Doxyfile:PROJECT_NAME           = Songbook-Client
> ./cmake/songbook-client-config.cmake:set(PROJECT_NAME songbook-client)
>
> Maybe these files could be used somehow to extract the information, if
> they exist? I don't know if pkgme's design has any room for "clues"...

Not exactly. There's a sense in which everything is a clue, because
hardly anything is explicitly specified.

The way to do this is to have the backend do the looking (see
lp:pkgme-devportal for some examples). It might be nice for pkgme to
have some sort of structure for guesswork.

jml

Revision history for this message
Daniel Holbach (dholbach) wrote :

The problem with guesswork bits (or clues) is that they quite often might not be explicitly tied to the backend. For example Doxygen docs are unrelated to the cmake infrastructure.

I guess I'm trying to find out if there are plans to have pkgme do some more general data analysis, but this bug report might not be the best place for this. Maybe we can have a conversation about this at some stage.

For this bug report I'd suggest to set the importance to Low and just catch the crash with a helpful error message.

Revision history for this message
Jonathan Lange (jml) wrote :

On 30 May 2012 10:11, Daniel Holbach <email address hidden> wrote:
> The problem with guesswork bits (or clues) is that they quite often
> might not be explicitly tied to the backend. For example Doxygen docs
> are unrelated to the cmake infrastructure.
>

Ahh, I see.

> I guess I'm trying to find out if there are plans to have pkgme do some
> more general data analysis, but this bug report might not be the best
> place for this. Maybe we can have a conversation about this at some
> stage.

+1

> For this bug report I'd suggest to set the importance to Low and just
> catch the crash with a helpful error message.

+1

jml

Changed in pkgme:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Jonathan Lange (jml) wrote :

I'm really tempted to close this as wontfix, even though there's definitely _something_ buggy here. Any objections Daniel?

Revision history for this message
Daniel Holbach (dholbach) wrote :

No, not at all.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.