Commit 087a4856 authored by Vitaly Lipatov's avatar Vitaly Lipatov

addrepo/removerepo: fix used repo id string

parent db22b2f8
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2012 Etersoft # Copyright (C) 2012, 2016 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2012, 2016 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
...@@ -19,26 +19,27 @@ ...@@ -19,26 +19,27 @@
epm_addrepo() epm_addrepo()
{ {
local repo="$(eval echo $quoted_args)"
case $PMTYPE in case $PMTYPE in
apt-rpm) apt-rpm)
assure_exists apt-repo assure_exists apt-repo
sudocmd apt-repo add "$pkg_filenames" sudocmd apt-repo add "$repo"
;; ;;
apt-dpkg|aptitude-dpkg) apt-dpkg|aptitude-dpkg)
info "You need manually add repo to /etc/apt/sources.list" info "You need manually add repo to /etc/apt/sources.list"
;; ;;
yum-rpm) yum-rpm)
assure_exists yum-utils assure_exists yum-utils
sudocmd yum-config-manager --add-repo "$pkg_filenames" sudocmd yum-config-manager --add-repo "$repo"
;; ;;
urpm-rpm) urpm-rpm)
sudocmd urpmi.addmedia "$pkg_filenames" sudocmd urpmi.addmedia "$repo"
;; ;;
zypper-rpm) zypper-rpm)
sudocmd zypper ar "$pkg_filenames" sudocmd zypper ar "$repo"
;; ;;
emerge) emerge)
sudocmd layman -a $"pkg_filenames" sudocmd layman -a "$repo"
;; ;;
pacman) pacman)
info "You need manually add repo to /etc/pacman.conf" info "You need manually add repo to /etc/pacman.conf"
...@@ -46,7 +47,7 @@ case $PMTYPE in ...@@ -46,7 +47,7 @@ case $PMTYPE in
#sudocmd repo-add $pkg_filenames #sudocmd repo-add $pkg_filenames
;; ;;
npackd) npackd)
sudocmd npackdcl add-repo --url="$pkg_filenames" sudocmd npackdcl add-repo --url="$repo"
;; ;;
slackpkg) slackpkg)
info "You need manually add repo to /etc/slackpkg/mirrors" info "You need manually add repo to /etc/slackpkg/mirrors"
......
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2012 Etersoft # Copyright (C) 2012, 2016 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2012, 2016 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
...@@ -19,32 +19,33 @@ ...@@ -19,32 +19,33 @@
epm_removerepo() epm_removerepo()
{ {
local repo="$(eval echo $quoted_args)"
case $PMTYPE in case $PMTYPE in
apt-rpm) apt-rpm)
assure_exists apt-repo assure_exists apt-repo
sudocmd apt-repo rm "$quoted_args" sudocmd apt-repo rm "$repo"
;; ;;
apt-dpkg|aptitude-dpkg) apt-dpkg|aptitude-dpkg)
info "You need remove repo from /etc/apt/sources.list" info "You need remove repo from /etc/apt/sources.list"
;; ;;
yum-rpm) yum-rpm)
assure_exists yum-utils assure_exists yum-utils
sudocmd yum-config-manager --disable "$pkg_filenames" sudocmd yum-config-manager --disable "$repo"
;; ;;
urpm-rpm) urpm-rpm)
sudocmd urpmi.removemedia "$pkg_filenames" sudocmd urpmi.removemedia "$repo"
;; ;;
zypper-rpm) zypper-rpm)
sudocmd zypper removerepo "$pkg_filenames" sudocmd zypper removerepo "$repo"
;; ;;
emerge) emerge)
sudocmd layman "-d$pkg_filenames" sudocmd layman "-d$repo"
;; ;;
pacman) pacman)
info "You need remove repo from /etc/pacman.conf" info "You need remove repo from /etc/pacman.conf"
;; ;;
npackd) npackd)
sudocmd npackdcl remove-repo --url="$pkg_filenames" sudocmd npackdcl remove-repo --url="$repo"
;; ;;
slackpkg) slackpkg)
info "You need remove repo from /etc/slackpkg/mirrors" info "You need remove repo from /etc/slackpkg/mirrors"
......
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