Bug 12318 - devtool upgrade+finish not deleting old files
Summary: devtool upgrade+finish not deleting old files
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M1
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-11-07 20:08 UTC by Paul Eggleton
Modified: 2017-11-12 19:57 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2017-11-07 20:08:11 UTC
If you do a devtool upgrade, make and commit any needed changes, then run devtool finish, devtool is supposed to remove the old files (old recipe and any patches that were removed) from the metadata, but this appears not to be working.

Here's a reproducer (note that at this time (poky rev 65d23bd7986615fdfb0f1717b615534a2a14ab80) ffmpeg is at version 3.3.3, so this is assumed):

1) Ensure LICENSE_FLAGS_WHITELIST = "commercial" is set in your configuration
2) devtool upgrade ffmpeg -V 3.3.5
3) (in a separate shell, within the source tree): git rebase --skip
4) devtool finish ffmpeg ../meta

Note that devtool upgrade and finish both have to cooperate to make this work - devtool upgrade records the original files it copies, and devtool finish takes that recorded list and removes them, so the bug could be at either end.
Comment 1 Paul Eggleton 2017-11-07 20:48:49 UTC
It turns out that this is only a problem if you specify a relative path as I did in the above example, so we just need to call os.path.abspath() in the right place in the code to fix it.