build-pkgs --reuse rebuilds some packages even without source changes

Bug #1999941 reported by Luis Sampaio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Luis Sampaio

Bug Description

Brief Description
-----------------

build-pkgs --reuse is rebuilding packages even though there are no source changes.

Severity
--------
Major: reuse feature

Steps to Reproduce
------------------

1 - Create "Source" environment

initialized the env
downloader
build-pkgs
build-image
copied the deb-local-build and deb-local-source to webserver

2 - Created another env to work as destination environment

initialized the env
downloader (it should download the same binaries as the source env)
build the packages:

export STX_SHARED_REPO="http://<URL>/deb-local-build/"
export STX_SHARED_SOURCE="http://<URL>/deb-local-source/"

build-pkgs --reuse

35 std packages were rebuilt but the source code is the same as the source env so I think there may be some issue.

All packages that were rebuilt have the log saying:

shared_cheksum for these shows as "None"

Expected Behavior
------------------
No packages should be rebuilt without source changes

Actual Behavior
----------------
Some packages are rebuilt

Reproducibility
---------------
Yes

Last Pass
---------
NA.

Timestamp/Logs
--------------
NA

Workaround
--------------
NO

Revision history for this message
Luis Sampaio (lsampaio) wrote :

It looks like the checksum is correct in the file so it may be a problem with the code that loads the checksums and verifies if it matches (source vs dest)

Changed in starlingx:
assignee: nobody → Luis Sampaio (lsampaio)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to root (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/root/+/868005

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/c/starlingx/root/+/868005
Committed: https://opendev.org/starlingx/root/commit/7b957158bbaffd22848f757d967e8dea58d54f21
Submitter: "Zuul (22348)"
Branch: master

commit 7b957158bbaffd22848f757d967e8dea58d54f21
Author: Luis Sampaio <email address hidden>
Date: Fri Dec 16 13:12:03 2022 -0800

    Reuse fix to not rebuild if no source changes

    build-pkgs --reuse rebuilds some packages even without source
    changes. This commit fixes the checksum comparison which was
    not working correctly for all package paths.

    Test Plan:
    Pass: build-pkgs --reuse and no packages were rebuilt
    Pass: build-pkgs (no packages were rebuilt)
    Pass: make changes to 1 package and call build-pkgs to
    rebuild it
    Pass: build-pkgs --clean (rebuilds all local packages)

    Closes-Bug: 1999941
    Signed-off-by: Luis Sampaio <email address hidden>
    Change-Id: Id93a692f6a69212967453e42809e66595ae01f59

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → High
Ghada Khalil (gkhalil)
tags: added: stx.8.0 stx.build
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.