Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xbps-src throws an error of unknown trigger #26717

Closed
vadim-zyamalov opened this issue Nov 26, 2020 · 8 comments
Closed

xbps-src throws an error of unknown trigger #26717

vadim-zyamalov opened this issue Nov 26, 2020 · 8 comments

Comments

@vadim-zyamalov
Copy link

vadim-zyamalov commented Nov 26, 2020

System

  • xuname: Void 5.9.11_1 i686 GenuineIntel uptodate rF
  • package: xbps-src

Expected behavior

Custom package is created.

Actual behavior

I'm trying to build a custom package for st, but I can't copy a .desktop file to /usr/share/applications.
xbps-src pkg st aborts with the error unknown trigger update-desktopdb while executing 04-create-xbps-metadata-scripts hook.

Steps to reproduce the behavior

I've cloned void-packages and called xbps-src binary-bootstrap.
I've deleted all folders from srcpkgs except st & st-terminfo.
I've used the template file in template.zip.
Specifically, I've added vinstall ${FILESDIR}/st.desktop 644 usr/share/applications to the post_install function.

@biopsin
Copy link
Contributor

biopsin commented Nov 26, 2020

Can't reproduce..print the /builddir/.xbps-st/do_install.log

@vadim-zyamalov
Copy link
Author

Sure

mkdir -p /destdir//st-0.8.4/usr/bin
cp -f st /destdir//st-0.8.4/usr/bin
chmod 755 /destdir//st-0.8.4/usr/bin/st
mkdir -p /destdir//st-0.8.4/usr/share/man/man1
sed "s/VERSION/0.8.4/g" < st.1 > /destdir//st-0.8.4/usr/share/man/man1/st.1
chmod 644 /destdir//st-0.8.4/usr/share/man/man1/st.1
Please see the README file regarding the terminfo entry of st.
cp -f st.desktop /usr/share/applications

@biopsin
Copy link
Contributor

biopsin commented Nov 26, 2020

ah update-desktopdb

It is automatically added to packages that have /usr/share/applications available as a directory.
I suppose the trigger is not needed in your template then

@Duncaen
Copy link
Member

Duncaen commented Nov 26, 2020

I've deleted all folders from srcpkgs except st & st-terminfo.

This is not supported, it looks up the xbps-triggers package to verify that the trigger exist.
Deleting all packages from the repository breaks a lot more things like dependency checks.

@vadim-zyamalov
Copy link
Author

I've deleted all folders from srcpkgs except st & st-terminfo.

This is not supported, it looks up the xbps-triggers package to verify that the trigger exist.
Deleting all packages from the repository breaks a lot more things like dependency checks.

Maybe that's the case. I always try to keep as little extra files as possible...
I'll check it in couple of hours whether it works.

@Duncaen
Copy link
Member

Duncaen commented Nov 26, 2020

Its 100% the case, xbps-src needs the tree of all involved packages to function normally, including all dependencies of the package you build and their dependencies and all the packages that are required to setup and update the masterdir.

Here is the exact place where the error happens, it looks up the xbps-triggers source package to verify that the trigger it tries to include exist:

if [ ! -f $XBPS_TRIGGERSDIR/$f ]; then
rm -f $tmpf
msg_error "$pkgname: unknown trigger $f, aborting!\n"
fi

readonly XBPS_TRIGGERSDIR=$XBPS_SRCPKGDIR/xbps-triggers/files

@vadim-zyamalov
Copy link
Author

Yep, it works, my fault!
Thanks and sorry for wasting your time!

@jirutka
Copy link
Contributor

jirutka commented Jul 10, 2021

I just ran into the same problem.

This is not supported, it looks up the xbps-triggers package to verify that the trigger exist.
Deleting all packages from the repository breaks a lot more things like dependency checks.

How can the users create repository for their own templates?

jirutka added a commit to jirutka/my-void-packages that referenced this issue Jul 13, 2021
It's needed for building packages that use triggers.

See void-linux/void-packages#26717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants