Commit c0be0e74 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-repack: always use anypackage to rpm function for deb->rpm conversion

parent 97c7f1c9
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2017-2018 Etersoft # Copyright (C) 2017-2018, 2020 Etersoft
# Copyright (C) 2017-2018 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2017-2018, 2020 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -163,6 +163,13 @@ __epm_repack_rpm() ...@@ -163,6 +163,13 @@ __epm_repack_rpm()
assure_exists alien || fatal assure_exists alien || fatal
assure_exists rpmbuild rpm-build || fatal assure_exists rpmbuild rpm-build || fatal
# TODO: improve
if echo "$*" | grep "\.deb" ; then
assure_exists dpkg || fatal
# TODO: Для установки требует: /usr/share/debconf/confmodule но пакет не может быть установлен
# assure_exists debconf
fi
local pkg local pkg
export HOME=$(mktemp -d) export HOME=$(mktemp -d)
local tmpbuilddir=$HOME/repack local tmpbuilddir=$HOME/repack
...@@ -225,22 +232,13 @@ epm_repack() ...@@ -225,22 +232,13 @@ epm_repack()
# TODO: если у нас rpm, а пакет - deb и наоборот # TODO: если у нас rpm, а пакет - deb и наоборот
case $PKGFORMAT in case $PKGFORMAT in
rpm) rpm)
if __epm_split_by_pkg_type deb $pkg_files ; then __epm_repack_rpm $pkg_files || fatal
__epm_repack_deb_to_rpm $split_replaced_pkgs echo
echo echo "Adapted packages:"
echo "Adopted packages:" cp $repacked_rpms .
estrlist list $repacked_rpms for i in $repacked_rpms ; do
cp $repacked_rpms . echo " $(pwd)/$(basename "$i")"
pkg_files="$(estrlist exclude $split_replaced_pkgs $pkg_files)" done
fi
if [ -n "$pkg_files" ] ; then
__epm_repack_rpm $pkg_files || fatal
echo
echo "Adopted packages:"
estrlist list $repacked_rpms
cp $repacked_rpms .
fi
;; ;;
deb) deb)
if __epm_split_by_pkg_type rpm $pkg_files ; then if __epm_split_by_pkg_type rpm $pkg_files ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment