Commit 761edf9d authored by Vitaly Lipatov's avatar Vitaly Lipatov

backported to p8 as 1.8.5-alt0.M80P.1 (with rpmbph script)

parents b8401c9e 13092601
......@@ -30,6 +30,7 @@ rpmvendor()
{
[ "$DISTRIB_ID" = "ALTLinux" ] && echo "alt" && return
[ "$DISTRIB_ID" = "LinuxXP" ] && echo "lxp" && return
[ "$DISTRIB_ID" = "TinyCoreLinux" ] && echo "tcl" && return
echo "$DISTRIB_ID" | tr "[A-Z]" "[a-z]"
}
......@@ -52,6 +53,7 @@ pkgtype()
windows) echo "exe" ;;
android) echo "apk" ;;
alpine) echo "apk" ;;
tinycorelinux) echo "tcz" ;;
cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
......@@ -137,6 +139,11 @@ elif distro os-release && which apk 2>/dev/null >/dev/null ; then
DISTRIB_ID="$ID"
DISTRIB_RELEASE="$VERSION_ID"
elif distro os-release && which tce-ab 2>/dev/null >/dev/null ; then
. $ROOTDIR/etc/os-release
DISTRIB_ID="TinyCoreLinux"
DISTRIB_RELEASE="$VERSION_ID"
elif distro arch-release ; then
DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010"
......
......@@ -242,7 +242,7 @@ check_command()
clean) # HELPCMD: clean local package cache
epm_cmd=clean
;;
autoremove) # HELPCMD: auto remove unneeded package(s)
autoremove|package-cleanup) # HELPCMD: auto remove unneeded package(s)
epm_cmd=autoremove
;;
autoorphans|--orphans) # HELPCMD: remove all packages not from the repository
......
......@@ -36,6 +36,7 @@ case $PMTYPE in
warning "Use with caution!"
local PKGLIST=$(__epm_orphan_altrpm \
| sed -e "s/\.32bit//g" \
| grep -v -- "^eepm$" \
| grep -v -- "^kernel")
docmd epm remove $PKGLIST
;;
......@@ -49,7 +50,13 @@ case $PMTYPE in
# ;;
yum-rpm)
showcmd package-cleanup --orphans
local PKGLIST=$(package-cleanup --orphans)
local PKGLIST=$(package-cleanup --orphans | grep -v "^eepm$")
docmd epm remove $PKGLIST
;;
dnf-rpm)
# TODO: dnf list extras
showcmd package-cleanup --orphans
local PKGLIST=$(package-cleanup --orphans | grep -v "^eepm$")
docmd epm remove $PKGLIST
;;
urpm-rpm)
......
......@@ -36,7 +36,7 @@ __epm_autoremove_altrpm()
| grep -E -v -- "-(devel|debuginfo)$" \
| grep -E -v -- "-(util|tool|plugin|daemon)" \
| sed -e "s/\.32bit$//g" \
| grep -E -v -- "^(libsystemd|libreoffice|libnss)" )
| grep -E -v -- "^(libsystemd|libreoffice|libnss|eepm)" )
[ -n "$pkgs" ] && sudocmd rpm -v -e $pkgs && flag=1
info "Removing unused python/perl modules..."
......@@ -55,7 +55,7 @@ __epm_autoremove_altrpm()
return 0
}
# TODO: keep our eepm package
epm_autoremove()
{
......@@ -82,7 +82,7 @@ case $PMTYPE in
while true ; do
docmd package-cleanup --leaves $(subst_option non_interactive --assumeyes)
# FIXME: package-cleanup have to use stderr for errors
local PKGLIST=$(package-cleanup --leaves | grep -v "Loaded plugins" | grep -v "Unable to")
local PKGLIST=$(package-cleanup --leaves | grep -v "Loaded plugins" | grep -v "Unable to" | grep -v "^eepm$")
[ -n "$PKGLIST" ] || break
sudocmd yum remove $PKGLIST
done
......
......@@ -31,7 +31,13 @@ epm_download()
yum-rpm)
# TODO: check yum install --downloadonly --downloaddir=/tmp <package-name>
assure_exists yumdownloader yum-utils
sudo yumdownloader $pkg_filenames
sudocmd yumdownloader $pkg_filenames
;;
dnf-rpm)
sudocmd dnf download $pkg_filenames
;;
tce)
sudocmd tce-load -w $pkg_filenames
;;
*)
fatal "Have no suitable command for $PMTYPE"
......
#!/bin/sh
#
# Copyright (C) 2012-2013 Etersoft
# Copyright (C) 2012-2013 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2016 Etersoft
# Copyright (C) 2012-2016 Vitaly Lipatov <lav@etersoft.ru>
#
# 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
......@@ -166,6 +166,9 @@ epm_install_names()
apk)
sudocmd apk add $@
return ;;
tce)
sudocmd tce-load -wi $@
return ;;
guix)
__separate_sudocmd "guix package -i" "guix package -i" $@
return ;;
......@@ -237,6 +240,9 @@ epm_ni_install_names()
apk)
sudocmd apk add $@
return ;;
tce)
sudocmd tce-load -wi $@
return ;;
#android)
# sudocmd pm install $@
# return ;;
......@@ -471,6 +477,9 @@ epm_print_install_command()
aptcyg)
echo "apt-cyg install $@"
;;
tce)
echo "tce-load -wi $@"
;;
*)
fatal "Have no suitable appropriate install command for $PMTYPE"
;;
......
......@@ -125,6 +125,9 @@ case $PMTYPE in
apk)
CMD="apk info"
;;
tce)
CMD="ls -1 /usr/local/tce.installed"
;;
guix)
CMD="guix package -I"
;;
......
......@@ -103,8 +103,8 @@ __update_to_the_distro()
p8)
docmd epm update || fatal
if ! docmd epm install apt rpm apt-conf-branch $(get_fix_release_pkg p8) ; then
# error: execution of %post scriptlet from glibc-core-2.23-alt1.eter1
docmd epm erase glibc-core-2.17 || fatal "Check an error and run epm release-upgrade again"
# Hack for error: execution of %post scriptlet from glibc-core-2.23-alt1.eter1
docmd rpm -ev glibc-core-2.17 || fatal "Check an error and run epm release-upgrade again"
docmd epm install apt rpm apt-conf-branch $(get_fix_release_pkg p8) || fatal "Check an error and run epm release-upgrade again"
fi
__alt_repofix
......@@ -187,8 +187,12 @@ epm_release_upgrade()
# try to detect current release by repo
if [ "$DISTRVERSION" = "Sisyphus" ] || [ -z "$DISTRVERSION" ] ; then
DISTRVERSION="$(__detect_alt_release_by_repo)"
[ "$DISTRVERSION" != "Sisyphus" ] && info "Detected running $DISTRNAME $DISTRVERSION (according to using repos)"
local dv
dv="$(__detect_alt_release_by_repo)"
if [ -n "$dv" ] && [ "$dv" != "$DISTRVERSION" ] ; then
DISTRVERSION="$dv"
info "Detected running $DISTRNAME $DISTRVERSION (according to using repos)"
fi
fi
__alt_repofix
......@@ -207,7 +211,7 @@ epm_release_upgrade()
case $PMTYPE in
apt-rpm)
docmd epm update
#docmd epm update
info "Have no idea how to upgrade $DISTRNAME"
;;
*-dpkg)
......@@ -221,6 +225,18 @@ epm_release_upgrade()
showcmd rpm -Uvh http://mirror.yandex.ru/fedora/linux/releases/16/Fedora/x86_64/os/Packages/fedora-release-16-1.noarch.rpm
docmd epm Upgrade
;;
dnf-rpm)
info "Check https://fedoraproject.org/wiki/DNF_system_upgrade for an additional info"
docmd epm install dnf
sudocmd dnf clean all
assure_exists dnf-plugin-system-upgrade
sudocmd dnf system-upgrade
local RELEASEVER="$pkg_filenames"
[ -n "$RELEASEVER" ] || fatal "Run me with new version"
sudocmd dnf system-upgrade download --refresh --releasever=$RELEASEVER
sudocmd dnf system-upgrade
info "Run epm autoorphans to remove orphaned packages"
;;
urpm-rpm)
sudocmd urpmi.removemedia -av
# TODO
......
......@@ -67,6 +67,9 @@ case $PMTYPE in
apk)
CMD="apk search"
;;
tce)
CMD="tce-ab"
;;
conary)
CMD="conary repquery"
;;
......
......@@ -483,6 +483,9 @@ case $DISTRNAME in
alpine)
CMD="apk"
;;
TinyCoreLinux)
CMD="tce"
;;
*)
fatal "Have no suitable DISTRNAME $DISTRNAME"
;;
......
......@@ -44,7 +44,7 @@ epm_upgrade()
CMD="yum update"
;;
dnf-rpm)
CMD="dnf update"
CMD="dnf distro-sync"
;;
snappy)
CMD="snappy update"
......
# This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils.
#
Name: eepm
Version: 1.8.4
Version: 1.8.5
Release: alt0.M80P.1
Summary: Etersoft EPM package manager
......@@ -67,9 +67,14 @@ chmod a+x %buildroot%_datadir/%name/{serv-,epm-}*
%_sysconfdir/bash_completion.d/cerv
%changelog
* Mon May 30 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.4-alt0.M80P.1
* Sat Jul 16 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.5-alt0.M80P.1
- backport to ALTLinux p8 (by rpmbph script)
* Sat Jun 25 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.5-alt1
- add Tiny Core Linux support (tcl, tce)
- improve dnf support: add release-upgrade
- improve ALT Linux release upgrade
* Mon May 30 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.4-alt1
- epm install: add initial support for cross install packages (deb/rpm packages on rpm/deb-based hosts)
- install: add --noremove support for apt
......
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