[Craft] [Bug 426724] Missing support for adding dependencies to a specific package version

2024-03-27 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=426724

--- Comment #7 from Ingo Klöcker  ---
Re-reading the code that evaluates the dependencies, I saw that one can specify
a version number to ensure a minimum version of some dependency, but one cannot
specify what version of a dependency is used. The selection of the dependency
version that's used for a build happens before and independently of the
specified version number.
https://invent.kde.org/packaging/craft/-/blob/master/bin/Blueprints/CraftDependencyPackage.py?ref_type=heads#L101

-- 
You are receiving this mail because:
You are watching all bug changes.

[Craft] [Bug 426724] Missing support for adding dependencies to a specific package version

2024-03-27 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=426724

--- Comment #6 from Ralf Habacker  ---
(In reply to Ingo Klöcker from comment #5)
> Setting
>   self.runtimeDependencies["extragear/libalkimia"]
> to anything other than None makes no sense. The only thing that's relevant
> is the keys of the dependencies dict. The values are ignored.

Thanks for the clarification. Since some blueprints use such a version

> :~/CraftRoot>find etc/blueprints/locations/ -name '*.py' | xargs grep -Hn 
> runtimeDep | grep -v None
> etc/blueprints/locations/craft-blueprints-kde/libs/qt5/qtbase/qtbase.py:104:  
>   self.runtimeDependencies["libs/openssl"] = "1.1"
> etc/blueprints/locations/craft-blueprints-kde/libs/qt5/qtconnectivity/qtconnectivity.py:27:
> self.runtimeDependencies["libs/qt5/qtandroidextras"] = "default"
> etc/blueprints/locations/craft-blueprints-kde/extragear/digikam/digikam.py:56:
> self.runtimeDependencies["libs/ffmpeg"] = "4.4"

I thought that should work.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Craft] [Bug 426724] Missing support for adding dependencies to a specific package version

2024-03-27 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=426724

Ingo Klöcker  changed:

   What|Removed |Added

 CC||kloec...@kde.org

--- Comment #5 from Ingo Klöcker  ---
Setting
  self.runtimeDependencies["extragear/libalkimia"]
to anything other than None makes no sense. The only thing that's relevant is
the keys of the dependencies dict. The values are ignored.

In KDE's GitLab you can request a specific version by setting this version in
the .craft.ini file, e.g. add the following to the .craft.ini file in
KMyMoney's master branch to request the master version of libalkimia:

```
[BlueprintSettings]
extragear/libalkimia.version=master
```

When you run craft manually you can achieve the same with the command line
option `--options extragear/libalkimia.version=master`.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Craft] [Bug 426724] Missing support for adding dependencies to a specific package version

2024-03-27 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=426724

--- Comment #4 from Ralf Habacker  ---
Hi,
i have a real world example for this: 

Building package kmymoney from master branch depends on using likalkimia from
git master branch, so I added  in the craft blueprint for kmymoney 

if self.buildTarget != "master":
self.runtimeDependencies["extragear/libalkimia"] = None
else:
self.runtimeDependencies["extragear/libalkimia"] = 'master'


After that running 

 craft --target master kmymoney 

still fetches libalkimia from the standard branch and not from the master
branch and fails to configure with 

CMake Error at CMakeLists.txt:151 (find_package):
  Could not find a configuration file for package "LibAlkimia5" that is
  compatible with requested version "8.1.72".

  The following configuration files were considered but not accepted:

/home/user/CraftRoot/lib/cmake/LibAlkimia5-8.1/LibAlkimia5Config.cmake,
version: 8.1.2

I need to change the defaultTarget to 'master' in libalkimia.py  as workaround.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Craft] [Bug 426724] Missing support for adding dependencies to a specific package version

2020-09-22 Thread Hannah von Reth
https://bugs.kde.org/show_bug.cgi?id=426724

--- Comment #3 from Hannah von Reth  ---
Hi craft at the moment deploys every runtime dependency, a blacklist can be
used to slim down the deployment.

Magically resolving the dependencies is not that easy in a cross platform setup
and in the end there are always data files and plugins for which it is hard to
decide on what to deploy.

So everything that is needed during runtime should be a runtime dependency.
Cmake and msys are build time dependencies as you never want to deploy them to
a users system.

Cheers,
Hannah

-- 
You are receiving this mail because:
You are watching all bug changes.

[Craft] [Bug 426724] Missing support for adding dependencies to a specific package version

2020-09-22 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=426724

--- Comment #2 from Ralf Habacker  ---
(In reply to Hannah von Reth from comment #1)
> The best solution currently is
> https://github.com/owncloud/craft-blueprints-owncloud/blob/master/owncloud/
> owncloud-client/owncloud-client.py#L44

Thanks for pointer. 

A remaining question is in which case 'RuntimeDependencies' or
'BuildDependencies' should be used ?
0
For obs, I usually specify build time dependencies (usually the development
package) and runtime dependencies only when needed, as runtime dependencies are
resolved at the shared library level by default during installation (use rpm -q
--provides and rpm -q --requires).

I assume that craft has no such support and I have to use 'RuntimeDependencies'
to install the library package for qt5webkit and 'BuildDependencies' to install
the development package ?

Since in the blueprint (own cloud client) mentioned above 'RuntimeDependencies'
are used, I assume that this will install the development package when building
the package, which have this dependency and the runtime package when installing
- is that correct?

-- 
You are receiving this mail because:
You are watching all bug changes.

[Craft] [Bug 426724] Missing support for adding dependencies to a specific package version

2020-09-22 Thread Hannah von Reth
https://bugs.kde.org/show_bug.cgi?id=426724

--- Comment #1 from Hannah von Reth  ---
The best solution currently is
https://github.com/owncloud/craft-blueprints-owncloud/blob/master/owncloud/owncloud-client/owncloud-client.py#L44

-- 
You are receiving this mail because:
You are watching all bug changes.