YaST Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
December 2009
- 24 participants
- 488 discussions
[yast-commit] Build failed in Hudson: webyast-service-11.1-i586 #673
by Hudson Integration Service 18 Jan '10
by Hudson Integration Service 18 Jan '10
18 Jan '10
See http://yast.suse.de:3334/job/webyast-service-11.1-i586/673/changes
Changes:
[Josef Reidinger] don't silently fail if granting permissions fail (bnc#554946)
[Josef Reidinger] don't pass if granting permissions fail (bnc#554946)
[Josef Reidinger] allow synchronize action only if ntp is available (bnc#552071)
[Josef Reidinger] adapt policy file
[Josef Reidinger] fix definition of available call
[Josef Reidinger] fix passing hardware clock settings to ntp (bnc#556467)
[Josef Reidinger] Merge branch 'fix_bnc556467'
[Josef Reidinger] Merge branch 'fix_bnc554946'
[Josef Reidinger] Merge branch 'fix_bnc552071'
Conflicts:
plugins/ntp/app/models/ntp.rb
------------------------------------------
[...truncated 2746 lines...]
www/config/resources/licenses/SLES-11/license.de.txt
www/config/resources/licenses/SLES-11/license.txt
www/config/resources/licenses/SLES-11/license.ru.txt
www/config/resources/licenses/SLES-11/license.ja.txt
www/config/resources/licenses/SLES-11/license.pt_BR.txt
www/config/resources/licenses/SLES-11/license.ko.txt
www/config/resources/licenses/SLES-11/license.sv.txt
www/config/resources/licenses/SLES-11/license.zh_CN.txt
www/config/resources/licenses/SLES-11/license.it.txt
www/config/resources/licenses/SLES-11/license.fr.txt
www/config/resources/licenses/SLES-11/license.zh_TW.txt
www/config/resources/licenses/SLES-11/license.ar.txt
www/config/resources/licenses/openSUSE-11.1/
www/config/resources/licenses/openSUSE-11.1/license.es.txt
www/config/resources/licenses/openSUSE-11.1/license.de.txt
www/config/resources/licenses/openSUSE-11.1/license.txt
www/config/resources/licenses/openSUSE-11.1/license.ja.txt
www/config/resources/licenses/openSUSE-11.1/license.pt_BR.txt
www/config/resources/licenses/openSUSE-11.1/no-acceptance-needed
www/config/resources/licenses/openSUSE-11.1/license.zh_CN.txt
www/config/resources/licenses/openSUSE-11.1/license.it.txt
www/config/resources/licenses/openSUSE-11.1/license.fr.txt
www/config/resources/licenses/openSUSE-11.1/license.zh_TW.txt
www/app/
www/app/models/
www/app/models/license.rb
www/app/controllers/
www/app/controllers/eulas_controller.rb
www/app/views/
www/app/views/eulas/
www/app/views/eulas/show.html.erb
www/app/views/eulas/index.html.erb
www/COPYING
www/install.rb
www/doc/
www/doc/README_FOR_APP
www/doc/eulas_example.yml
www/Rakefile
www/init.rb
www/uninstall.rb
cd -
mkdir -p package
mkdir -p package/www/.
rm -f package/www/./.gitignore
ln ./.gitignore package/www/./.gitignore
rm -f package/www/./COPYING
ln ./COPYING package/www/./COPYING
rm -f package/www/./README
ln ./README package/www/./README
rm -f package/www/./Rakefile
ln ./Rakefile package/www/./Rakefile
mkdir -p package/www/./app/controllers
rm -f package/www/./app/controllers/ntp_controller.rb
ln ./app/controllers/ntp_controller.rb package/www/./app/controllers/ntp_controller.rb
mkdir -p package/www/./app/models
rm -f package/www/./app/models/ntp.rb
ln ./app/models/ntp.rb package/www/./app/models/ntp.rb
mkdir -p package/www/./config
rm -f package/www/./config/rails_parent.rb
ln ./config/rails_parent.rb package/www/./config/rails_parent.rb
mkdir -p package/www/./config/resources
rm -f package/www/./config/resources/ntp.yml
ln ./config/resources/ntp.yml package/www/./config/resources/ntp.yml
rm -f package/www/./init.rb
ln ./init.rb package/www/./init.rb
rm -f package/www/./install.rb
ln ./install.rb package/www/./install.rb
mkdir -p package/www/./restdoc
rm -f package/www/./restdoc/api.txt
ln ./restdoc/api.txt package/www/./restdoc/api.txt
rm -f package/www/./restdoc/ntp.xml
ln ./restdoc/ntp.xml package/www/./restdoc/ntp.xml
rm -f package/www/./restdoc/sync_request.xml
ln ./restdoc/sync_request.xml package/www/./restdoc/sync_request.xml
rm -f package/www/./uninstall.rb
ln ./uninstall.rb package/www/./uninstall.rb
cd package
tar jcvf www.tar.bz2 www
(in /src/rest-service/plugins/ntp)
www/
www/README
www/config/
www/config/rails_parent.rb
www/config/resources/
www/config/resources/ntp.yml
www/.gitignore
www/app/
www/app/models/
www/app/models/ntp.rb
www/app/controllers/
www/app/controllers/ntp_controller.rb
www/COPYING
www/install.rb
www/Rakefile
www/init.rb
www/uninstall.rb
www/restdoc/
www/restdoc/ntp.xml
www/restdoc/api.txt
www/restdoc/sync_request.xml
cd -
mkdir -p package
mkdir -p package/www/.
rm -f package/www/./.gitignore
ln ./.gitignore package/www/./.gitignore
rm -f package/www/./COPYING
ln ./COPYING package/www/./COPYING
rm -f package/www/./README
ln ./README package/www/./README
rm -f package/www/./Rakefile
ln ./Rakefile package/www/./Rakefile
mkdir -p package/www/./app/controllers
rm -f package/www/./app/controllers/logs_controller.rb
ln ./app/controllers/logs_controller.rb package/www/./app/controllers/logs_controller.rb
rm -f package/www/./app/controllers/metrics_controller.rb
ln ./app/controllers/metrics_controller.rb package/www/./app/controllers/metrics_controller.rb
rm -f package/www/./app/controllers/status_controller.rb
ln ./app/controllers/status_controller.rb package/www/./app/controllers/status_controller.rb
mkdir -p package/www/./app/models
rm -f package/www/./app/models/metric.rb
ln ./app/models/metric.rb package/www/./app/models/metric.rb
mkdir -p package/www/./app/views/status
rm -f package/www/./app/views/status/show.html.erb
ln ./app/views/status/show.html.erb package/www/./app/views/status/show.html.erb
rm -f package/www/./app/views/status/show.xml.erb
ln ./app/views/status/show.xml.erb package/www/./app/views/status/show.xml.erb
mkdir -p package/www/./config
rm -f package/www/./config/rails_parent.rb
ln ./config/rails_parent.rb package/www/./config/rails_parent.rb
mkdir -p package/www/./config/resources
rm -f package/www/./config/resources/logs.yml
ln ./config/resources/logs.yml package/www/./config/resources/logs.yml
rm -f package/www/./config/resources/metrics.yml
ln ./config/resources/metrics.yml package/www/./config/resources/metrics.yml
rm -f package/www/./config/resources/status.yml
ln ./config/resources/status.yml package/www/./config/resources/status.yml
mkdir -p package/www/./doc
rm -f package/www/./doc/README_FOR_APP
ln ./doc/README_FOR_APP package/www/./doc/README_FOR_APP
rm -f package/www/./doc/logs.yml
ln ./doc/logs.yml package/www/./doc/logs.yml
mkdir -p package/www/./lib
rm -f package/www/./lib/status.rb
ln ./lib/status.rb package/www/./lib/status.rb
mkdir -p package/www/./tasks
rm -f package/www/./tasks/status_tasks.rake
ln ./tasks/status_tasks.rake package/www/./tasks/status_tasks.rake
cd package
tar jcvf www.tar.bz2 www
(in /src/rest-service/plugins/status)
www/
www/README
www/lib/
www/lib/status.rb
www/config/
www/config/rails_parent.rb
www/config/resources/
www/config/resources/logs.yml
www/config/resources/metrics.yml
www/config/resources/status.yml
www/.gitignore
www/app/
www/app/models/
www/app/models/metric.rb
www/app/controllers/
www/app/controllers/logs_controller.rb
www/app/controllers/metrics_controller.rb
www/app/controllers/status_controller.rb
www/app/views/
www/app/views/status/
www/app/views/status/show.xml.erb
www/app/views/status/show.html.erb
www/COPYING
www/tasks/
www/tasks/status_tasks.rake
www/doc/
www/doc/logs.yml
www/doc/README_FOR_APP
www/Rakefile
cd -
++ find ./plugins -name package
++ grep -v 'rpam\|ruby-polkit'
+ for rpmdir in '${SUBDIR}/package' '`find ./plugins -name package | grep -v "rpam\|ruby-polkit"`'
++ dirname webservice/package
+ pkgdir=webservice
++ basename webservice
+ pkgname=webservice
+ destination=/artifacts/webyast/rest-service/package/yast2-webservice-webservice
+ mkdir -p /artifacts/webyast/rest-service/package/yast2-webservice-webservice
+ rm -rf '/artifacts/webyast/rest-service/package/yast2-webservice-webservice/*'
+ rm -rf webservice/package/www
+ cp -r webservice/package/cleanurl-v5.lua webservice/package/grantwebyastrights webservice/package/lighttpd.conf webservice/package/modules.conf webservice/package/org.opensuse.yast.permissions.policy webservice/package/rails.include webservice/package/webyast webservice/package/www.tar.bz2 webservice/package/yast.conf webservice/package/yast2-webservice.changes webservice/package/yast2-webservice.spec webservice/package/yast_user_roles webservice/package/yastws /artifacts/webyast/rest-service/package/yast2-webservice-webservice
+ pushd webservice/package
/src/rest-service/webservice/package /src/rest-service
+ case "${pkgdir}" in
+ build_install_spec
+ build_spec
+ rpm --rebuilddb
+ mkdir -p /tmp
+ mkdir -p /artifacts/webyast/rest-service/rpms
+ mkdir -p /tmp/rpmbuild
+ mkdir -p /tmp/buildroot
+ cat
+ check_exit 0
+ '[' -z 0 ']'
+ MYEXIT=0
+ '[' 0 == 0 ']'
+ echo 'exit code: 0 ... good, lets continue'
exit code: 0 ... good, lets continue
+ return
+ /usr/bin/rpmbuild -bb --define 'run_testsuite 1' yast2-webservice.spec
error: Failed build dependencies:
rubygem-rails-2_3 = 2.3.4 is needed by yast2-webservice-0.0.19-0.noarch
+ check_exit 1
+ '[' -z 1 ']'
+ MYEXIT=1
+ '[' 1 == 0 ']'
+ footer_and_exit 1
+ '[' -z 1 ']'
+ MYEXIT=1
+ '[' 1 == 0 ']'
+ ascii_failed
+ cat
( )
( ) (
) _ )
( \_
_(_\ \)__
(____\___))
build failed
+ echo 'stopping dbus..'
stopping dbus..
+ /etc/init.d/dbus stop
Shutting down D-Bus daemon..done
+ exit 1
... unmounting sys
... unmounting proc
... unmounting pts
umount: /data/hudson/HUDSON-CHROOT/webyast-11.1-i586/dev/pts: not mounted
Can't unmount devpts /data/hudson/HUDSON-CHROOT/webyast-11.1-i586/dev/pts
[locks-and-latches] Releasing all the locks
[locks-and-latches] All the locks released
Archiving artifacts
Build wasn't successful, skipping saikuro coverage report
Publishing rails stats report...
[workspace] $ rake --silent stats
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
41
[yast-commit] Build failed in Hudson: webyast-service-head-i586 #635
by Hudson Integration Service 18 Jan '10
by Hudson Integration Service 18 Jan '10
18 Jan '10
See http://yast.suse.de:3334/job/webyast-service-head-i586/635/changes
Changes:
[Josef Reidinger] use alias_method instead of alias for better error handling and more ruby like style instead of built-in alias
------------------------------------------
A SCM change trigger started this job
Checkout
[workspace] $ git fetch
Checking out origin/master
[workspace] $ git checkout -f origin/master
Previous HEAD position was 0aefaf4... update spec file after merging branches
HEAD is now at f1b3429... use alias_method instead of alias for better error handling and more ruby like style instead of built-in alias
[workspace] $ git rev-parse origin/master
[workspace] $ git log --numstat -M --summary --pretty=raw 0aefaf4f696e2200be2a720c6b37fd9c10a8ae87..f1b34295ec11570903b6ff0ad65adcde216fe5b1
[locks-and-latches] Checking to see if we really have the locks
[locks-and-latches] Have all the locks, build can start
[workspace] $ /bin/sh -xe /tmp/hudson8593913499965108117.sh
+ sudo -E /data/hudson/bin/build-chroot.sh webyast rest-service head-i586
SCRIPT ID: I am /data/hudson/bin/build-chroot.sh at http://yast.suse.de:3334/job/webyast-service-head-i586/ws/
..copying source code http://yast.suse.de:3334/job/webyast-service-head-i586/ws/* /data/hudson/HUDSON-CHROOT/webyast-head-i586/src/rest-service
..copying make script to /data/hudson/HUDSON-CHROOT/webyast-head-i586/root
... mounting sys
... mounting proc
... mounting pts
mount: special device none does not exist
Can't mount devpts /data/hudson/HUDSON-CHROOT/webyast-head-i586/dev/pts
... switching to chroot and starting build
SCRIPT ID: I am /root/make-zypp.sh at /
hostname: Host name lookup failure
/root/make-zypp.sh: line 83: icecc: command not found
??,????????'????????,????,????????'????????,????,????????'????????,????,????????'????????,????,????????'????????,??
+ echo webyast-rest-service
webyast-rest-service
+ case "${MODULE}" in
+ SUBDIR=webservice
+ cd /src/rest-service
+ echo /src/rest-service
/src/rest-service
+ ls
INSTALL
Makefile
README
Rakefile
doc
index.html.template
plugins
policy-tools
rpam
ruby-polkit
webservice
webservice-tasks
+ [[ rest-service == \r\e\s\t\-\s\e\r\v\i\c\e ]]
+ echo 'start dbus..'
start dbus..
+ /etc/init.d/dbus start
/root/make-zypp.sh: line 583: /etc/init.d/dbus: No such file or directory
++ error_exit 127
++ echo 'ERROR: detected exit code 127'
ERROR: detected exit code 127
++ footer_and_exit 1
++ '[' -z 1 ']'
++ MYEXIT=1
++ '[' 1 == 0 ']'
++ ascii_failed
++ cat
( )
( ) (
) _ )
( \_
_(_\ \)__
(____\___))
build failed
++ echo 'stopping dbus..'
stopping dbus..
++ /etc/init.d/dbus stop
/root/make-zypp.sh: line 110: /etc/init.d/dbus: No such file or directory
++ exit 1
... unmounting sys
... unmounting proc
... unmounting pts
umount: /data/hudson/HUDSON-CHROOT/webyast-head-i586/dev/pts: not mounted
Can't unmount devpts /data/hudson/HUDSON-CHROOT/webyast-head-i586/dev/pts
[locks-and-latches] Releasing all the locks
[locks-and-latches] All the locks released
Publishing Javadoc
Archiving artifacts
Build wasn't successful, skipping saikuro coverage report
Publishing rails stats report...
[workspace] $ rake --silent stats
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
32
[yast-commit] Build failed in Hudson: webyast-client-11.1-i586 #588
by Hudson Integration Service 14 Jan '10
by Hudson Integration Service 14 Jan '10
14 Jan '10
See http://yast.suse.de:3334/job/webyast-client-11.1-i586/588/changes
Changes:
[Josef Reidinger] disable ntp if not available (bnc#552071)
[Josef Reidinger] fix session timeout from backend (bnc#555255)
[Josef Reidinger] redirect after success save to control panel (bnc#557784)
[Josef Reidinger] after install patch redirect to control panel to have same behavior with other modules (bnc#557784)
[Josef Reidinger] fix passing hardware clock settings to ntp (bnc#556467)
[Josef Reidinger] last module in base system has Finish button instead of Next (bnc#561329)
[Josef Reidinger] Merge branch 'fix_bnc552071'
[Josef Reidinger] Merge branch 'fix_bnc555255'
[Josef Reidinger] Merge branch 'fix_bnc556467'
[Josef Reidinger] Merge branch 'fix_bnc557784'
[Josef Reidinger] Merge branch 'fix_bnc561329'
------------------------------------------
[...truncated 81 lines...]
* Done
(in /src/web-client/plugins/language)
* Starting syntax check...
* Done
(in /src/web-client/plugins/services)
* Starting syntax check...
* Done
test/functional/eulas_controller_test.rb:46: warning: don't put space before argument parentheses
test/functional/eulas_controller_test.rb:47: warning: don't put space before argument parentheses
(in /src/web-client/plugins/eulas)
* Starting syntax check...
* Done
(in /src/web-client/plugins/permissions)
* Starting syntax check...
* Done
(in /src/web-client/plugins/status)
* Starting syntax check...
* Done
+ check_exit 0
+ '[' -z 0 ']'
+ MYEXIT=0
+ '[' 0 == 0 ']'
+ echo 'exit code: 0 ... good, lets continue'
exit code: 0 ... good, lets continue
+ return
+ export GEM_PATH=/usr/local/lib/ruby/gems/1.8/gems
+ GEM_PATH=/usr/local/lib/ruby/gems/1.8/gems
+ export CI_REPORTS=results
+ CI_REPORTS=results
+ export RAILS_ENV=test
+ RAILS_ENV=test
+ pushd webclient
/src/web-client/webclient /src/web-client
+ RAILS_ENV=test
+ rake db:create db:migrate
(in /src/web-client/webclient)
== CreateAccounts: migrating =================================================
-- create_table("accounts", {:force=>true})
-> 0.0022s
== CreateAccounts: migrated (0.0024s) ========================================
== UpdateAccounts: migrating =================================================
-- remove_column(:accounts, :email)
-> 0.0995s
-- remove_column(:accounts, :crypted_password)
-> 0.0161s
-- remove_column(:accounts, :salt)
-> 0.0150s
== UpdateAccounts: migrated (0.1309s) ========================================
== AddColumntAccounts: migrating =============================================
-- add_column(:accounts, :salt, :string)
-> 0.0009s
== AddColumntAccounts: migrated (0.0010s) ====================================
== CreateHosts: migrating ====================================================
-- create_table(:hosts)
-> 0.0018s
== CreateHosts: migrated (0.0020s) ===========================================
== InsertLocalhost: migrating ================================================
== InsertLocalhost: migrated (0.0885s) =======================================
== PrivatePortNumbers: migrating =============================================
== PrivatePortNumbers: migrated (0.0022s) ====================================
+ check_exit 0
+ '[' -z 0 ']'
+ MYEXIT=0
+ '[' 0 == 0 ']'
+ echo 'exit code: 0 ... good, lets continue'
exit code: 0 ... good, lets continue
+ return
+ popd
/src/web-client
+ '[' -d coverage ']'
+ mkdir coverage
+ rake test
(in /src/web-client)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/host_test.rb" "test/unit/basesystem_test.rb" "test/unit/helpers/controlpanel_helper_test.rb" "test/unit/account_test.rb" "test/unit/yast/service_resource_test.rb" "test/unit/client_exception_test.rb"
(in /src/web-client/webclient)
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
...............
Finished in 4.061164 seconds.
15 tests, 44 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/hosts_controller_test.rb" "test/functional/private_routing_test.rb" "test/functional/lang_controller_test.rb" "test/functional/controlpanel_controller_test.rb" "test/functional/sessions_controller_test.rb" "test/functional/basesystem_controller_test.rb" "test/functional/main_controller_test.rb"
/src/web-client/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb:34: warning: don't put space before argument parentheses
/src/web-client/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb:38: warning: don't put space before argument parentheses
/src/web-client/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb:25: warning: already initialized constant LANGUAGES
/src/web-client/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb:82: warning: already initialized constant SUPPORTED_LANGUAGE
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.................DEPRECATION WARNING: Using assert_redirected_to with partial hash arguments is deprecated. Specify the full set arguments instead. (called from test_main_index_no_session at ./test/functional/main_controller_test.rb:12)
...Host(): nil
.Host(1): #<Host id: 1, name: "Sample Host", url: "http://www.google.com:4711", description: "Just a sample, not for real use", created_at: "2009-12-11 12:27:02", updated_at: "2009-12-11 12:27:02">
.Host(1): #<Host id: 1, name: "Sample Host", url: "http://www.google.com:4711", description: "Just a sample, not for real use", created_at: "2009-12-11 12:27:02", updated_at: "2009-12-11 12:27:02">
.Host(1): #<Host id: 1, name: "Sample Host", url: "http://www.google.com:4711", description: "Just a sample, not for real use", created_at: "2009-12-11 12:27:02", updated_at: "2009-12-11 12:27:02">
.Host(1): #<Host id: 1, name: "Sample Host", url: "http://www.google.com:4711", description: "Just a sample, not for real use", created_at: "2009-12-11 12:27:02", updated_at: "2009-12-11 12:27:02">
.........Host(): nil
.Host(): nil
.
Finished in 2.667328 seconds.
35 tests, 66 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/integration/two_sessions_test.rb" "test/integration/manage_hosts_test.rb"
fakeweb not found, skipping two_session_test
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/custom_services)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/security)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/users)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/string_serialization_test.rb" "test/unit/array_serialization_test.rb"
(in /src/web-client/plugins/network)
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.......
Finished in 0.003614 seconds.
7 tests, 7 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/network_controller_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
StartedDEPRECATION WARNING: Using assert_redirected_to with partial hash arguments is deprecated. Specify the full set arguments instead. (called from test_dhcp_without_change at ./test/functional/network_controller_test.rb:95)
...
Finished in 0.353171 seconds.
3 tests, 9 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/samba_server)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/patch_updates)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/system)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/system_controller_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
......
Finished in 0.858446 seconds.
6 tests, 20 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/administrator)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/administrator_controller_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
Finished in 0.000243 seconds.
0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/registration)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/registration_controller_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
..DEPRECATION WARNING: Using assert_redirected_to with partial hash arguments is deprecated. Specify the full set arguments instead. (called from test_register at ./test/functional/registration_controller_test.rb:97)
...
Finished in 1.147484 seconds.
5 tests, 11 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/mail_settings)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
(in /src/web-client/plugins/systemtime)
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/systemtime_controller_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.DEPRECATION WARNING: Using assert_redirected_to with partial hash arguments is deprecated. Specify the full set arguments instead. (called from test_commit at ./test/functional/systemtime_controller_test.rb:117)
.<html><body>You are being <a href="http://test.host/controlpanel/nextstep">redirected</a>.</body></html>
..F
Finished in 0.791899 seconds.
1) Failure:
test_ntp_force_utc(SystemtimeControllerTest)
[actionpack (2.3.5) lib/action_controller/test_case.rb:119:in `clean_backtrace'
/test/functional/systemtime_controller_test.rb:143:in `test_ntp_force_utc'
activesupport (2.3.5) lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
activesupport (2.3.5) lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
Expected response to be a <:redirect>, but was <500>
<"">
5 tests, 23 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
/usr/bin/ruby -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
Errors running test:functionals!
rake aborted!
Error on execute task test on plugins/systemtime
/src/web-client/Rakefile:20
(See full trace by running task with --trace)
++ error_exit 1
++ echo 'ERROR: detected exit code 1'
ERROR: detected exit code 1
++ footer_and_exit 1
++ '[' -z 1 ']'
++ MYEXIT=1
++ '[' 1 == 0 ']'
++ ascii_failed
++ cat
( )
( ) (
) _ )
( \_
_(_\ \)__
(____\___))
build failed
++ echo 'stopping dbus..'
stopping dbus..
++ /etc/init.d/dbus stop
Shutting down D-Bus daemon..done
++ exit 1
... unmounting sys
... unmounting proc
... unmounting pts
umount: /data/hudson/HUDSON-CHROOT/webyast-11.1-i586/dev/pts: not mounted
Can't unmount devpts /data/hudson/HUDSON-CHROOT/webyast-11.1-i586/dev/pts
[locks-and-latches] Releasing all the locks
[locks-and-latches] All the locks released
Archiving artifacts
Build wasn't successful, skipping saikuro coverage report
Publishing rails stats report...
[workspace] $ rake --silent stats
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
26
[yast-commit] r60209 - /trunk/storage/storage/src/include/ep-lib.ycp
by aschnell@svn.opensuse.org 30 Dec '09
by aschnell@svn.opensuse.org 30 Dec '09
30 Dec '09
Author: aschnell
Date: Wed Dec 30 18:25:34 2009
New Revision: 60209
URL: http://svn.opensuse.org/viewcvs/yast?rev=60209&view=rev
Log:
- fixed partitions bar for MdParts
Modified:
trunk/storage/storage/src/include/ep-lib.ycp
Modified: trunk/storage/storage/src/include/ep-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-l…
==============================================================================
--- trunk/storage/storage/src/include/ep-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-lib.ycp Wed Dec 30 18:25:34 2009
@@ -316,7 +316,10 @@
return `Empty();
map<string, map> target_map = Storage::GetTargetMap();
- map disk = Storage::GetDisk(target_map, device);
+
+ map disk = nil;
+ map part = nil;
+ SplitDevice(target_map, device, disk, part);
if (!isempty(disk["used_by"]:[]))
return `Empty();
@@ -332,11 +335,12 @@
labels = add(labels, label + "\n" + Storage::KByteToHumanString(size_k));
}
- switch (disk["type"]:`UNKNOWN)
+ switch (disk["type"]:`CT_UNKNOWN)
{
case `CT_DISK:
case `CT_DMRAID:
case `CT_DMMULTIPATH:
+ case `CT_MDPART:
{
string emptyspace = _("Unpartitioned Space");
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60208 - /trunk/storage/storage/src/modules/Storage.ycp
by aschnell@svn.opensuse.org 30 Dec '09
by aschnell@svn.opensuse.org 30 Dec '09
30 Dec '09
Author: aschnell
Date: Wed Dec 30 18:25:10 2009
New Revision: 60208
URL: http://svn.opensuse.org/viewcvs/yast?rev=60208&view=rev
Log:
- removed milestone
Modified:
trunk/storage/storage/src/modules/Storage.ycp
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stor…
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Wed Dec 30 18:25:10 2009
@@ -583,7 +583,6 @@
else if( search( device, "/dev/md" )==0 && size(ls)==2 )
{
integer pos = find(device, "p");
- y2milestone("device:%1 pos:%2", device, pos);
if (pos == -1)
dlen = 7;
else
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
Author: lslezak
Date: Wed Dec 30 17:18:41 2009
New Revision: 60207
URL: http://svn.opensuse.org/viewcvs/yast?rev=60207&view=rev
Log:
Created tag stable-2_19_1 for sound
Added:
tags/stable-2_19_1/sound/
- copied from r60206, trunk/sound/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60206 - in /trunk/sound: VERSION data/sndcards.ycp package/yast2-sound.changes
by lslezak@svn.opensuse.org 30 Dec '09
by lslezak@svn.opensuse.org 30 Dec '09
30 Dec '09
Author: lslezak
Date: Wed Dec 30 17:18:35 2009
New Revision: 60206
URL: http://svn.opensuse.org/viewcvs/yast?rev=60206&view=rev
Log:
- fixed SoundBlaster X-Fi support (bnc#560163)
- 2.19.1
Modified:
trunk/sound/VERSION
trunk/sound/data/sndcards.ycp
trunk/sound/package/yast2-sound.changes
Modified: trunk/sound/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/VERSION?rev=60206&r1=60205…
==============================================================================
--- trunk/sound/VERSION (original)
+++ trunk/sound/VERSION Wed Dec 30 17:18:35 2009
@@ -1 +1 @@
-2.19.0
+2.19.1
Modified: trunk/sound/data/sndcards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/data/sndcards.ycp?rev=6020…
==============================================================================
--- trunk/sound/data/sndcards.ycp (original)
+++ trunk/sound/data/sndcards.ycp Wed Dec 30 17:18:35 2009
@@ -1049,6 +1049,7 @@
80 : "snd-ad1889",
81 : "snd-cs5535audio",
82 : "snd-oxygen",
+ 83 : "snd-ctxfi",
100 : "snd-powermac",
101 : "snd-aoa",
102 : "snd_ps3"
Modified: trunk/sound/package/yast2-sound.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/package/yast2-sound.change…
==============================================================================
--- trunk/sound/package/yast2-sound.changes (original)
+++ trunk/sound/package/yast2-sound.changes Wed Dec 30 17:18:35 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Dec 30 16:16:00 UTC 2009 - lslezak(a)suse.cz
+
+- fixed SoundBlaster X-Fi support (bnc#560163)
+- 2.19.1
+
+-------------------------------------------------------------------
Fri Nov 20 15:44:03 CET 2009 - lslezak(a)suse.cz
- unified usage of "SoundFont" term (bnc#548898)
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60205 - in /trunk/gtk: ChangeLog src/YGPackageSelectorPluginStub.cc src/pkg/YGPackageSelector.cc src/pkg/ygtkdetailview.cc src/pkg/yzyppwrapper.cc src/pkg/yzyppwrapper.h
by rpmcruz@svn.opensuse.org 30 Dec '09
by rpmcruz@svn.opensuse.org 30 Dec '09
30 Dec '09
Author: rpmcruz
Date: Wed Dec 30 12:01:38 2009
New Revision: 60205
URL: http://svn.opensuse.org/viewcvs/yast?rev=60205&view=rev
Log:
* src/pkg/YGPackageSelector.cc: added --status-top
flag.
* src/pkg/yzyppwrapper.h/cc: PkgQuery overhaul. Most
criteria are now set as string properties, and QueryAnd
/ QueryOr allow for a finer tuned query.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGPackageSelectorPluginStub.cc
trunk/gtk/src/pkg/YGPackageSelector.cc
trunk/gtk/src/pkg/ygtkdetailview.cc
trunk/gtk/src/pkg/yzyppwrapper.cc
trunk/gtk/src/pkg/yzyppwrapper.h
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=60205&r1=60204…
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Wed Dec 30 12:01:38 2009
@@ -1,3 +1,12 @@
+2009-12-29 Ricardo Cruz <rpmcruz(a)alunos.dcc.fc.up.pt>
+
+ * src/pkg/YGPackageSelector.cc: added --status-top
+ flag.
+
+ * src/pkg/yzyppwrapper.h/cc: PkgQuery overhaul. Most
+ criteria are now set as string properties, and QueryAnd
+ / QueryOr allow for a finer tuned query.
+
2009-12-27 Ricardo Cruz <rpmcruz(a)alunos.dcc.fc.up.pt>
* src/pkg/YGPackageSelector.cc: added --categories-top
Modified: trunk/gtk/src/YGPackageSelectorPluginStub.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelectorPluginS…
==============================================================================
--- trunk/gtk/src/YGPackageSelectorPluginStub.cc (original)
+++ trunk/gtk/src/YGPackageSelectorPluginStub.cc Wed Dec 30 12:01:38 2009
@@ -13,11 +13,11 @@
bool search_entry_side = true, search_entry_top = false, dynamic_sidebar = false,
categories_side = true, categories_top = false, status_side = false,
- status_tabs = true, status_tabs_as_actions = false, undo_side = false,
- undo_tab = true, undo_old_style = false, status_col = false, action_col = true,
- action_col_as_button = true, action_col_as_check = false, version_col = true,
- single_line_rows = false, details_start_hide = true, toolbar_top = false,
- toolbar_yast = false, arrange_by = false;
+ status_top = false, status_tabs = true, status_tabs_as_actions = false,
+ undo_side = false, undo_tab = true, undo_old_style = false, status_col = false,
+ action_col = true, action_col_as_button = true, action_col_as_check = false,
+ version_col = true, single_line_rows = false, details_start_hide = true,
+ toolbar_top = false, toolbar_yast = false, arrange_by = false;
struct Arg {
const char *arg;
@@ -30,6 +30,7 @@
{ "categories-side", &categories_side },
{ "categories-top", &categories_top },
{ "status-side", &status_side },
+ { "status-top", &status_top },
{ "status-tabs", &status_tabs },
{ "status-tabs-as-actions", &status_tabs_as_actions },
{ "undo-side", &undo_side },
@@ -61,7 +62,7 @@
int arg_len = strlen (arguments[i].arg);
if (!strncmp (arg, arguments[i].arg, arg_len) && arg[arg_len] == '=') {
*arguments[i].var = arg[arg_len+1] == 'y';
-fprintf (stderr, "found '%s' as '%s' = '%d'\n", arg, arguments[i].arg, *arguments[i].var);
+//fprintf (stderr, "found '%s' as '%s' = '%d'\n", arg, arguments[i].arg, *arguments[i].var);
return true;
}
}
Modified: trunk/gtk/src/pkg/YGPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/YGPackageSelector.cc…
==============================================================================
--- trunk/gtk/src/pkg/YGPackageSelector.cc (original)
+++ trunk/gtk/src/pkg/YGPackageSelector.cc Wed Dec 30 12:01:38 2009
@@ -28,8 +28,8 @@
// experiments:
extern bool search_entry_side, search_entry_top, dynamic_sidebar, categories_side,
- categories_top, status_side, status_tabs, status_tabs_as_actions, undo_side,
- undo_tab, undo_old_style, status_col, action_col, action_col_as_button,
+ categories_top, status_side, status_top, status_tabs, status_tabs_as_actions,
+ undo_side, undo_tab, undo_old_style, status_col, action_col, action_col_as_button,
action_col_as_check, version_col, single_line_rows, details_start_hide,
toolbar_top, toolbar_yast, arrange_by;
@@ -44,8 +44,7 @@
UndoView()
{
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->setToModify (true);
+ Ypp::QueryBase *query = new Ypp::QueryProperty ("to-modify", true);
m_changes = Ypp::PkgQuery (Ypp::Package::PACKAGE_TYPE, query);
#if 0
GtkWidget *view = createView (listener);
@@ -82,27 +81,27 @@
GtkWidget *main_box = horizontal ? gtk_hbox_new (TRUE, 6) : gtk_vbox_new (TRUE, 6);
for (int i = 0; i < 3; i++) {
const char *str = 0, *stock = 0;
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
+ Ypp::QueryAnd *query = new Ypp::QueryAnd();
const char *prop;
switch (i) {
case 0:
str = _("To install:");
stock = GTK_STOCK_ADD;
- query->setToInstall (true);
- query->setIsInstalled (false);
+ query->add (new Ypp::QueryProperty ("to-install", true));
+ query->add (new Ypp::QueryProperty ("is-installed", false));
prop = "to-install";
break;
case 1:
str = _("To upgrade:");
stock = GTK_STOCK_GO_UP;
- query->setToInstall (true);
- query->setIsInstalled (true);
+ query->add (new Ypp::QueryProperty ("to-install", true));
+ query->add (new Ypp::QueryProperty ("is-installed", true));
prop = "to-upgrade";
break;
case 2:
str = _("To remove:");
stock = GTK_STOCK_REMOVE;
- query->setToRemove (true);
+ query->add (new Ypp::QueryProperty ("to-remove", true));
prop = "to-remove";
break;
default: break;
@@ -274,8 +273,7 @@
gtk_handle_box_set_handle_position (GTK_HANDLE_BOX (m_box), GTK_POS_TOP);
gtk_handle_box_set_snap_edge (GTK_HANDLE_BOX (m_box), GTK_POS_RIGHT);
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->setToModify (true);
+ Ypp::QueryBase *query = new Ypp::QueryProperty ("to-modify", true);
/* if (pkg_selector->onlineUpdateMode())
query->addType (Ypp::Package::PATCH_TYPE);*/
m_pool = Ypp::PkgQuery (Ypp::Package::PACKAGE_TYPE, query);
@@ -1758,10 +1756,10 @@
static bool askConfirmUnsupported()
{
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->setIsInstalled (false);
- query->setToModify (true);
- query->setIsSupported (false);
+ Ypp::QueryAnd *query = new Ypp::QueryAnd();
+ query->add (new Ypp::QueryProperty ("is-installed", false));
+ query->add (new Ypp::QueryProperty ("to-modify", true));
+ query->add (new Ypp::QueryProperty ("is-supported", false));
Ypp::PkgQuery list (Ypp::Package::PACKAGE_TYPE, query);
if (list.size() > 0)
@@ -1954,7 +1952,7 @@
virtual void updateList (Ypp::PkgList list) = 0;
virtual bool begsUpdate() = 0;
- virtual bool writeQuery (Ypp::PkgQuery::Query *query) = 0;
+ virtual bool writeQuery (Ypp::QueryAnd *query) = 0;
void setListener (_QueryListener *listener)
{ m_listener = listener; }
@@ -2047,16 +2045,44 @@
virtual void updateList (Ypp::PkgList list) {}
virtual bool begsUpdate() { return false; }
- virtual bool writeQuery (Ypp::PkgQuery::Query *query)
+ static void writeQueryStr (Ypp::QueryOr *query, const std::string &prop, const gchar *value, bool case_sensitive, bool whole_word)
+ {
+ Ypp::QueryAnd *subquery = new Ypp::QueryAnd();
+ const gchar delimiter[2] = { ' ', '\0' };
+ gchar **names = g_strsplit (value, delimiter, -1);
+ for (gchar **i = names; *i; i++)
+ subquery->add (new Ypp::QueryProperty (prop, *i, case_sensitive, whole_word));
+ g_strfreev (names);
+ query->add (subquery);
+ }
+
+ virtual bool writeQuery (Ypp::QueryAnd *query)
{
const gchar *name = gtk_entry_get_text (GTK_ENTRY (m_entry));
if (*name) {
int opt = 0;
if (m_combo)
opt = gtk_combo_box_get_active (GTK_COMBO_BOX (m_combo));
- bool whole_word = opt >= 2;
- query->addNames (name, ' ', opt == 0, opt == 0, opt == 1, opt == 2,
- opt == 3, whole_word);
+
+ Ypp::QueryOr *subquery = new Ypp::QueryOr();
+ switch (opt) {
+ case 0:
+ writeQueryStr (subquery, "name", name, false, false);
+ writeQueryStr (subquery, "summary", name, false, false);
+ break;
+ case 1:
+ writeQueryStr (subquery, "description", name, false, false);
+ break;
+ case 2:
+ writeQueryStr (subquery, "filelist", name, true, false);
+ writeQueryStr (subquery, "provides", name, true, false);
+ break;
+ case 3:
+ subquery->add (new Ypp::QueryProperty ("authors", name, false, true));
+ break;
+ default: break;
+ }
+ query->add (subquery);
return true;
}
return false;
@@ -2211,15 +2237,15 @@
} while (gtk_tree_model_iter_next (model, &iter));
}
- bool writeQuery (Ypp::PkgQuery::Query *query, GtkTreeIter *iter)
+ bool writeQuery (Ypp::QueryAnd *query, GtkTreeIter *iter)
{
Ypp::Node *category;
gtk_tree_model_get (getModel(), iter, 2, &category, -1);
if (category) {
if (m_type2)
- query->addCategory2 (category);
+ query->add (new Ypp::QueryCategory (category, true));
else
- query->addCategory (category);
+ query->add (new Ypp::QueryCategory (category, false));
return true;
}
return false;
@@ -2282,7 +2308,7 @@
virtual bool begsUpdate() { return dynamic_sidebar; }
- virtual bool writeQuery (Ypp::PkgQuery::Query *query)
+ virtual bool writeQuery (Ypp::QueryAnd *query)
{
GtkTreeIter iter;
GtkTreeSelection *selection;
@@ -2341,25 +2367,241 @@
virtual bool begsUpdate() { return dynamic_sidebar; }
- virtual bool writeQuery (Ypp::PkgQuery::Query *query)
+ virtual bool writeQuery (Ypp::QueryAnd *query)
{
GtkTreeIter iter;
- gtk_combo_box_get_active_iter (GTK_COMBO_BOX (m_combo), &iter);
- return m_model->writeQuery (query, &iter);
+ if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (m_combo), &iter))
+ return m_model->writeQuery (query, &iter);
+ return false;
}
static void changed_cb (GtkComboBox *combo, CategoryCombo *pThis)
{ pThis->notify(); }
};
+class StatusModel
+{
+GtkListStore *m_store;
+GtkTreeModel *m_filter;
+bool m_dynamic;
+
+public:
+ StatusModel (bool dynamic)
+ : m_dynamic (dynamic)
+ {
+ m_store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT);
+
+ GtkTreeIter iter;
+ gtk_list_store_append (m_store, &iter);
+ if (!dynamic_sidebar)
+ gtk_list_store_set (m_store, &iter, 0, _("All packages"), -1);
+ gtk_list_store_set (m_store, &iter, 1, TRUE, 2, 0, -1);
+ gtk_list_store_append (m_store, &iter);
+ if (!dynamic_sidebar)
+ gtk_list_store_set (m_store, &iter, 0, _("Available"), -1);
+ gtk_list_store_set (m_store, &iter, 1, TRUE, 2, 1, -1);
+ gtk_list_store_append (m_store, &iter);
+ if (!dynamic_sidebar)
+ gtk_list_store_set (m_store, &iter, 0, _("Installed"), -1);
+ gtk_list_store_set (m_store, &iter, 1, TRUE, 2, 2, -1);
+ gtk_list_store_append (m_store, &iter);
+ if (!dynamic_sidebar)
+ gtk_list_store_set (m_store, &iter, 0, _("Upgrades"), -1);
+ gtk_list_store_set (m_store, &iter, 1, TRUE, 2, 3, -1);
+ gtk_list_store_append (m_store, &iter);
+ if (!dynamic_sidebar)
+ gtk_list_store_set (m_store, &iter, 0, _("Summary"), -1);
+ gtk_list_store_set (m_store, &iter, 1, TRUE, 2, 4, -1);
+
+ if (m_dynamic) {
+ m_filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (m_store), NULL);
+ gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (m_filter), 1);
+ g_object_unref (G_OBJECT (m_store));
+ }
+ }
+
+ ~StatusModel()
+ { g_object_unref (G_OBJECT (getModel())); }
+
+ GtkTreeModel *getModel()
+ { return m_dynamic ? m_filter : GTK_TREE_MODEL (m_store); }
+
+ void setType (Ypp::Package::Type type) {}
+
+ void updateList (Ypp::PkgList list)
+ {
+ if (!m_dynamic) return;
+ int installedNb = 0, upgradableNb = 0, notInstalledNb = 0, modifiedNb = 0;
+ for (int i = 0; i < list.size(); i++) {
+ Ypp::Package *pkg = list.get (i);
+ if (pkg->isInstalled()) {
+ installedNb++;
+ if (pkg->hasUpgrade())
+ upgradableNb++;
+ }
+ else
+ notInstalledNb++;
+ if (pkg->toModify())
+ modifiedNb++;
+ }
+
+ GtkListStore *store = m_store;
+ GtkTreeModel *model = GTK_TREE_MODEL (m_store);
+ GtkTreeIter iter;
+ gtk_tree_model_iter_nth_child (model, &iter, NULL, 0);
+ list_store_set_text_count (store, &iter, _("Any Status"), list.size());
+ gtk_tree_model_iter_nth_child (model, &iter, NULL, 1);
+ list_store_set_text_count (store, &iter, _("Not Installed"), notInstalledNb);
+ gtk_tree_model_iter_nth_child (model, &iter, NULL, 2);
+ list_store_set_text_count (store, &iter, _("Installed"), installedNb);
+ gtk_tree_model_iter_nth_child (model, &iter, NULL, 3);
+ list_store_set_text_count (store, &iter, _("Upgradable"), upgradableNb);
+ gtk_tree_model_iter_nth_child (model, &iter, NULL, 4);
+ list_store_set_text_count (store, &iter, _("Modified"), modifiedNb);
+ }
+
+ bool writeQuery (Ypp::QueryAnd *query, GtkTreeIter *iter)
+ {
+ int status;
+ gtk_tree_model_get (getModel(), iter, 2, &status, -1);
+ switch (status) {
+ case 0: default: break;
+ case 1: query->add (new Ypp::QueryProperty ("is-installed", false)); break;
+ case 2: query->add (new Ypp::QueryProperty ("is-installed", true)); break;
+ case 3: query->add (new Ypp::QueryProperty ("has-upgrade", true)); break;
+ case 4: query->add (new Ypp::QueryProperty ("to-modify", true)); break;
+ }
+ if (status > 0 && status <= 4)
+ return true;
+ return false;
+ }
+};
+
class StatusView : public _QueryWidget
{
GtkWidget *m_widget, *m_view;
-GtkTreeModel *m_model;
+StatusModel *m_model;
public:
StatusView() : _QueryWidget()
{
+ m_model = new StatusModel (dynamic_sidebar);
+ m_view = tree_view_new();
+ gtk_tree_view_set_model (GTK_TREE_VIEW (m_view), m_model->getModel());
+ GtkWidget *scroll = scrolled_window_new (m_view);
+
+ GtkWidget *label = gtk_label_new_with_mnemonic ("_Status:");
+ gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), m_view);
+
+ m_widget = gtk_vbox_new (FALSE, 4);
+ gtk_box_pack_start (GTK_BOX (m_widget), label, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (m_widget), scroll, TRUE, TRUE, 0);
+
+ GtkTreeSelection *selection;
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (m_view));
+ g_signal_connect (G_OBJECT (selection), "changed",
+ G_CALLBACK (selection_changed_cb), this);
+ }
+
+ virtual GtkWidget *getWidget()
+ { return m_widget; }
+
+ virtual void updateType (Ypp::Package::Type type)
+ {
+ m_model->setType (type);
+
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (m_view));
+ g_signal_handlers_block_by_func (selection, (gpointer) selection_changed_cb, this);
+ gtk_tree_model_get_iter_first (m_model->getModel(), &iter);
+ gtk_tree_selection_select_iter (selection, &iter);
+ g_signal_handlers_unblock_by_func (selection, (gpointer) selection_changed_cb, this);
+ }
+
+ virtual void updateList (Ypp::PkgList list)
+ { m_model->updateList (list); }
+
+ virtual bool begsUpdate() { return dynamic_sidebar; }
+
+ virtual bool writeQuery (Ypp::QueryAnd *query)
+ {
+ GtkTreeIter iter;
+ GtkTreeSelection *selection;
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (m_view));
+ if (gtk_tree_selection_get_selected (selection, NULL, &iter))
+ return m_model->writeQuery (query, &iter);
+ return false;
+ }
+};
+
+class StatusCombo : public _QueryWidget
+{
+GtkWidget *m_widget, *m_combo;
+StatusModel *m_model;
+
+public:
+ StatusCombo() : _QueryWidget()
+ {
+ m_model = new StatusModel (dynamic_sidebar);
+ m_combo = gtk_combo_box_new_with_model (m_model->getModel());
+
+ GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (m_combo), renderer, TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (m_combo), renderer,
+ "markup", 0, NULL);
+
+ GtkWidget *label = gtk_label_new_with_mnemonic ("_Status:");
+ gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), m_combo);
+
+ m_widget = gtk_hbox_new (FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (m_widget), label, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (m_widget), m_combo, TRUE, TRUE, 0);
+ g_signal_connect (G_OBJECT (m_combo), "changed",
+ G_CALLBACK (changed_cb), this);
+ }
+
+ virtual GtkWidget *getWidget()
+ { return m_widget; }
+
+ virtual void updateType (Ypp::Package::Type type)
+ {
+ m_model->setType (type);
+
+ g_signal_handlers_block_by_func (m_combo, (gpointer) changed_cb, this);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (m_combo), 0);
+ g_signal_handlers_unblock_by_func (m_combo, (gpointer) changed_cb, this);
+ }
+
+ virtual void updateList (Ypp::PkgList list)
+ { m_model->updateList (list); }
+
+ virtual bool begsUpdate() { return dynamic_sidebar; }
+
+ virtual bool writeQuery (Ypp::QueryAnd *query)
+ {
+ GtkTreeIter iter;
+ if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (m_combo), &iter))
+ return m_model->writeQuery (query, &iter);
+ return false;
+ }
+
+ static void changed_cb (GtkComboBox *combo, StatusCombo *pThis)
+ { pThis->notify(); }
+};
+
+#if 0
+class StatusView : public _QueryWidget
+{
+GtkWidget *m_widget, *m_view;
+StatusModel *m_model;
+
+public:
+ StatusView() : _QueryWidget()
+ {
+ m_model = new StatusModel
m_view = tree_view_new();
GtkWidget *label = gtk_label_new_with_mnemonic ("_Statuses:");
@@ -2447,28 +2689,17 @@
virtual bool begsUpdate() { return dynamic_sidebar; }
- virtual bool writeQuery (Ypp::PkgQuery::Query *query)
+ virtual bool writeQuery (Ypp::QueryAnd *query)
{
- GtkTreeModel *model;
GtkTreeIter iter;
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (m_view));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- int status;
- gtk_tree_model_get (model, &iter, 2, &status, -1);
- switch (status) {
- case 0: default: break;
- case 1: query->setIsInstalled (false); break;
- case 2: query->setIsInstalled (true); break;
- case 3: query->setHasUpgrade (true); break;
- case 4: query->setToModify (true); break;
- }
- if (status > 0 && status <= 4)
- return true;
- }
+ if (gtk_tree_selection_get_selected (selection, NULL, &iter))
+ return m_model->writeQuery (query, &iter);
return false;
}
};
+#endif
#define BROWSER_PATH "/usr/bin/firefox"
@@ -2520,8 +2751,7 @@
ygtk_rich_text_set_plain_text (YGTK_RICH_TEXT (m_text), "");
if (package && package->type() != Ypp::Package::PACKAGE_TYPE) {
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->addCollection (package);
+ Ypp::QueryBase *query = new Ypp::QueryCollection (package);
Ypp::PkgQuery list (Ypp::Package::PACKAGE_TYPE, query);
((YGtkPackageView *) m_pkg_view)->setList (list, NULL);
gtk_widget_show (m_pkg_view);
@@ -2740,6 +2970,11 @@
category_combo = new CategoryCombo();
m_query.push_back (category_combo);
}
+ StatusCombo *status_combo = 0;
+ if (status_top) {
+ status_combo = new StatusCombo();
+ m_query.push_back (status_combo);
+ }
UndoView *undo_view = 0;
if (undo_side || undo_tab)
@@ -2818,6 +3053,8 @@
}
if (category_combo)
gtk_box_pack_start (GTK_BOX (header_box), category_combo->getWidget(), FALSE, TRUE, 0);
+ if (status_combo)
+ gtk_box_pack_start (GTK_BOX (header_box), status_combo->getWidget(), FALSE, TRUE, 0);
if (search_entry)
gtk_box_pack_start (GTK_BOX (header_box), search_entry->getWidget(), FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (packages_box), header_box, FALSE, TRUE, 0);
@@ -2825,12 +3062,14 @@
}
GtkWidget *packages_button_box = gtk_vbox_new (FALSE, 4);
- if (status_tabs && (arrange_box || category_combo)) {
+ if (status_tabs && (arrange_box || category_combo || status_combo)) {
GtkWidget *hbox = gtk_hbox_new (FALSE, 6);
if (arrange_box)
gtk_box_pack_start (GTK_BOX (hbox), arrange_box, FALSE, TRUE, 0);
if (category_combo)
gtk_box_pack_start (GTK_BOX (hbox), category_combo->getWidget(), FALSE, TRUE, 0);
+ if (status_combo)
+ gtk_box_pack_start (GTK_BOX (hbox), status_combo->getWidget(), FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (packages_button_box), hbox, FALSE, TRUE, 0);
}
gtk_box_pack_start (GTK_BOX (packages_button_box), packages_box, TRUE, TRUE, 0);
@@ -2950,7 +3189,7 @@
private:
void updateWidget (_QueryWidget *widget)
{
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
+ Ypp::QueryAnd *query = new Ypp::QueryAnd();
for (std::list <_QueryWidget *>::const_iterator it = m_query.begin();
it != m_query.end(); it++) {
if (*it == widget)
@@ -2978,7 +3217,7 @@
Ypp::Node *category;
for (int cycle = 0; true; cycle++) { // for arrange_by
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
+ Ypp::QueryAnd *query = new Ypp::QueryAnd();
for (std::list <_QueryWidget *>::const_iterator it = m_query.begin();
it != m_query.end(); it++)
(*it)->modified = (*it)->writeQuery (query);
@@ -2993,13 +3232,13 @@
if (!category)
break;
header = category->name.c_str();
- query->addCategory2 (category);
+ query->add (new Ypp::QueryCategory (category, true));
}
else if (arrange == 1) { // repositories
const Ypp::Repository *repo = Ypp::get()->getRepository (cycle);
if (repo) {
header = repo->name.c_str();
- query->addRepository (repo);
+ query->add (new Ypp::QueryRepository (repo));
}
else
break;
@@ -3007,19 +3246,19 @@
else if (arrange == 2) { // statuses
if (cycle == 0) {
header = _("Available");
- query->setIsInstalled (false);
+ query->add (new Ypp::QueryProperty ("is-installed", false));
}
else if (cycle == 1) {
header = _("Upgrades");
- query->setHasUpgrade (true);
+ query->add (new Ypp::QueryProperty ("has-upgrade", true));
}
else if (cycle == 2) {
header = _("Installed");
- query->setIsInstalled (true);
+ query->add (new Ypp::QueryProperty ("is-installed", true));
}
else if (cycle == 3) {
header = _("Modified");
- query->setToModify (true);
+ query->add (new Ypp::QueryProperty ("to-modify", true));
}
else
break;
@@ -3032,20 +3271,20 @@
m_all_view->packList (header, list, NULL);
if (m_installed_view) {
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->setIsInstalled (true);
+ Ypp::QueryAnd *query = new Ypp::QueryAnd();
+ query->add (new Ypp::QueryProperty ("is-installed", true));
Ypp::PkgQuery _list (list, query);
m_installed_view->packList (header, _list, NULL);
}
if (m_available_view) {
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->setIsInstalled (false);
+ Ypp::QueryAnd *query = new Ypp::QueryAnd();
+ query->add (new Ypp::QueryProperty ("is-installed", false));
Ypp::PkgQuery _list (list, query);
m_available_view->packList (header, _list, NULL);
}
if (m_upgrades_view) {
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->setHasUpgrade (true);
+ Ypp::QueryAnd *query = new Ypp::QueryAnd();
+ query->add (new Ypp::QueryProperty ("has-upgrade", true));
Ypp::PkgQuery _list (list, query);
m_upgrades_view->packList (header, _list, _("Upgrade all"));
}
Modified: trunk/gtk/src/pkg/ygtkdetailview.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkdetailview.cc?re…
==============================================================================
--- trunk/gtk/src/pkg/ygtkdetailview.cc (original)
+++ trunk/gtk/src/pkg/ygtkdetailview.cc Wed Dec 30 12:01:38 2009
@@ -645,8 +645,7 @@
static void contents_cb (GtkWidget *widget, gpointer pkg)
{
YGtkPackageView *contents = YGTK_PACKAGE_VIEW (widget);
- Ypp::PkgQuery::Query *query = new Ypp::PkgQuery::Query();
- query->addCollection ((Ypp::Package *) pkg);
+ Ypp::QueryBase *query = new Ypp::QueryCollection ((Ypp::Package *) pkg);
contents->setList (Ypp::PkgQuery (Ypp::Package::PACKAGE_TYPE, query), 0);
}
Modified: trunk/gtk/src/pkg/yzyppwrapper.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/yzyppwrapper.cc?rev=…
==============================================================================
--- trunk/gtk/src/pkg/yzyppwrapper.cc (original)
+++ trunk/gtk/src/pkg/yzyppwrapper.cc Wed Dec 30 12:01:38 2009
@@ -334,6 +334,34 @@
std::string Ypp::Package::provides (MarkupType markup) const { return impl->provides (markup); }
std::string Ypp::Package::requires (MarkupType markup) const { return impl->requires (markup); }
+bool Ypp::Package::getPropertyBool (const std::string &prop)
+{
+ if (prop == "is-installed")
+ return isInstalled();
+ if (prop == "has-upgrade")
+ return hasUpgrade();
+ if (prop == "to-modify")
+ return toModify();
+ if (prop == "is-recommended")
+ return isRecommended();
+ if (prop == "is-suggested")
+ return isSuggested();
+ if (prop == "is-supported")
+ return isSupported();
+ if (prop == "to-install")
+ return toInstall();
+ yuiError() << "No boolean property: " << prop << std::endl;
+ return false;
+}
+
+int Ypp::Package::getPropertyInt (const std::string &prop)
+{
+ if (prop == "severity")
+ return severity();
+ yuiError() << "No integer property: " << prop << std::endl;
+ return 0;
+}
+
std::string Ypp::Package::getPropertyStr (const std::string &prop, MarkupType markup)
{
if (prop == "name")
@@ -348,6 +376,8 @@
return support();
if (prop == "size")
return size();
+ if (prop == "authors")
+ return authors (markup);
if (prop == "available-version") {
const Ypp::Package::Version *version = getAvailableVersion (0);
if (version)
@@ -367,28 +397,6 @@
return "";
}
-int Ypp::Package::getPropertyInt (const std::string &prop)
-{
- if (prop == "severity")
- return severity();
- yuiError() << "No integer property: " << prop << std::endl;
- return 0;
-}
-
-bool Ypp::Package::getPropertyBool (const std::string &prop)
-{
- if (prop == "is-recommended")
- return isRecommended();
- if (prop == "is-suggested")
- return isSuggested();
- if (prop == "is-supported")
- return isSupported();
- if (prop == "to-install")
- return toInstall();
- yuiError() << "No boolean property: " << prop << std::endl;
- return false;
-}
-
const Ypp::Package::Version *Ypp::Package::getInstalledVersion()
{ return impl->getInstalledVersion(); }
const Ypp::Package::Version *Ypp::Package::getAvailableVersion (int nb)
@@ -1936,311 +1944,174 @@
void Ypp::PkgList::removeListener (Ypp::PkgList::Listener *listener) const
{ const_cast <Impl *> (impl)->removeListener (listener); }
-//** PkgQuery
+//** QueryBase
+
+struct Ypp::QueryAnd::Impl
+{ std::list <QueryBase *> m_queries; };
+
+Ypp::QueryAnd::QueryAnd()
+{ impl = new Impl(); }
-struct Ypp::PkgQuery::Query::Impl
+Ypp::QueryAnd::~QueryAnd()
{
- template <typename T>
- struct Key
- {
- Key() : defined (false) {}
- void set (T v)
- {
- defined = true;
- value = v;
- }
- bool is (const T &v) const
- {
- if (!defined) return true;
- return value == v;
- }
- bool defined;
- T value;
- };
+ for (std::list <QueryBase *>::const_iterator it = impl->m_queries.begin();
+ it != impl->m_queries.end(); it++)
+ delete (*it);
+}
- template <typename T>
- struct Keys
- {
- Keys() : defined (false) {}
- void add (T v)
- {
- defined = true;
- values.push_back (v);
- }
- bool is (const T &v) const
- {
- if (!defined) return true;
- typename std::list <T>::const_iterator it;
- for (it = values.begin(); it != values.end(); it++)
- if (*it == v)
- return true;
+void Ypp::QueryAnd::add (Ypp::QueryBase *query)
+{ impl->m_queries.push_back (query); }
+
+bool Ypp::QueryAnd::match (Ypp::Package *package)
+{
+ for (std::list <QueryBase *>::const_iterator it = impl->m_queries.begin();
+ it != impl->m_queries.end(); it++)
+ if (!(*it)->match (package))
return false;
- }
- bool defined;
- std::list <T> values;
- };
+ return true;
+}
- Keys <std::string> names;
- unsigned int use_name : 1, use_summary : 1, use_description : 1, use_filelist : 1,
- use_authors : 1, whole_word : 1, whole_string : 1;
- Keys <Node *> categories, categories2;
- Keys <const Package *> collections;
- Keys <const Repository *> repositories;
- Key <bool> isInstalled, hasUpgrade, toModify, toInstall, toRemove;
- Key <bool> isRecommended, isSuggested;
- Key <int> buildAge;
- Key <bool> isSupported;
- Key <int> severity;
- bool clear;
- Ypp::Package *highlight;
+struct Ypp::QueryOr::Impl
+{ std::list <QueryBase *> m_queries; };
-#if 0
- template <typename T>
- struct PropKey {
- T property;
- T value;
- };
- std::list <PropKey <bool> > boolKeys;
- std::list <PropKey <int > > intKeys;
- std::list <PropKey <std::string > > strKeys;
-#endif
+Ypp::QueryOr::QueryOr()
+{ impl = new Impl(); }
- Impl() : clear (false), highlight (NULL)
- {}
+Ypp::QueryOr::~QueryOr()
+{
+ for (std::list <QueryBase *>::const_iterator it = impl->m_queries.begin();
+ it != impl->m_queries.end(); it++)
+ delete (*it);
+}
- bool match (Package *package) const
- {
- struct inner {
- static bool strstr (const char *str1, const char *str2,
- bool case_sensitive, bool whole_word, bool whole_string)
- {
- const char *i;
- if (whole_string) {
- if (case_sensitive)
- return strcmp (str1, str2) == 0;
- return strcasecmp (str1, str2) == 0;
- }
- if (case_sensitive)
- i = ::strstr (str1, str2);
- else
- i = ::strcasestr (str1, str2);
- if (whole_word && i) { // check boundries
- if (i != str1 && isalpha (i[-1]))
- return false;
- int len = strlen (str2);
- if (i [len] && isalpha (i [len]))
- return false;
- return true;
- }
- return i;
- }
- };
+void Ypp::QueryOr::add (Ypp::QueryBase *query)
+{ impl->m_queries.push_back (query); }
- if (clear)
- return false;
- bool match = true;
-#if 0
- for (std::list <PropKey <bool> >::const_iterator it = boolKeys.begin();
- it != boolKeys.end(); it++) {
- const PropKey <bool> &key = *it;
- if (package->getPropertyBool (key.property) != key.value)
- return false;
- }
- for (std::list <PropKey <int> >::const_iterator it = intKeys.begin();
- it != intKeys.end(); it++) {
- const PropKey <int> &key = *it;
- if (package->getPropertyInt (key.property) != key.value)
- return false;
- }
- bool str_match = false;
- for (std::list <PropKey <std::string> >::const_iterator it = strKeys.begin();
- it != strKeys.end(); it++) {
- const PropKey <std::string> &key = *it;
- std::string pkg_value = package->getPropertyStr (key.property);
- if (pkg_value != key.value)
- return false;
- }
-#endif
- if (match && (isInstalled.defined || hasUpgrade.defined)) {
- // only one of the specified status must match
- bool status_match = false;
- if (isInstalled.defined)
- status_match = isInstalled.is (package->isInstalled());
- if (!status_match && hasUpgrade.defined)
- status_match = hasUpgrade.is (package->hasUpgrade());
- match = status_match;
- }
- if (match && toModify.defined)
- match = toModify.is (package->toModify());
- if (match && toInstall.defined)
- match = toInstall.is (package->toInstall());
- if (match && toRemove.defined)
- match = toRemove.is (package->toRemove());
- if (match && isRecommended.defined)
- match = isRecommended.is (package->isRecommended());
- if (match && isSuggested.defined)
- match = isSuggested.is (package->isSuggested());
- if (match && buildAge.defined) {
- int age = package->buildAge();
- if (age < 0 || age > buildAge.value)
- match = false;
- }
- if (match && isSupported.defined)
- match = isSupported.is (package->isSupported());
- if (match && severity.defined)
- match = severity.is (package->severity());
- if (match && names.defined) {
- const std::list <std::string> &values = names.values;
- std::list <std::string>::const_iterator it;
- for (it = values.begin(); it != values.end(); it++) {
- const char *key = it->c_str();
- bool str_match = false;
- if (use_name)
- str_match = inner::strstr (package->name().c_str(), key,
- false, whole_word, whole_string);
- if (!str_match && use_summary)
- str_match = inner::strstr (package->summary().c_str(), key,
- false, whole_word, whole_string);
- if (!str_match && use_description)
- str_match = inner::strstr (package->description (NO_MARKUP).c_str(), key,
- false, whole_word, whole_string);
- if (!str_match && use_filelist)
- str_match = inner::strstr (package->filelist (NO_MARKUP).c_str(), key,
- false, whole_word, whole_string);
- if (!str_match && use_authors)
- str_match = inner::strstr (package->authors (NO_MARKUP).c_str(), key,
- false, whole_word, whole_string);
- if (!str_match) {
- match = false;
- break;
- }
- }
- if (match && !highlight && use_name) {
- if (values.size() == 1 && !strcasecmp (values.front().c_str(), package->name().c_str()))
- const_cast <Impl *> (this)->highlight = package;
- }
- }
- if (match && categories.defined) {
- Ypp::Node *pkg_category = package->category();
- const std::list <Ypp::Node *> &values = categories.values;
- std::list <Ypp::Node *>::const_iterator it;
- for (it = values.begin(); it != values.end(); it++) {
- GNode *node = (GNode *) (*it)->impl;
- if (g_node_find (node, G_PRE_ORDER, G_TRAVERSE_ALL, pkg_category))
- break;
- }
- match = it != values.end();
- }
- if (match && categories2.defined) {
- Ypp::Node *pkg_category = package->category2();
- const std::list <Ypp::Node *> &values = categories2.values;
- std::list <Ypp::Node *>::const_iterator it;
- for (it = values.begin(); it != values.end(); it++) {
- GNode *node = (GNode *) (*it)->impl;
- if (g_node_find (node, G_PRE_ORDER, G_TRAVERSE_ALL, pkg_category))
- break;
- }
- match = it != values.end();
- }
- if (match && repositories.defined) {
- const std::list <const Repository *> &values = repositories.values;
- std::list <const Repository *>::const_iterator it;
- for (it = values.begin(); it != values.end(); it++) {
- bool match = false;
- for (int i = 0; package->getAvailableVersion (i); i++) {
- const Ypp::Package::Version *version = package->getAvailableVersion (i);
- if (version->repo == *it) {
- // filter if available isn't upgrade
- if (package->isInstalled() && hasUpgrade.defined && hasUpgrade.value) {
- if (version->cmp > 0)
- match = true;
- }
- else
- match = true;
- break;
- }
- }
- if (match)
- break;
- }
- match = it != values.end();
- }
- if (match && collections.defined) {
- const std::list <const Ypp::Package *> &values = collections.values;
- std::list <const Ypp::Package *>::const_iterator it;
- for (it = values.begin(); it != values.end(); it++)
- if (package->fromCollection (*it))
- break;
- match = it != values.end();
- }
- return match;
+bool Ypp::QueryOr::match (Ypp::Package *package)
+{
+ for (std::list <QueryBase *>::const_iterator it = impl->m_queries.begin();
+ it != impl->m_queries.end(); it++)
+ if ((*it)->match (package))
+ return true;
+ return false;
+}
+
+struct Ypp::QueryProperty::Impl
+{ virtual bool match (Ypp::Package *) = 0; };
+
+struct QueryBool : public Ypp::QueryProperty::Impl
+{
+ std::string property;
+ bool value;
+
+ QueryBool (const std::string &property, bool value)
+ : property (property), value (value) {}
+
+ virtual bool match (Ypp::Package *package)
+ { return package->getPropertyBool (property) == value; }
+};
+
+struct QueryInt : public Ypp::QueryProperty::Impl
+{
+ std::string property;
+ int value;
+
+ QueryInt (const std::string &property, int value)
+ : property (property), value (value) {}
+
+ virtual bool match (Ypp::Package *package)
+ { return package->getPropertyInt (property) == value; }
+};
+
+struct QueryStr : public Ypp::QueryProperty::Impl
+{
+ std::string property;
+ std::string value;
+ bool case_sensitive, whole_word;
+
+ QueryStr (const std::string &property, const std::string &value,
+ bool case_sensitive, bool whole_word)
+ : property (property), value (value), case_sensitive (case_sensitive),
+ whole_word (whole_word) {}
+
+ virtual bool match (Ypp::Package *package)
+ {
+ std::string pkg_value = package->getPropertyStr (property);
+ if (whole_word) {
+ if (case_sensitive)
+ return strcmp (pkg_value.c_str(), value.c_str()) == 0;
+ return strcasecmp (pkg_value.c_str(), value.c_str()) == 0;
+ }
+ if (case_sensitive)
+ return strstr (pkg_value.c_str(), value.c_str()) != NULL;
+ return strcasestr (pkg_value.c_str(), value.c_str()) != NULL;
}
};
-Ypp::PkgQuery::Query::Query()
-{ impl = new Impl(); }
-Ypp::PkgQuery::Query::~Query()
+Ypp::QueryProperty::QueryProperty (const std::string &property, bool value)
+{ impl = new QueryBool (property, value); }
+
+Ypp::QueryProperty::QueryProperty (const std::string &property, int value)
+{ impl = new QueryInt (property, value); }
+
+Ypp::QueryProperty::QueryProperty (const std::string &property, const std::string &value, bool case_sensitive, bool whole_word)
+{ impl = new QueryStr (property, value, case_sensitive, whole_word); }
+
+Ypp::QueryProperty::~QueryProperty()
+{ delete impl; }
+
+bool Ypp::QueryProperty::match (Ypp::Package *package)
+{ return impl->match (package); }
+
+struct Ypp::QueryCategory::Impl {
+ const Node *category;
+ bool category2;
+ Impl (const Node *category, bool category2)
+ : category (category), category2 (category2) {}
+};
+
+Ypp::QueryCategory::QueryCategory (const Ypp::Node *category, bool category2)
+{ impl = new Impl (category, category2); }
+
+Ypp::QueryCategory::~QueryCategory()
{ delete impl; }
-void Ypp::PkgQuery::Query::addNames (std::string value, char separator, bool use_name,
- bool use_summary, bool use_description, bool use_filelist, bool use_authors,
- bool whole_word, bool whole_string)
-{
- if (separator) {
- const gchar delimiter[2] = { separator, '\0' };
- gchar **names = g_strsplit (value.c_str(), delimiter, -1);
- for (gchar **i = names; *i; i++)
- impl->names.add (*i);
- g_strfreev (names);
- }
- else
- impl->names.add (value);
- impl->use_name = use_name;
- impl->use_summary = use_summary;
- impl->use_description = use_description;
- impl->use_filelist = use_filelist;
- impl->use_authors = use_authors;
- impl->whole_word = whole_word;
- impl->whole_string = whole_string;
-}
-void Ypp::PkgQuery::Query::addCategory (Ypp::Node *value)
-{ impl->categories.add (value); }
-void Ypp::PkgQuery::Query::addCategory2 (Ypp::Node *value)
-{ impl->categories2.add (value); }
-void Ypp::PkgQuery::Query::addCollection (const Ypp::Package *value)
-{ impl->collections.add (value); }
-void Ypp::PkgQuery::Query::addRepository (const Repository *value)
-{ impl->repositories.add (value); }
-void Ypp::PkgQuery::Query::setIsInstalled (bool value)
-{ impl->isInstalled.set (value); }
-void Ypp::PkgQuery::Query::setHasUpgrade (bool value)
-{ impl->hasUpgrade.set (value); }
-void Ypp::PkgQuery::Query::setToModify (bool value)
-{ impl->toModify.set (value); }
-void Ypp::PkgQuery::Query::setToInstall (bool value)
-{ impl->toInstall.set (value); }
-void Ypp::PkgQuery::Query::setToRemove (bool value)
-{ impl->toRemove.set (value); }
-void Ypp::PkgQuery::Query::setIsRecommended (bool value)
-{ impl->isRecommended.set (value); }
-void Ypp::PkgQuery::Query::setIsSuggested (bool value)
-{ impl->isSuggested.set (value); }
-void Ypp::PkgQuery::Query::setBuildAge (int value)
-{ impl->buildAge.set (value); }
-void Ypp::PkgQuery::Query::setIsSupported (bool value)
-{ impl->isSupported.set (value); }
-void Ypp::PkgQuery::Query::setSeverity (int value)
-{ impl->severity.set (value); }
-void Ypp::PkgQuery::Query::setClear()
-{ impl->clear = true; }
+bool Ypp::QueryCategory::match (Ypp::Package *package)
+{
+ GNode *node = (GNode *) impl->category->impl;
+ Node *pkg_category = impl->category2 ? package->category2() : package->category();
+ if (g_node_find (node, G_PRE_ORDER, G_TRAVERSE_ALL, pkg_category))
+ return true;
+ return false;
+}
+
+Ypp::QueryRepository::QueryRepository (const Ypp::Repository *_repo)
+{ repo = _repo; }
+
+bool Ypp::QueryRepository::match (Ypp::Package *package)
+{
+ for (int i = 0; package->getAvailableVersion (i); i++) {
+ const Package::Version *version = package->getAvailableVersion (i);
+ if (version->repo == repo)
+ return true;
+ }
+ return false;
+}
+
+Ypp::QueryCollection::QueryCollection (const Ypp::Package *_collection)
+{ collection = _collection; }
+
+bool Ypp::QueryCollection::match (Ypp::Package *package)
+{ return package->fromCollection (collection); }
+
+//** PkgQuery
struct Ypp::PkgQuery::Impl : public Ypp::PkgList::Impl
{
-Query *query;
+QueryBase *query;
- Impl (const PkgList parent, Query *query)
- : PkgList::Impl (&parent), query (query)
- {}
+ Impl (const PkgList parent, QueryBase *query)
+ : PkgList::Impl (&parent), query (query) {}
~Impl()
{ delete query; }
@@ -2248,22 +2119,22 @@
virtual bool liveList() const
{ return true; }
- virtual bool match (Package *pkg) const
- { return query ? query->impl->match (pkg) : true; }
+ virtual bool match (Package *package) const
+ { return query->match (package); }
virtual bool highlight (Package *pkg) const
{
- if (query && query->impl->highlight == pkg)
- return true;
+/* if (old_query->impl->highlight == pkg)
+ return true;*/
return parent->highlight (pkg); // this might be a sub-query
}
};
-Ypp::PkgQuery::PkgQuery (const Ypp::PkgList list, Ypp::PkgQuery::Query *query)
+Ypp::PkgQuery::PkgQuery (const Ypp::PkgList list, Ypp::QueryBase *query)
: PkgList ((impl = new PkgQuery::Impl (list, query)))
{ copy (list); }
-Ypp::PkgQuery::PkgQuery (Ypp::Package::Type type, Ypp::PkgQuery::Query *query)
+Ypp::PkgQuery::PkgQuery (Ypp::Package::Type type, Ypp::QueryBase *query)
: PkgList ((impl = new PkgQuery::Impl (Ypp::get()->getPackages (type), query)))
{ copy (Ypp::get()->getPackages (type)); }
Modified: trunk/gtk/src/pkg/yzyppwrapper.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/yzyppwrapper.h?rev=6…
==============================================================================
--- trunk/gtk/src/pkg/yzyppwrapper.h (original)
+++ trunk/gtk/src/pkg/yzyppwrapper.h Wed Dec 30 12:01:38 2009
@@ -73,9 +73,9 @@
std::string provides (MarkupType markup) const;
std::string requires (MarkupType markup) const;
- std::string getPropertyStr (const std::string &prop, MarkupType markup = NO_MARKUP);
- int getPropertyInt (const std::string &prop);
bool getPropertyBool (const std::string &prop);
+ int getPropertyInt (const std::string &prop);
+ std::string getPropertyStr (const std::string &prop, MarkupType markup = NO_MARKUP);
struct Version {
std::string number, arch;
@@ -178,36 +178,62 @@
};
// listing of packages as filtered
- struct PkgQuery : public PkgList {
- struct Query {
- Query();
- void addNames (std::string name, char separator = 0, bool use_name = true,
- bool use_summary = true, bool use_description = false,
- bool use_filelist = false, bool use_authors = false,
- bool whole_word = false, bool whole_string = false);
- void addCategory (Ypp::Node *category);
- void addCategory2 (Ypp::Node *category);
- void addCollection (const Ypp::Package *package);
- void addRepository (const Ypp::Repository *repository);
- void setIsInstalled (bool installed);
- void setHasUpgrade (bool upgradable);
- void setToModify (bool modify);
- void setToInstall (bool install);
- void setToRemove (bool remove);
- void setIsRecommended (bool recommended);
- void setIsSuggested (bool suggested);
- void setBuildAge (int days);
- void setIsSupported (bool supported);
- void setSeverity (int severity);
- void setClear();
-
- ~Query();
- struct Impl;
- Impl *impl;
- };
+ struct QueryBase {
+ virtual ~QueryBase() {}
+ virtual bool match (Package *) = 0;
+ };
+ struct QueryAnd : public QueryBase {
+ QueryAnd();
+ void add (QueryBase *query);
+
+ virtual ~QueryAnd();
+ virtual bool match (Package *);
+ struct Impl;
+ Impl *impl;
+ };
+ struct QueryOr : public QueryBase {
+ QueryOr();
+ void add (QueryBase *query);
+
+ virtual ~QueryOr();
+ virtual bool match (Package *);
+ struct Impl;
+ Impl *impl;
+ };
+ struct QueryProperty : public QueryBase {
+ QueryProperty (const std::string &property, bool value);
+ QueryProperty (const std::string &property, int value);
+ QueryProperty (const std::string &property, const std::string &value, bool case_sensitive, bool whole_word);
- PkgQuery (const PkgList list, Query *query);
- PkgQuery (Package::Type type, Query *query); // shortcut
+ virtual ~QueryProperty();
+ virtual bool match (Package *);
+ struct Impl;
+ Impl *impl;
+ };
+ struct QueryCategory : public QueryBase {
+ QueryCategory (const Node *category, bool category2);
+
+ virtual ~QueryCategory();
+ virtual bool match (Package *);
+ struct Impl;
+ Impl *impl;
+ };
+ struct QueryRepository : public QueryBase {
+ QueryRepository (const Repository *repository);
+
+ virtual bool match (Package *);
+ const Repository *repo;
+ };
+ struct QueryCollection : public QueryBase {
+ QueryCollection (const Ypp::Package *collection);
+
+ virtual bool match (Package *);
+ const Ypp::Package *collection;
+ };
+
+ struct PkgQuery : public PkgList {
+ PkgQuery (const PkgList list, QueryBase *query);
+ PkgQuery (Package::Type type, QueryBase *query); // shortcut
struct Impl;
Impl *impl;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r60204 - in /trunk/storage: ./ bindings/ycp/ package/ storage/src/ storage/src/include/ storage/src/modules/
by aschnell@svn.opensuse.org 30 Dec '09
by aschnell@svn.opensuse.org 30 Dec '09
30 Dec '09
Author: aschnell
Date: Wed Dec 30 11:46:27 2009
New Revision: 60204
URL: http://svn.opensuse.org/viewcvs/yast?rev=60204&view=rev
Log:
- ported MdPart code from SLE11 SP1
Modified:
trunk/storage/VERSION
trunk/storage/bindings/ycp/LibStorage.i
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/include/custom_part_check_generated.ycp
trunk/storage/storage/src/include/ep-hd.ycp
trunk/storage/storage/src/include/ep-main.ycp
trunk/storage/storage/src/inst_target_selection.ycp
trunk/storage/storage/src/modules/Storage.ycp
trunk/storage/storage/src/modules/StorageFields.ycp
trunk/storage/storage/src/modules/StorageIcons.ycp
trunk/storage/yast2-storage.spec.in
Modified: trunk/storage/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=60204&r1=602…
==============================================================================
--- trunk/storage/VERSION (original)
+++ trunk/storage/VERSION Wed Dec 30 11:46:27 2009
@@ -1 +1 @@
-2.19.1
+2.19.2
Modified: trunk/storage/bindings/ycp/LibStorage.i
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/bindings/ycp/LibStorage.…
==============================================================================
--- trunk/storage/bindings/ycp/LibStorage.i (original)
+++ trunk/storage/bindings/ycp/LibStorage.i Wed Dec 30 11:46:27 2009
@@ -27,6 +27,9 @@
specialize_sequence(storage::LvmLvInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::MdInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::MdStateInfo, TO_PACK, FROM_PACK, CHECK)
+specialize_sequence(storage::MdPartCoInfo, TO_PACK, FROM_PACK, CHECK)
+specialize_sequence(storage::MdPartInfo, TO_PACK, FROM_PACK, CHECK)
+specialize_sequence(storage::MdPartCoStateInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::LoopInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::DmInfo, TO_PACK, FROM_PACK, CHECK)
specialize_sequence(storage::NfsInfo, TO_PACK, FROM_PACK, CHECK)
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.ch…
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Wed Dec 30 11:46:27 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Dec 29 18:53:27 CET 2009 - aschnell(a)suse.de
+
+- ported MdPart code from SLE11 SP1
+- 2.19.2
+
+-------------------------------------------------------------------
Tue Dec 22 14:23:40 CET 2009 - aschnell(a)suse.de
- support for cloning disk partition layout (fate #303809)
Modified: trunk/storage/storage/src/include/custom_part_check_generated.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/cust…
==============================================================================
--- trunk/storage/storage/src/include/custom_part_check_generated.ycp (original)
+++ trunk/storage/storage/src/include/custom_part_check_generated.ycp Wed Dec 30 11:46:27 2009
@@ -77,7 +77,7 @@
list<map> part_info = diskinfo["partitions"]:[];
integer cyl_size = diskinfo["cyl_size"]:1000000;
- if (contains([ `CT_DISK, `CT_DMRAID, `CT_DMMULTIPATH ], diskinfo["type"]:`CT_UNKNOWN))
+ if (contains([ `CT_DISK, `CT_DMRAID, `CT_DMMULTIPATH, `CT_MDPART ], diskinfo["type"]:`CT_UNKNOWN))
diskless = false;
foreach (map part, part_info, {
Modified: trunk/storage/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-h…
==============================================================================
--- trunk/storage/storage/src/include/ep-hd.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd.ycp Wed Dec 30 11:46:27 2009
@@ -115,11 +115,10 @@
{
symbol Predicate(map disk, map partition)
{
- return StorageFields::PredicateDiskType(disk, partition, [`CT_DMRAID, `CT_DMMULTIPATH, `CT_DISK]);
+ return StorageFields::PredicateDiskType(disk, partition, [`CT_DMRAID, `CT_DMMULTIPATH,
+ `CT_MDPART, `CT_DISK]);
}
-
-
list<symbol> fields = StorageSettings::FilterTable([ `device, `udev_path, `udev_id, `size, `format,
`encrypted, `type, `fs_type, `label, `mount_point,
`mount_by, `start_cyl, `end_cyl, `used_by ]);
Modified: trunk/storage/storage/src/include/ep-main.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-m…
==============================================================================
--- trunk/storage/storage/src/include/ep-main.ycp (original)
+++ trunk/storage/storage/src/include/ep-main.ycp Wed Dec 30 11:46:27 2009
@@ -158,6 +158,7 @@
case `CT_DISK:
case `CT_DMRAID:
case `CT_DMMULTIPATH:
+ case `CT_MDPART:
huhu(disk, `hd, $[ `create : CreateHdPartitionPanel, `handle : HandleHdPartitionPanel ],
$[ `create : CreateHdDiskPanel, `handle : HandleHdDiskPanel ]);
break;
@@ -246,7 +247,8 @@
switch (disk["type"]:`unknown)
{
- case `CT_DISK:
+ case `CT_DISK:
+ case `CT_MDPART:
case `CT_DMRAID:
case `CT_DMMULTIPATH:
if (part == nil)
Modified: trunk/storage/storage/src/inst_target_selection.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/inst_target_…
==============================================================================
--- trunk/storage/storage/src/inst_target_selection.ycp (original)
+++ trunk/storage/storage/src/inst_target_selection.ycp Wed Dec 30 11:46:27 2009
@@ -66,7 +66,7 @@
map<string, map> usable_target_map = filter(string d, map e, targetMap, {
return Storage::IsPartitionable(e) &&
- !contains([ `UB_DMRAID, `UB_DMMULTIPATH ], e["used_by_type"]:`UB_NONE);
+ !contains([ `UB_DMRAID, `UB_DMMULTIPATH, `UB_MDPART ], e["used_by_type"]:`UB_NONE);
});
integer dskcnt = size(usable_target_map);
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stor…
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Wed Dec 30 11:46:27 2009
@@ -55,6 +55,8 @@
import "LibStorage::DmPartInfo";
import "LibStorage::DmraidInfo";
import "LibStorage::DmmultipathInfo";
+ import "LibStorage::MdPartCoInfo";
+ import "LibStorage::MdPartInfo";
import "LibStorage::NfsInfo";
import "LibStorage::ContainerInfo";
import "LibStorage::DiskInfo";
@@ -90,6 +92,7 @@
LibStorage::DMRAID() : `CT_DMRAID,
LibStorage::DMMULTIPATH() : `CT_DMMULTIPATH,
LibStorage::DM() : `CT_DM,
+ LibStorage::MDPART() : `CT_MDPART,
LibStorage::NFSC() : `CT_NFS
]
];
@@ -101,6 +104,7 @@
LibStorage::UB_MD() : `UB_MD,
LibStorage::UB_DMRAID() : `UB_DMRAID,
LibStorage::UB_DMMULTIPATH() : `UB_DMMULTIPATH,
+ LibStorage::UB_MDPART() : `UB_MDPART,
LibStorage::UB_DM() : `UB_DM
]
];
@@ -172,8 +176,9 @@
map DiskMapVersion = $[];
map DiskMap = $[];
-map type_order = $[ `CT_DISK : 0, `CT_MD : 1, `CT_DMRAID : 2, `CT_DMMULTIPATH : 3,
- `CT_LOOP : 4, `CT_DM : 5, `CT_LVM : 6, `CT_NFS : 7 ];
+map type_order = $[ `CT_DISK : 0, `CT_MD : 1, `CT_MDPART : 2, `CT_DMRAID : 3,
+ `CT_DMMULTIPATH : 4, `CT_LOOP : 5, `CT_DM : 6, `CT_LVM : 7,
+ `CT_NFS : 8 ];
list<string> hw_packages = [];
string part_insts = "";
@@ -577,7 +582,12 @@
}
else if( search( device, "/dev/md" )==0 && size(ls)==2 )
{
- dlen = 7;
+ integer pos = find(device, "p");
+ y2milestone("device:%1 pos:%2", device, pos);
+ if (pos == -1)
+ dlen = 7;
+ else
+ dlen = pos;
}
else if( search( device, "/dev/loop" )==0 )
{
@@ -1290,6 +1300,21 @@
return( p );
}
+map mdPartMap(any info, map p)
+{
+ any vinfo = LibStorage::MdPartInfo::swig_v_get(info);
+ p = volumeMap(vinfo, p);
+ p["nr"] = 0;
+ boolean part = LibStorage::MdPartInfo::swig_part_get(info);
+ if (part)
+ {
+ any pinfo = LibStorage::MdPartInfo::swig_p_get(info);
+ p = partAddMap(pinfo, p);
+ }
+ y2milestone("mdPartMap ret:%1", p);
+ return p;
+}
+
map getContainerInfo( map c )
{
y2milestone( "getContainerInfo %1", c );
@@ -1385,6 +1410,50 @@
c["partitions"] = add( c["partitions"]:[], p );
});
}
+ else if( c["type"]:`CT_UNKNOWN == `CT_MDPART )
+ {
+ list<any> pinfos = [];
+ any infos = LibStorage::MdPartCoInfo::new("LibStorage::MdPartCoInfo");
+ string d = c["device"]:"";
+ ret = LibStorage::StorageInterface::getMdPartCoInfo(sint, d, infos);
+ if (ret == 0)
+ {
+ any dinfo = LibStorage::MdPartCoInfo::swig_d_get(infos);
+ c = diskMap(dinfo, c);
+ }
+ else
+ y2warning( "disk \"%1\" ret:%2", c["device"]:"", ret );
+
+ list<string> ls = splitstring(LibStorage::MdPartCoInfo::swig_devices_get(infos), " ");
+ y2milestone( "ls=%1", ls );
+ c["devices"] = ls;
+
+ integer t = LibStorage::MdPartCoInfo::swig_level_get(infos);
+ c["raid_type"] = substring(sformat("%1", toSymbol(conv_mdtype, t)), 1);
+ if (c["raid_type"]:"" == "raid5")
+ {
+ t = LibStorage::MdPartCoInfo::swig_parity_get(infos);
+ symbol pt = toSymbol(conv_mdparity, t);
+ if (pt != `par_none)
+ c["parity_algorithm"] = substring(sformat("%1", pt), 1);
+ }
+ t = LibStorage::MdPartCoInfo::swig_chunk_get(infos);
+ if (t > 0)
+ {
+ c["chunk_size"] = t;
+ }
+ c["sb_ver"] = LibStorage::MdPartCoInfo::swig_sb_ver_get(infos);
+
+ c["partitions"] = [];
+ ret = LibStorage::StorageInterface::getMdPartInfo(sint, d, pinfos);
+ foreach(any info, pinfos, {
+ map p = $[];
+ p = mdPartMap(info, p);
+ p["fstype"] = Partitions::raid_name;
+ if (p["nr"]:-1 != 0)
+ c["partitions"] = add(c["partitions"]:[], p);
+ });
+ }
else if( c["type"]:`CT_UNKNOWN == `CT_LVM )
{
list<any> pinfos = [];
@@ -1572,7 +1641,7 @@
global boolean IsDiskType(symbol t)
{
- return contains([ `CT_DISK, `CT_DMRAID, `CT_DMMULTIPATH ], t);
+ return contains([ `CT_DISK, `CT_DMRAID, `CT_DMMULTIPATH, `CT_MDPART ], t);
}
/**
@@ -2817,7 +2886,7 @@
global boolean IsPartType(symbol t)
{
- return t == `CT_DMRAID || t == `CT_DMMULTIPATH || t == `CT_DISK;
+ return t == `CT_DMRAID || t == `CT_DMMULTIPATH || t == `CT_DISK || t == `CT_MDPART;
}
@@ -3067,7 +3136,7 @@
``{
map dtmp = Storage::GetDiskPartitionTg( dev, $[] )[0]:$[];
y2milestone( "probing dev %1 disk %2", dev, dtmp );
- if( search( dev, "/dev/dm-" )==0 )
+ if( search( dev, "/dev/dm-" )==0 || search( dev, "/dev/md" )==0 )
{
if( size(disk["bios_id"]:"")>0 )
bios_id_raid[dev] = disk["bios_id"]:"";
@@ -3080,6 +3149,8 @@
});
tmp = filter( string dev, map disk, tmp,
``(search( dev, "/dev/dm-" )!=0));
+ tmp = filter( string dev, map disk, tmp,
+ ``(search( dev, "/dev/md" )!=0));
if( size(rename)>0 )
{
foreach( string old, string new, rename,
@@ -3133,6 +3204,11 @@
y2milestone("addind bios_id %1 to %2", bios, dev);
tmp[dev, "bios_id"] = bios;
}
+ if (c["type"]:`CT_UNKNOWN == `CT_MDPART && c["device"]:"" == dm)
+ {
+ y2milestone("addind bios_id %1 to %2", bios, dev);
+ tmp[dev, "bios_id"] = bios;
+ }
});
});
}
@@ -3221,8 +3297,8 @@
});
keys = maplist( string k, any e, tg, ``(k));
keys = sort( string a, string b, keys,
- ``( type_order[tg[a,"type"]:`CT_UNKNOWN]:6 >
- type_order[tg[b,"type"]:`CT_UNKNOWN]:6 ));
+ ``( type_order[tg[a,"type"]:`CT_UNKNOWN]:9 >
+ type_order[tg[b,"type"]:`CT_UNKNOWN]:9 ));
y2milestone( "SetTargetMap keys %1", keys );
foreach( string k, keys,
``{
@@ -3252,8 +3328,8 @@
});
keys = maplist( string k, any e, target, ``(k));
keys = sort( string a, string b, keys,
- ``( type_order[target[a,"type"]:`CT_UNKNOWN]:6 >
- type_order[target[b,"type"]:`CT_UNKNOWN]:6 ));
+ ``( type_order[target[a,"type"]:`CT_UNKNOWN]:9 >
+ type_order[target[b,"type"]:`CT_UNKNOWN]:9 ));
y2milestone( "SetTargetMap keys %1", keys );
foreach( string k, keys,
``{
@@ -3286,8 +3362,8 @@
});
keys = maplist( string k, any e, target, ``(k));
keys = sort( string a, string b, keys,
- ``( type_order[target[a,"type"]:`CT_UNKNOWN]:6 <
- type_order[target[b,"type"]:`CT_UNKNOWN]:6 ));
+ ``( type_order[target[a,"type"]:`CT_UNKNOWN]:9 <
+ type_order[target[b,"type"]:`CT_UNKNOWN]:9 ));
y2milestone( "SetTargetMap keys %1", keys );
foreach( string k, keys,
``{
@@ -3879,7 +3955,7 @@
global boolean IsPartitionable( map entry )
{
return entry["type"]:`CT_UNKNOWN==`CT_DMRAID || entry["type"]:`CT_UNKNOWN==`CT_DMMULTIPATH ||
- IsRealDisk( entry );
+ entry["type"]:`CT_UNKNOWN==`CT_MDPART || IsRealDisk( entry );
}
global define boolean DeviceRealDisk( string device )
@@ -4738,6 +4814,8 @@
need_crypt = true;
if (e["type"]:`CT_UNKNOWN == `CT_MD && !isempty(e["partitions"]:[]))
need_md = true;
+ if( e["type"]:`CT_UNKNOWN==`CT_MDPART )
+ need_md = true;
if( e["type"]:`CT_UNKNOWN==`CT_LVM )
need_lvm = true;
if( e["type"]:`CT_UNKNOWN==`CT_DMRAID )
Modified: trunk/storage/storage/src/modules/StorageFields.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stor…
==============================================================================
--- trunk/storage/storage/src/modules/StorageFields.ycp (original)
+++ trunk/storage/storage/src/modules/StorageFields.ycp Wed Dec 30 11:46:27 2009
@@ -28,13 +28,13 @@
*/
global void IterateTargetMap(map<string, map> target_map, void(map<string, map>, map) callback)
{
- const map disk_order = $[ `CT_DMRAID : 0, `CT_DMMULTIPATH : 1, `CT_DISK : 2,
- `CT_MD : 3, `CT_LOOP : 4, `CT_LVM : 5, `CT_DM : 6, `CT_NFS : 7 ];
+ const map disk_order = $[ `CT_DMRAID : 0, `CT_DMMULTIPATH : 1, `CT_MDPART : 2, `CT_DISK : 3,
+ `CT_MD : 4, `CT_LOOP : 5, `CT_LVM : 6, `CT_DM : 7, `CT_NFS : 8 ];
list<string> keys = maplist(string dev, map disk, target_map, { return dev; });
keys = sort(string a, string b, keys, {
- integer oa = disk_order[target_map[a, "type"]:`CT_UNKNOWN]:8;
- integer ob = disk_order[target_map[b, "type"]:`CT_UNKNOWN]:8;
+ integer oa = disk_order[target_map[a, "type"]:`CT_UNKNOWN]:9;
+ integer ob = disk_order[target_map[b, "type"]:`CT_UNKNOWN]:9;
return (oa==ob) ? (a<b) : (oa<ob);
});
@@ -72,6 +72,7 @@
case `UB_DMMULTIPATH:
return "DM Multipath " + device;
case `UB_MD:
+ case `UB_MDPART:
return "RAID " + device;
default:
return device;
@@ -503,18 +504,22 @@
{
value = "RAID " + disk_device;
}
- else if(disk["type"]:`CT_UNKNOWN==`CT_LVM)
+ else if (disk["type"]:`CT_UNKNOWN == `CT_LVM)
{
value = "LVM" + (disk["lvm2"]:false ? "2 " : " ") + disk["name"]:"";
}
- else if(disk["type"]:`CT_UNKNOWN==`CT_DMRAID)
+ else if (disk["type"]:`CT_UNKNOWN == `CT_DMRAID)
{
value = "DM RAID " + disk["name"]:"";
}
- else if(disk["type"]:`CT_UNKNOWN==`CT_DMMULTIPATH)
+ else if (disk["type"]:`CT_UNKNOWN == `CT_DMMULTIPATH)
{
value = "DM Multipath " + disk["name"]:"";
}
+ else if (disk["type"]:`CT_UNKNOWN == `CT_MDPART)
+ {
+ value = "MD " + disk["name"]:"";
+ }
else
{
// label text
@@ -963,7 +968,7 @@
if (type == `CT_DISK && !real_disk)
return true;
- if (!contains([ `CT_DISK, `CT_DMRAID, `CT_DMMULTIPATH, `CT_LVM ], type))
+ if (!contains([ `CT_DISK, `CT_DMRAID, `CT_DMMULTIPATH, `CT_MDPART, `CT_LVM ], type))
return true;
return false;
Modified: trunk/storage/storage/src/modules/StorageIcons.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stor…
==============================================================================
--- trunk/storage/storage/src/modules/StorageIcons.ycp (original)
+++ trunk/storage/storage/src/modules/StorageIcons.ycp Wed Dec 30 11:46:27 2009
@@ -45,6 +45,7 @@
{
case `CT_DMRAID:
case `CT_MD:
+ case `CT_MDPART:
case `sw_raid:
return raid_icon;
Modified: trunk/storage/yast2-storage.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/yast2-storage.spec.in?re…
==============================================================================
--- trunk/storage/yast2-storage.spec.in (original)
+++ trunk/storage/yast2-storage.spec.in Wed Dec 30 11:46:27 2009
@@ -5,7 +5,7 @@
License: GPL v2 or later
BuildRequires: blocxx-devel boost-devel gcc-c++ libxcrypt-devel openssl-devel sablot swig
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files
-BuildRequires: libstorage-devel >= 2.19.3 yast2 >= 2.18.19 yast2-core-devel >= 2.18.1 yast2-devtools
+BuildRequires: libstorage-devel >= 2.19.4 yast2 >= 2.18.19 yast2-core-devel >= 2.18.1 yast2-devtools
BuildRequires: yast2-testsuite >= 2.19.0 yast2-perl-bindings
Requires: libstorage = %(echo `rpm -q --queryformat '%{VERSION}' libstorage`)
Requires: yast2-perl-bindings yast2-core >= 2.18.3 yast2 >= 2.18.19 yast2-libyui >= 2.18.7
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
29 Dec '09
Author: rpmcruz
Date: Tue Dec 29 02:59:15 2009
New Revision: 60203
URL: http://svn.opensuse.org/viewcvs/yast?rev=60203&view=rev
Log:
Removed line by mistake.
Modified:
trunk/gtk/src/pkg/ygtkpackageview.cc
Modified: trunk/gtk/src/pkg/ygtkpackageview.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpackageview.cc?r…
==============================================================================
--- trunk/gtk/src/pkg/ygtkpackageview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpackageview.cc Tue Dec 29 02:59:15 2009
@@ -1110,7 +1110,8 @@
}
if (!empty)
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
+ inner::appendItem (menu, NULL, NULL, GTK_STOCK_SELECT_ALL,
+ true, inner::select_all_cb, this);
GtkWidget *item = gtk_menu_item_new_with_mnemonic (_("_Show Column"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0