Improve `pkg combine` and `pkg repack` commands
Should be able to do this:
pkg combine <pkgname> --sfs|--pet|--deb|--txz|--tgz
and
pkg repack <pkgname> --sfs|--pet|--deb|--txz|--tgz
(You should be able to choose what pkg to combine, and into what format)
NOTES:
The --split
option would conflict with this, because .deb/.txz packages use -dev
, -doc
, etc, while others use _DEV
and _DOC
..
Possible Solution:
In main case statement at the end of /usr/sbin/pkg, where --config and --cflags are, we could use something like:
case "$1" in
...
--sfs|--txz|--deb|--tgz|--rpm)
case "$1" in
--sfs) convert_to=sfs _dev='_DEV'; _doc='_DOC'; _nls='_NLS' ;;
--txz) convert_to=txz _dev='-dev'; _doc='-doc'; _nls='-nls' ;;
--deb) convert_to=deb _dev='-dev'; _doc='-doc'; _nls='-nls' ;;
--tgz) convert_to=tgz _dev='-dev'; _doc='-doc'; _nls='-nls' ;;
--rpm) convert_to=rpm _dev='-dev'; _doc='-doc'; _nls='-nls' ;;
esac
PNAME=`get_pkg_name_only $installed_pkg`
separator='-'
case $DISTRO_BINARY_COMPAT in
ubuntu|trisquel|debian|devuan) separator='_' ;;
esac
# set PKGTYPE as either $_dev, $_doc, or $_nls
PKGNAME="${PNAME}${PKGTYPE}${separator}${version}"
;;
Edited by sc0ttj