You are not logged in.

#1 2016-11-06 23:36:47

Silberling
Member
Registered: 2014-06-12
Posts: 11

[Solved] Building Pantheon - appcenter-bzr failes because of vapi

Hi,

I read in the comments section of the wiki I just had to install pantheon-bzr-meta.

Building appcenter-bzr fails because appstream has no vapi files.

So i took some time and tried to build them myself (without knowing much about vala):

user@archvm ~/packages> cat appstream/appstream.files
include/AppStream/appstream.h
include/AppStream/as-metadata.h
include/AppStream/as-checksum.h
include/AppStream/as-validator.h
include/AppStream/as-bundle.h
include/AppStream/as-provided.h
include/AppStream/as-translation.h
include/AppStream/as-pool.h
include/AppStream/as-validator-issue.h
include/AppStream/as-enums.h
include/AppStream/as-suggested.h
include/AppStream/as-image.h
include/AppStream/as-release.h
include/AppStream/as-distro-details.h
include/AppStream/as-icon.h
include/AppStream/as-spdx.h
include/AppStream/as-screenshot.h
include/AppStream/as-component.h
include/AppStream/as-utils.h
include/AppStream/as-category.h
lib/libappstream.so
user@archvm ~/packages> cat appstream/appstream.namespace
AppStream
vala-gen-introspect appstream appstream
vapigen --pkg glib-2.0 --pkg gio-2.0 --pkg gdk-pixbuf-2.0 --library appstream appstream/appstream.gi --vapidir=/usr/share/vala/vapi --vapidir=/usr/share/vala-0.34/vapi/
sudo cp appstream.vapi /usr/share/vala/vapi

Now i get errors like this:

/tmp/yaourt-tmp-user/aur-appcenter-bzr/src/appcenter/src/Core/Client.vala:247.81-247.98: error: The type name `AppStream.Category' could not be found
    public Gee.Collection<AppCenterCore.Package> get_applications_for_category (AppStream.Category category) {

The .gi file told me there are symbols like AsCategory. Having a real quick look at the headers confirmed this. So I edited the .gi file and removed all the As* prefixes as I thought this might be the prefix for AppStream and c has no namespaces. Maybe the .gi file maps correctly later on as it saves the original symbols.

Now I get a lot of errors like:

/tmp/yaourt-tmp-user/aur-appcenter-bzr/src/appcenter/src/Core/Client.vala:88.34-88.63: warning: Access to static member `AppStream.Component.get_pkgnames' with an instance reference
        foreach (var pkg_name in package.component.get_pkgnames ()) {

Now i stopped. Out of frustration and as I read so far, there are people here in this forum who are running pantheon, so doing all this seems kinda wrong and to be honest, after some hours I lost most of my patience. I don't believe I am doing the right thing. If all this work would have to be done and other people have pantheon running, either I am doing a whole bunch of stupid stuff here or there is a huge communication issue from users -> maintainers -> developers. And I am pretty sure, the latter one is not the problem.

So... What am I doing wrong? I need some help here.

Thanks

SIlberling

Last edited by Silberling (2017-07-03 20:56:52)

Offline

#2 2016-11-07 00:41:30

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: [Solved] Building Pantheon - appcenter-bzr failes because of vapi

Have a look at the README of AppStream:
https://github.com/ximion/appstream

Apparently there's a build flag to create vapi files. The appstream package in the official repositories does not use this flag. So you'll have to get the file through other means. One would be to build appstream with this option, extract the vapi file and then use it in building appcenter-bzr (have a look at the man page of valac, you can specify vapi search directories using --vapidir)

Another way to go at it is to take the official repositories' PKGBUILD for appstream using abs and then modify it to include the build flag and necessary additional dependencies to build your own appstream which includes the vapi file. This is what is mentioned in the comments of the AUR package you're trying to build. As for your question what ABS is you posted there, the answer is just one wiki search consisting of three letters away smile

Does this get you anywhere?

Offline

#3 2016-11-07 01:24:45

Silberling
Member
Registered: 2014-06-12
Posts: 11

Re: [Solved] Building Pantheon - appcenter-bzr failes because of vapi

My god it's working.
Spending the whole day working around problems made me totally blind. Most of the sources to solutions were already open in my browser at some point today, but due to the lack of patience after hours of work I just didn't see them -.-
And now I recall what ABS is...

Gotta go to bed now :-P

Thanks so uch

Offline

#4 2016-11-07 02:32:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Building Pantheon - appcenter-bzr failes because of vapi

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB