Incorrect sqlheavy dependency

Bug #1002185 reported by Pim Vullers on 2012-05-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BeatBox
Low
Victor Martinez
Noise
Fix Released
Low
Victor Martinez

Bug Description

Noise still requires sqlheavy 0.1 when version 0.2 (which is optional) is available. If I'm right sqlheavy-0.1 should not be in the first list of mandatory deps, but only be requested if 0.2 is missing.

Scott Ringwelski (sgringwe) wrote :

Is sqlheavy 0.2 in universal?

Pim Vullers (pimvullers) wrote :

I don't know, I'm not using Ubuntu but Gentoo. And I build it from source.

This is the relevant part from CMakeLists.txt:

pkg_check_modules(DEPS
    REQUIRED
    glib-2.0
...
    sqlheavy-0.1
...
    libpeas-1.0)
# Check if we have sqlheavy-0.2

if(${SQLHEAVY_USE_2})
pkg_check_modules(SQLHEAVY sqlheavy-0.2)
set(ADD_PKG ${ADD_PKG} sqlheavy-0.2)
message("-- Will use sqlheavy-0.2")
else()
set(ADD_PKG ${ADD_PKG} sqlheavy-0.1)
pkg_check_modules(SQLHEAVY sqlheavy-0.1)
message("-- Will use sqlheavy-0.1")
endif()

If I'm correct sqlheavy-0.1 should dropped from the first REQUIRED list and the check should be altered to :

else()
set(ADD_PKG ${ADD_PKG} sqlheavy-0.1)
pkg_check_modules(SQLHEAVY REQUIRED sqlheavy-0.1)
message("-- Will use sqlheavy-0.1")
endif()

i.e. do not require sqlheavy-0.1 in the first place but check if sqlheavy-0.2 is available if so use that, otherwise require sqlheavy-0.1

Scott Ringwelski (sgringwe) wrote :

What you're suggesting is the same as what is currently implemented: require >= 0.1, using 0.2 if possible.

Since 0.2 is not in universe repos and 0.1 is, 0.1 is the required version.

Changed in beat-box:
status: New → Invalid

The difference is that for 0.2 to be used now, you also need to have 0.1 since otherwise the first REQUIRED check fails and it won't even get to looking for 0.2

Corentin Noël (tintou) on 2012-06-29
Changed in noise:
status: New → Invalid
Pim Vullers (pimvullers) wrote :

Could you please explain why you marked this bug as invalid?

Corentin Noël (tintou) wrote :

Because as you said, the 0.2 is already used if found

Pim Vullers (pimvullers) wrote :

The issue is that it requires 0.1 whether 0.2 is available or not. (i.e. build fails if you only have 0.2)

Victor Martinez (victored) wrote :

Indeed, this is a valid issue. Thanks Pim.

Changed in noise:
status: Invalid → Confirmed
Changed in beat-box:
assignee: nobody → Victor Eduardo (victored)
importance: Undecided → Low
milestone: none → 0.6
status: Invalid → Fix Committed
Pim Vullers (pimvullers) wrote :

victored: your commit does not completely solve this issue.

1. sqlheavy-0.1 is still in the REQUIRED DEPS list, i.e. it is still required
2. the keyword REQUIRED should be added to the pkg_check_modules call for sqlheavy-0.1 (as in comment #2), otherwise CMake will not fail if no sqlheavy version is found.

Changed in beat-box:
status: Fix Committed → Confirmed
Victor Martinez (victored) wrote :

My bad, fixed.

Changed in beat-box:
status: Confirmed → Fix Committed
Changed in beat-box:
status: Fix Committed → Fix Released
Changed in noise:
importance: Undecided → Low
milestone: none → luna-beta1
status: Confirmed → Fix Committed
assignee: nobody → Victor Eduardo (victored)
Changed in noise:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers