mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
xbps-triggers: use the virtualpkg trigger to convert vpkg files to the XBPS 0.33 format.
This commit is contained in:
parent
73cc5a1633
commit
e96e0577b2
2 changed files with 21 additions and 6 deletions
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# This trigger is obsolete in xbps>=0.18.
|
# This trigger converts virtualpkg conf files to the XBPS 0.33 format.
|
||||||
#
|
|
||||||
# Enables or disables a virtual package to xbps.conf.
|
|
||||||
#
|
#
|
||||||
# Arguments: $ACTION = [run/targets]
|
# Arguments: $ACTION = [run/targets]
|
||||||
# $TARGET = [post-install/pre-remove]
|
# $TARGET = [post-install/pre-remove]
|
||||||
|
@ -21,10 +19,27 @@ export PATH="$PATH:/usr/local/bin"
|
||||||
|
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
targets)
|
targets)
|
||||||
echo "post-install post-remove"
|
echo "post-install"
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
# Do nothing, keep it just for compatibility.
|
for f in etc/xbps/virtualpkg.d/*.conf; do
|
||||||
|
file=$(basename $f)
|
||||||
|
file=${file%.conf}
|
||||||
|
if [ -f etc/xbps/virtualpkg.d/${file}.vpkg ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "Generating virtualpkg configuration file for: ${file} ..."
|
||||||
|
cat "$f" | while read line; do
|
||||||
|
pkg=$(echo "$line"|awk '{print $2}')
|
||||||
|
vpkg=$(echo "$line"|awk '{print $6}')
|
||||||
|
vpkg="$(echo $vpkg|sed 's,",,g')"
|
||||||
|
if [ "$pkg" = "Virtual" ]; then
|
||||||
|
echo "$line" > etc/xbps/virtualpkg.d/${file}.vpkg
|
||||||
|
else
|
||||||
|
echo "virtualpkg=${vpkg}:${pkg}" >> etc/xbps/virtualpkg.d/${file}.vpkg
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'xbps-triggers'
|
# Template file for 'xbps-triggers'
|
||||||
pkgname=xbps-triggers
|
pkgname=xbps-triggers
|
||||||
version=0.74
|
version=0.75
|
||||||
revision=1
|
revision=1
|
||||||
noarch=yes
|
noarch=yes
|
||||||
bootstrap=yes
|
bootstrap=yes
|
||||||
|
|
Loading…
Add table
Reference in a new issue