Commit 6f76ad64 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: drop separated vendor name

parent 456f62ab
...@@ -52,8 +52,8 @@ override_distrib() ...@@ -52,8 +52,8 @@ override_distrib()
DISTRIB_RELEASE="$(echo "$1" | sed -e 's|.*/||')" DISTRIB_RELEASE="$(echo "$1" | sed -e 's|.*/||')"
} }
# Translate DISTRIB_ID to vendor name (like %_vendor does), uses VENDOR_ID by default # Translate DISTRIB_ID to vendor name (like %_vendor does or package release name uses), uses VENDOR_ID by default
rpmvendor() pkgvendor()
{ {
[ "$DISTRIB_ID" = "ALTLinux" ] && echo "alt" && return [ "$DISTRIB_ID" = "ALTLinux" ] && echo "alt" && return
[ "$DISTRIB_ID" = "ALTServer" ] && echo "alt" && return [ "$DISTRIB_ID" = "ALTServer" ] && echo "alt" && return
...@@ -68,13 +68,6 @@ rpmvendor() ...@@ -68,13 +68,6 @@ rpmvendor()
tolower "$DISTRIB_ID" tolower "$DISTRIB_ID"
} }
# Translate DISTRIB_ID name to package manner (like in the package release name)
pkgvendor()
{
[ "$DISTRIB_ID" = "Mandriva" ] && echo "mdv" && return
rpmvendor
}
# TODO: in more appropriate way # TODO: in more appropriate way
#which pkcon 2>/dev/null >/dev/null && info "You can run $ PMTYPE=packagekit epm to use packagekit backend" #which pkcon 2>/dev/null >/dev/null && info "You can run $ PMTYPE=packagekit epm to use packagekit backend"
...@@ -722,8 +715,7 @@ Pretty distro name (--pretty): $(print_pretty_name) ...@@ -722,8 +715,7 @@ Pretty distro name (--pretty): $(print_pretty_name)
CPU norm register size (-b): $(get_bit_size) CPU norm register size (-b): $(get_bit_size)
System memory size (MB) (-m): $(get_memory_size) System memory size (MB) (-m): $(get_memory_size)
Base OS name (-o): $(get_base_os_name) Base OS name (-o): $(get_base_os_name)
Build system distro name (-s): $(pkgvendor) Base distro name (-s|-n): $(pkgvendor)
Build system vendor name (-n): $(rpmvendor)
(run with -h to get help) (run with -h to get help)
EOF EOF
...@@ -744,11 +736,10 @@ case $1 in ...@@ -744,11 +736,10 @@ case $1 in
echo " -i - print virtualization type" echo " -i - print virtualization type"
echo " -h - this help" echo " -h - this help"
echo " -m - print system memory size (in MB)" echo " -m - print system memory size (in MB)"
echo " -n [SystemName] - print vendor name (as _vendor macros in rpm)"
echo " -o - print base OS name" echo " -o - print base OS name"
echo " -p [SystemName] - print type of the packaging system" echo " -p [SystemName] - print type of the packaging system"
echo " -g [SystemName] - print name of the packaging system" echo " -g [SystemName] - print name of the packaging system"
echo " -s [SystemName] - print name of distro for build system (like in the package release name)" echo " -s|-n [SystemName] - print base name of the distro (ubuntu for all Ubuntu family, alt for all ALT family) (as _vendor macros in rpm)"
echo " -y - print running service manager" echo " -y - print running service manager"
echo " --pretty - print pretty distro name" echo " --pretty - print pretty distro name"
echo " -v - print version of distro" echo " -v - print version of distro"
...@@ -806,16 +797,11 @@ case $1 in ...@@ -806,16 +797,11 @@ case $1 in
-v) -v)
echo $DISTRIB_RELEASE echo $DISTRIB_RELEASE
;; ;;
-s) -s|-n)
override_distrib "$2" override_distrib "$2"
pkgvendor pkgvendor
exit 0 exit 0
;; ;;
-n)
override_distrib "$2"
rpmvendor
exit 0
;;
-y) -y)
get_service_manager get_service_manager
;; ;;
......
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