Bug 7947

Summary: no log created by upgradehelper.py when trying to upgrade a recipe
Product: [Yocto Project Subprojects] Automated Update Handler Reporter: Costin <costin.c.constantin>
Component: Automatic Update HandlerAssignee: Aníbal Limón <anibal.limon>
Status: VERIFIED FIXED QA Contact: Costin <costin.c.constantin>
Severity: normal    
Priority: Medium CC: richard.purdie
Version: unspecified   
Target Milestone: 1.9 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Bug Depends on:    
Bug Blocks: 7488    

Description Costin 2015-07-02 16:15:49 UTC
Hello,

Got hands on the upgradehelper.py and tried to do a recipe update. After doing so there was no log created, though the tool reported it should be one.

Here are my action steps:

1) have a cloned poky first
2) clone updatehelper under poky/build:  git clone http://git.yoctoproject.org/git/auto-upgrade-helper
3) create file upgrade-helper.conf under build dir: upgrade-helper/upgrade-helper.conf

[settings]
clean_sstate=yes
clean_tmp=yes
drop_previous_commits=yes

4) add following lines in local.conf:
INHERIT =+ "distrodata"
require conf/distro/include/recipe_color.inc
require conf/distro/include/distro_alias.inc
require conf/distro/include/maintainers.inc
require conf/distro/include/upstream_tracking.inc

INHERIT =+ "buildhistory"
BUILDHISTORY_COMMIT = "1"

5) try to update a recipe (in my case tried the eg. in README file):

cosscat@ubnt:/media/poky/8poky/build/auto-upgrade-helper$ ./upgradehelper.py xmodmap --to_version 1.0.9
ERROR: smtp host not set! Sending emails disabled!
ERROR: 'From' address not set! Sending emails disabled!
INFO: ATTEMPT PACKAGE 1/1
INFO: xmodmap: Upgrading to 1.0.9
INFO: xmodmap: Detecting git repository location ...
INFO: xmodmap: Cleaning git repository of temporary branch ...
INFO: xmodmap: Fetch & unpack original version ...
INFO: xmodmap: Renaming recipes, reset PR (if exists) ...
ERROR: xmodmap: The following git command failed: mv -f /media/poky/8poky/meta/recipes-graphics/xorg-app/xmodmap_1.0.9.bb /media/poky/8poky/meta/recipes-graphics/xorg-app/xmodmap_1.0.9.bb
ERROR: xmodmap: Upgrade FAILED! Logs and/or file diffs are available in /media/poky/8poky/build/upgrade-helper/work/xmodmap
INFO: xmodmap: Auto commit changes ...
INFO: xmodmap: Nothing to commit!
cosscat@ubnt:/media/poky/8poky/build/auto-upgrade-helper$

I expected the update to fail, because my recipe is already at latest ver. (http://xorg.freedesktop.org/releases/individual/app/), but was expecting to see a log file as indicated in the command output.

cosscat@ubnt:/media/poky/8poky/build/upgrade-helper/work/xmodmap$ ls
cosscat@ubnt:/media/poky/8poky/build/upgrade-helper/work/xmodmap$

I will try to manually downgrade the recipe to 1.0.8 and then try again to see what happens.

Tested on AUH hash: 48ec9d47525b076276e48023f21fff732d18e24d

Costin
Comment 3 Costin 2016-02-16 11:50:59 UTC
Hello,

Tested on latest commit da6a109ae3083575988fb86533d42f951bc604b2 following comment#1's steps.
This time a message is displayed on the screen.

somemachine:~/poky/1build/auto-upgrade-helper$ ./upgradehelper.py m4 --to_version 1.4.17
ERROR: smtp host not set! Sending emails disabled!
ERROR: 'From' address not set! Sending emails disabled!
INFO: Building gcc runtimes ...
INFO:  building gcc runtime for qemux86
INFO:  building gcc runtime for qemux86-64
INFO:  building gcc runtime for qemuarm
INFO:  building gcc runtime for qemumips
INFO:  building gcc runtime for qemuppc
INFO: ########### The list of recipes to be upgraded #############
INFO: ############################################################

Marking as verified