Skip to content

Commit

Permalink
adapt bindings to work with yast independed standalone libyui package
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoettlicher committed Aug 3, 2012
1 parent 9f1ad3c commit 818b09a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.23.0
2.23.2
6 changes: 6 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 22 11:25:10 UTC 2012 - tgoettlicher@suse.de

- search for UI plugins at new and old location
- 2.23.2

-------------------------------------------------------------------
Thu May 10 07:17:40 UTC 2012 - mfilka@suse.com

Expand Down
21 changes: 17 additions & 4 deletions scripts/yast2-funcs
Expand Up @@ -20,14 +20,16 @@ function get_plugindir()
{
plugindir=$YAST_PREFIX/lib/YaST2/plugin
if `ldd $ybindir/y2base | egrep "/lib64/(.*/)?libc.so" > /dev/null` ; then
plugindir=$YAST_PREFIX/lib64/YaST2/plugin
plugindir=$YAST_PREFIX/lib64/YaST2/plugin
fi
}



#
# check if a plugin and all necessary libaries are present
#
# Only for compatibility with yast2-libyui, can be removed once everyone uses libyui4
function check_plugin()
{
local PLUGIN_SO="$1"
Expand All @@ -48,28 +50,39 @@ function check_plugin()
return 1 # failure
}


function check_libyui_plugin()
{
if [ -e "/usr/lib64/yui/libyui-${1}.so.4" -o -e "/usr/lib/yui/libyui-${1}.so.4" ]; then
return 0 # success
fi

return 1 # failure

}

#
# check if the qt plugin and all necessary libraries are present
#
function check_qt()
{
check_plugin libpy2qt.so.2 "the qt frontend"
check_libyui_plugin qt || check_plugin libpy2qt.so.2 "the qt frontend"
}

#
# check if the gtk plugin and all necessary libraries are present
#
function check_gtk()
{
check_plugin libpy2gtk.so.2 "the gtk frontend"
check_libyui_plugin gtk || check_plugin libpy2gtk.so.2 "the gtk frontend"
}

#
# check if the ncurses plugin and all necessary libraries are present
#
function check_ncurses()
{
check_plugin libpy2ncurses.so.2 "the ncurses frontend"
check_libyui_plugin ncurses || check_plugin libpy2ncurses.so.2 "the ncurses frontend"
}


Expand Down
2 changes: 1 addition & 1 deletion yast2.spec.in
Expand Up @@ -21,7 +21,7 @@ Requires: yast2-ycp-ui-bindings >= 2.18.4

# changed StartPackage callback signature
Requires: yast2-pkg-bindings >= 2.20.3
Requires: yast2_ui
Requires: yui_backend
# For Cron Agent, Module
Requires: perl-Config-Crontab
# for ag_tty (/bin/stty)
Expand Down

0 comments on commit 818b09a

Please sign in to comment.