Bug 7947 - no log created by upgradehelper.py when trying to upgrade a recipe
Summary: no log created by upgradehelper.py when trying to upgrade a recipe
Status: VERIFIED FIXED
Alias: None
Product: Automated Update Handler
Classification: Yocto Project Subprojects
Component: Automatic Update Handler (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9 M2
Assignee: Aníbal Limón
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks: 7488
  Show dependency tree
 
Reported: 2015-07-02 16:15 UTC by Costin
Modified: 2016-10-26 09:27 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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