homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
300 stars 28 forks source link

Python error when trying to make an OpenEmu recipe #115

Closed flammable closed 7 years ago

flammable commented 7 years ago

I noticed that there isn't an OpenEmu.munki recipe yet, so I wanted to make one. @sheagcraig already made .download and .jss recipes, so I was hoping to use Recipe Robot to ignore his recipes, then alter the newly-created .munki recipe to use his .download recipe as the parent.

I couldn't figure out how to "ignore existing" from the GUI (though I'm pretty sure you told me at PSU 2016), so I turned to using the script. Here's what I get when inputting the application:

mike$ "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe-robot" /Applications/OpenEmu.app --ignore-existing --verbose
[WARNING] Will build recipes even if they already exist in "autopkg search" results. Please don't upload duplicate recipes to public AutoPkg repos on GitHub.

                      -----------------------------------
                     |  Welcome to Recipe Robot v1.0.4.  |
                      -----------------------------------
                                \   _[]_
                                 \  [oo]
                                   d-||-b
                                     ||
                                   _/  \_

Processing /Applications/OpenEmu.app ...
Input path looks like an app.
Validating app...
    App seems valid
Getting app name...
    App name is: OpenEmu
Getting bundle identifier...
    Bundle identifier is: org.openemu.OpenEmu
Checking for a Sparkle feed...
    Sparkle feed is: https://raw.github.com/OpenEmu/OpenEmu-Update/master/appcast.xml
Getting information from Sparkle feed...
    The Sparkle feed provides a version number
    The latest version is 2.0.3
    Download URL is: https://github.com/OpenEmu/OpenEmu/releases/download/v2.0.3/OpenEmu_2.0.3.zip
Getting GitHub repo...
    GitHub repo is: OpenEmu/OpenEmu
Getting GitHub description...
    GitHub description is: :video_game: Retro video game emulation for macOS
Getting information from latest GitHub release...
    GitHub release download format is: zip
    GitHub release download URL is: https://github.com/OpenEmu/OpenEmu/releases/download/v2.0.3/OpenEmu_2.0.3.zip
    Download URL is: https://github.com/OpenEmu/OpenEmu/releases/download/v2.0.3/OpenEmu_2.0.3.zip
Downloading file for further inspection...
    Downloaded to /Users/mike/Library/Caches/Recipe Robot/2016-10-25_22-34-22_957197/OpenEmu_2.0.3.zip
Determining download format...
    File extension is zip
Getting developer name from GitHub...
    GitHub developer is: None
Downloading file for further inspection...
    Downloaded to /Users/mike/Library/Caches/Recipe Robot/2016-10-25_22-34-22_957197/OpenEmu_2.0.3.zip
Determining download format...
    File extension is zip
Looking for version key...
    Version key is: CFBundleShortVersionString (2.0.3)
Looking for app icon...
    App icon is: /Applications/OpenEmu.app/Contents/Resources/OpenEmu
Gathering code signature information...
    App is not signed
[ERROR] Recipe Robot exploded with unexpected error: 'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe-robot", line 98, in main
    time, _ = recipe_robot_lib.generate_recipes(facts, prefs)  # pylint: disable=assignment-from-no-return
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe_robot_lib/tools.py", line 117, in run_func
    result = func(*args, **kwargs)
  File "/Applications/Recipe Robot.app/Contents/Resources/scripts/recipe_robot_lib/recipe_generator.py", line 95, in generate_recipes
    facts["developer"].replace("/", "-"))
AttributeError: 'NoneType' object has no attribute 'replace'

[ERROR] 
                                    _[]_
                                    [xx]
                                   q-||-p
                                     ||
                                   _/  \_

The GUI application gets to nearly the same point, and stops at the duplicate recipe check (instead of erroring):


                      -----------------------------------
                     |  Welcome to Recipe Robot v1.0.4.  |
                      -----------------------------------
                                \   _[]_
                                 \  [oo]
                                   d-||-b
                                     ||
                                   _/  \_

Processing /Applications/OpenEmu.app ...
Input path looks like an app.
Validating app...
    App seems valid
Getting app name...
    App name is: OpenEmu
Getting bundle identifier...
    Bundle identifier is: org.openemu.OpenEmu
Checking for a Sparkle feed...
    Sparkle feed is: https://raw.github.com/OpenEmu/OpenEmu-Update/master/appcast.xml
Getting information from Sparkle feed...
    The Sparkle feed provides a version number
    The latest version is 2.0.3
    Download URL is: https://github.com/OpenEmu/OpenEmu/releases/download/v2.0.3/OpenEmu_2.0.3.zip
Getting GitHub repo...
    GitHub repo is: OpenEmu/OpenEmu
Getting GitHub description...
    GitHub description is: :video_game: Retro video game emulation for macOS
Getting information from latest GitHub release...
    GitHub release download format is: zip
    GitHub release download URL is: https://github.com/OpenEmu/OpenEmu/releases/download/v2.0.3/OpenEmu_2.0.3.zip
    Download URL is: https://github.com/OpenEmu/OpenEmu/releases/download/v2.0.3/OpenEmu_2.0.3.zip
Downloading file for further inspection...
    10.00%
    19.99%
    29.99%
    39.99%
    49.98%
    59.98%
    69.98%
    79.97%
    89.97%
    99.97%
    Downloaded to /Users/mike/Library/Caches/Recipe Robot/2016-10-26_15-31-32_358272/OpenEmu_2.0.3.zip
Determining download format...
    File extension is zip
Getting developer name from GitHub...
    GitHub developer is: None
Downloading file for further inspection...
    10.00%
    19.99%
    29.99%
    39.99%
    49.98%
    59.98%
    69.98%
    79.97%
    89.97%
    99.97%
    Downloaded to /Users/mike/Library/Caches/Recipe Robot/2016-10-26_15-31-32_358272/OpenEmu_2.0.3.zip
Determining download format...
    File extension is zip
Looking for version key...
    Version key is: CFBundleShortVersionString (2.0.3)
Looking for app icon...
    App icon is: /Applications/OpenEmu.app/Contents/Resources/OpenEmu
Gathering code signature information...
    App is not signed
Searching for existing AutoPkg recipes for OpenEmu...
    Found existing recipe(s):
        OpenEmu.jss.recipe
        OpenEmu.download.recipe
        OpenEmu.pkg.recipe
[ERROR] Sorry, AutoPkg recipes already exist for this app, and I can't blend new recipes with existing recipes.

Here are my suggestions:
    - See if one of the above recipes meets your needs, either as-is or using an override.
    - Write your own recipe using one of the above as the ParentRecipe.
    - Use Recipe Robot to assist in the creation of a new child recipe, as seen here:
      https://youtu.be/5VKDzY8bBxI?t=2829
[ERROR] 
                                    _[]_
                                    [xx]
                                   q-||-p
                                     ||
                                   _/  \_

Any idea what's wrong?

homebysix commented 7 years ago

Whoops! That looks like a bug. It shouldn't be trying to .replace() on a developer's name if the app is unsigned.

flammable commented 7 years ago

Whew, thanks! Relieved to know it's not something I'm doing.

flammable commented 7 years ago

Awesome, thanks Elliot! :)