"fpb --build" command creates two packages instead of one

Bug #1451751 reported by Iryna Vovk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Sebastian Kalinowski

Bug Description

Steps to reproduce:
1. Build plugin with command:
fpb --build <place_where_it_will_be_placed>

Result:
the two packages were created (the first and the second version)

Expected result:
should be one package with the first version

Additional info:
ivovk@user-All-Series:~/git/fuel-plugin-contrail$ cd ..
ivovk@user-All-Series:~/git$ fpb --build fuel-plugin-contrail/
Plugin is built
ivovk@user-All-Series:~/git$ cd fuel-plugin-contrail/
ivovk@user-All-Series:~/git/fuel-plugin-contrail$ ls
contrail-1.0-1.0.0-0.noarch.rpm
contrail-1.0-1.0.0-1.noarch.rpm

Revision history for this message
Nastya Urlapova (aurlapova) wrote :

Could you please add Fuel version?

Changed in fuel:
milestone: none → 6.1
status: New → Incomplete
assignee: nobody → Fuel Python Team (fuel-python)
Revision history for this message
Sebastian Kalinowski (prmtl) wrote :

Please specify version of Fuel Plugin Builder and commit of fuel-plugin-contrail on which it was observed.

Revision history for this message
Sebastian Kalinowski (prmtl) wrote :

I've reproduced it with fpb 2.0.0 and fuel-contrail-plugin ee7fbf8d2a99b3ebc10784d77187f11762149592

Changed in fuel:
status: Incomplete → Confirmed
assignee: Fuel Python Team (fuel-python) → Sebastian Kalinowski (prmtl)
Revision history for this message
Iryna Vovk (ivovk) wrote :

I observed it with fuel-plugin-builder 2.0.0 and commit 5901a8f4c2f15b9f02ea4ef7eaaf6aaf4b53ed8a

Changed in fuel:
importance: Undecided → High
Revision history for this message
Sebastian Kalinowski (prmtl) wrote :

Bug appear if developer used development version of fuel-plugin-builder, before commit https://github.com/stackforge/fuel-plugins/commit/8056c7edc1dff7d660421c6d047e4d3956e7b50e, to build plugin and then used a newer one to build it.

Produced RPMs are stored in plugin-name/.build/rpm/RPMS dir, which was not cleaned, so with older version of plugin
we got contrail-1.0-1.0.0-0.noarch.rpm and after using new contrail-1.0-1.0.0-1.noarch.rpm. In the build process all RPMs from build dir are copied to plugin base dir which is observed as "building two versions of plugin".

Solution is to simply clean rpm build dir.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

Fix proposed to branch: master
Review: https://review.openstack.org/180455

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

Reviewed: https://review.openstack.org/180455
Committed: https://git.openstack.org/cgit/stackforge/fuel-plugins/commit/?id=2be481c352f8c5aa725828b4c2ca3f991d2bc990
Submitter: Jenkins
Branch: master

commit 2be481c352f8c5aa725828b4c2ca3f991d2bc990
Author: Sebastian Kalinowski <email address hidden>
Date: Wed May 6 11:11:20 2015 +0200

    Clean build dir before building plugin package

    If there are some artifacts left in build dir, for example old
    RPMs may cause different side effects like having two version of
    packages of the same plugin in the end of the build.

    Change-Id: I427065cad0c1e610b637d312e91c60fd521ea14e
    Closes-Bug: #1451751

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Vladimir Khlyunev (vkhlyunev) wrote :

Verified on master branch of stackforge/fuel-plugins

Changed in fuel:
status: Fix Committed → Fix Released
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.