Hello community, here is the log from the commit of package yast2-pkg-bindings for openSUSE:Factory checked in at Mon Jun 27 12:04:54 CEST 2011.
-------- --- yast2-pkg-bindings/yast2-pkg-bindings.changes 2010-11-02 15:47:27.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-pkg-bindings/yast2-pkg-bindings.changes 2011-06-23 14:13:43.000000000 +0200 @@ -1,0 +2,37 @@ +Thu Jun 23 11:59:48 UTC 2011 - [email protected] + +- fixed aborting autorefresh (bnc#691828) +- 2.21.3 + +------------------------------------------------------------------- +Wed Jun 22 14:42:04 UTC 2011 - [email protected] + +- 2.21.2 + +------------------------------------------------------------------- +Tue Jun 21 13:00:56 UTC 2011 - [email protected] + +- added Pkg::Add/RemoveUpgradeRepo() and Pkg::GetUpgradeRepos() + (fate#311994) + +------------------------------------------------------------------- +Tue Jun 14 08:40:30 UTC 2011 - [email protected] + +- added Pkg::CommitPolicy() +- support for download in advance mode in yast2-wagon (fate#308951) +- Pkg::ResolvableProperties() - return "product_package" value + for available products (fate#310730) +- 2.21.1 + +------------------------------------------------------------------- +Tue Apr 5 11:12:10 UTC 2011 - [email protected] + +- do not refresh empty repositories, remember loaded status + (bnc#665488) +- added Pkg::Commit() function which accepts commit options map + (with download_mode, dry_run... options) (FATE#308951) +- added Pkg::ZConfig() function returning current libzypp config + (FATE#308951) +- 2.21.0 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-pkg-bindings-2.20.3.tar.bz2 New: ---- openSUSE-11.3.diff yast2-pkg-bindings-2.21.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-pkg-bindings-devel-doc.spec ++++++ --- /var/tmp/diff_new_pack.AlmyID/_old 2011-06-27 12:04:00.000000000 +0200 +++ /var/tmp/diff_new_pack.AlmyID/_new 2011-06-27 12:04:00.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package yast2-pkg-bindings-devel-doc (Version 2.20.3) +# spec file for package yast2-pkg-bindings-devel-doc # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,12 @@ Name: yast2-pkg-bindings-devel-doc -Version: 2.20.3 +Version: 2.21.3 Release: 1 License: GPL Group: Documentation/HTML BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-pkg-bindings-2.20.3.tar.bz2 +Source0: yast2-pkg-bindings-2.21.3.tar.bz2 Prefix: %_prefix # same as in the main package (because we use the same configure.in.in) @@ -42,7 +42,7 @@ from the pkg-bindings sources. %prep -%setup -n yast2-pkg-bindings-2.20.3 +%setup -n yast2-pkg-bindings-2.21.3 # build only documentation, ignore all other directories echo "doc" > SUBDIRS ++++++ yast2-pkg-bindings.spec ++++++ --- /var/tmp/diff_new_pack.AlmyID/_old 2011-06-27 12:04:00.000000000 +0200 +++ /var/tmp/diff_new_pack.AlmyID/_new 2011-06-27 12:04:00.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package yast2-pkg-bindings (Version 2.20.3) +# spec file for package yast2-pkg-bindings # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,16 +19,16 @@ Name: yast2-pkg-bindings -Version: 2.20.3 +Version: 2.21.3 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-pkg-bindings-2.20.3.tar.bz2 +Source0: yast2-pkg-bindings-2.21.3.tar.bz2 Prefix: /usr Group: System/YaST -License: GPLv2+ +License: GPL v2 or later BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen gcc-c++ libgcrypt-devel libxcrypt-devel libxslt perl-XML-Writer sgml-skel yast2-core-devel yast2-devtools BuildRequires: libzypp-devel >= 6.10.0 @@ -37,15 +37,23 @@ Summary: YaST2 - Package Manager Access +%if 0%{?suse_version} == 1130 +Patch0: openSUSE-11.3.diff +%endif + %description This package contains a name space for accessing the package manager library in YaST2. %prep -%setup -n yast2-pkg-bindings-2.20.3 +%setup -n yast2-pkg-bindings-2.21.3 # build only the library, ignore documentation (it is in devel-doc package) echo "src" > SUBDIRS +%if 0%{?suse_version} == 1130 +%patch0 -p0 +%endif + %build %{prefix}/bin/y2tool y2autoconf %{prefix}/bin/y2tool y2automake ++++++ openSUSE-11.3.diff ++++++ Index: src/PkgFunctions.cc =================================================================== --- src/PkgFunctions.cc (revision 64337) +++ src/PkgFunctions.cc (working copy) @@ -373,8 +373,6 @@ ret->add(YCPString("credentials_global_dir"), YCPString(zconfig.credentialsGlobalDir().asString())); ret->add(YCPString("credentials_global_file"), YCPString(zconfig.credentialsGlobalFile().asString())); - ret->add(YCPString("plugins_path"), YCPString(zconfig.pluginsPath().asString())); - ret->add(YCPString("distro_version_pkg"), YCPString(zconfig.distroverpkg())); return ret; Index: src/Package.cc =================================================================== --- src/Package.cc (revision 64337) +++ src/Package.cc (working copy) @@ -2107,9 +2107,6 @@ switch (d_mode) { - case zypp::DownloadDefault: - mode = "default"; - break; case zypp::DownloadOnly: mode = "download_only"; break; ++++++ yast2-pkg-bindings-2.20.3.tar.bz2 -> yast2-pkg-bindings-2.21.3.tar.bz2 ++++++ ++++ 2767 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/config.h.in new/yast2-pkg-bindings-2.21.3/config.h.in --- old/yast2-pkg-bindings-2.20.3/config.h.in 2010-11-02 15:42:24.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/config.h.in 2011-06-23 14:12:43.000000000 +0200 @@ -83,3 +83,6 @@ /* Version number of package */ #undef VERSION + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +#undef size_t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/configure.in new/yast2-pkg-bindings-2.21.3/configure.in --- old/yast2-pkg-bindings-2.20.3/configure.in 2010-11-02 15:42:11.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/configure.in 2011-06-23 14:12:37.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-pkg-bindings, 2.20.3, http://bugs.opensuse.org/, yast2-pkg-bindings) +AC_INIT(yast2-pkg-bindings, 2.21.3, http://bugs.opensuse.org/, yast2-pkg-bindings) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.20.3" +VERSION="2.21.3" RPMNAME="yast2-pkg-bindings" MAINTAINER="Ladislav Slezák <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/libtool.m4 new/yast2-pkg-bindings-2.21.3/libtool.m4 --- old/yast2-pkg-bindings-2.20.3/libtool.m4 2010-11-02 15:42:18.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/libtool.m4 2011-06-23 14:12:40.000000000 +0200 @@ -1020,7 +1020,7 @@ # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { @@ -4825,9 +4825,18 @@ # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], [ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) + ]) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/ltversion.m4 new/yast2-pkg-bindings-2.21.3/ltversion.m4 --- old/yast2-pkg-bindings-2.20.3/ltversion.m4 2010-11-02 15:42:18.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/ltversion.m4 2011-06-23 14:12:40.000000000 +0200 @@ -9,15 +9,15 @@ # Generated from ltversion.in. -# serial 3017 ltversion.m4 +# serial 3018 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +m4_define([LT_PACKAGE_REVISION], [1.3018]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' -macro_revision='1.3017' +macro_revision='1.3018' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/Package.cc new/yast2-pkg-bindings-2.21.3/src/Package.cc --- old/yast2-pkg-bindings-2.20.3/src/Package.cc 2010-01-06 20:12:12.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/src/Package.cc 2011-06-23 11:19:44.000000000 +0200 @@ -2015,31 +2015,8 @@ return YCPVoid(); } -/** - @builtin PkgCommit - - @short Commit package changes (actually install/delete packages) - @description - - if medianr == 0, all packages regardless of media are installed - - if medianr > 0, only packages from this media are installed - - @param integer medianr Media Number - @return list [ int successful, list failed, list remaining, list srcremaining ] - The 'successful' value will be negative, if installation was aborted ! - -*/ -YCPValue -PkgFunctions::PkgCommit (const YCPInteger& media) +YCPValue PkgFunctions::CommitHelper(const zypp::ZYppCommitPolicy *policy) { - int medianr = media->value (); - - if (medianr < 0) - { - return YCPError ("Bad args to Pkg::PkgCommit"); - } - zypp::ZYpp::CommitResult result; // clean the last reported source @@ -2052,9 +2029,7 @@ last_reported_repo = -1; last_reported_mediumnr = 1; - zypp::ZYppCommitPolicy policy; - policy.restrictToMedia( medianr ); - result = zypp_ptr()->commit(policy); + result = zypp_ptr()->commit(*policy); } catch (const zypp::target::TargetAbortedException & excpt) { @@ -2118,6 +2093,357 @@ return ret; } +YCPValue PkgFunctions::CommitPolicy() +{ + YCPMap ret; + + if (commit_policy == NULL) + { + return ret; + } + + zypp::DownloadMode d_mode = commit_policy->downloadMode(); + std::string mode; + + switch (d_mode) + { + case zypp::DownloadDefault: + mode = "default"; + break; + case zypp::DownloadOnly: + mode = "download_only"; + break; + case zypp::DownloadInAdvance: + mode = "download_in_advance"; + break; + case zypp::DownloadInHeaps: + mode = "download_in_heaps"; + break; + case zypp::DownloadAsNeeded: + mode = "download_as_needed"; + break; + default : + y2error("Unknown download mode"); + } + + if (!mode.empty()) + { + ret->add(YCPString("download_mode"), YCPSymbol(mode)); + } + + + return ret; +} + +/** + @builtin PkgCommit + + @short Commit package changes (actually install/delete packages), see also Pkg::Commit() + @description + + if medianr == 0, all packages regardless of media are installed + + if medianr > 0, only packages from this media are installed + + @param integer medianr Media Number + @return list [ int successful, list failed, list remaining, list srcremaining ] + The 'successful' value will be negative, if installation was aborted ! + +*/ +YCPValue +PkgFunctions::PkgCommit (const YCPInteger& media) +{ + int medianr = media->value (); + + if (medianr < 0) + { + return YCPError ("Bad args to Pkg::PkgCommit"); + } + + commit_policy = new zypp::ZYppCommitPolicy; + commit_policy->restrictToMedia(medianr); + + YCPValue ret = CommitHelper(commit_policy); + + delete commit_policy; + commit_policy = NULL; + + return ret; +} + +/** + * @builtin Commit + * + * @short Commit package changes (actually install/delete packages) + * @description + * + * @param map commit configuration, currently supported values: + * $["download_mode":`default|`download_only|`download_only|`download_in_advance| + * `download_in_heaps|`download_as_needed, "medium_nr":<integer>, + * "dry_run":<boolean>, "exclude_docs":<boolean>, "no_signature":<boolean>], + * the default is $["download_mode":`default, "medium_nr":0 (all media), + * "dry_run":false, "exclude_docs":false, "no_signature":false], + * + * @return list [ int successful, list failed, list remaining, list srcremaining ] + * The 'successful' value will be negative, if installation was aborted ! +*/ +/* TYPEINFO: list<any>(integer)*/ +YCPValue PkgFunctions::Commit (const YCPMap& config) +{ + commit_policy = new zypp::ZYppCommitPolicy; + + if (!config.isNull()) + { + YCPString key("download_mode"); + + // set the download mode + if(!config->value(key).isNull()) + { + if (config->value(key)->isSymbol()) + { + std::string mode = config->value(key)->asSymbol()->symbol(); + + if (mode == "default") + { + commit_policy->downloadMode(zypp::DownloadDefault); + } + else if (mode == "download_only") + { + commit_policy->downloadMode(zypp::DownloadOnly); + } + else if (mode == "download_in_advance") + { + commit_policy->downloadMode(zypp::DownloadInAdvance); + } + else if (mode == "download_in_heaps") + { + commit_policy->downloadMode(zypp::DownloadInHeaps); + } + else if (mode == "download_as_needed") + { + commit_policy->downloadMode(zypp::DownloadAsNeeded); + } + else + { + y2error("Invalid download mode: %s", mode.c_str()); + _last_error.setLastError(std::string("Invalid download mode: ") + mode); + + delete commit_policy; + commit_policy = NULL; + + return YCPVoid(); + } + + y2milestone("Using download mode: %s", mode.c_str()); + } + else + { + y2error("Invalid download mode: symbol is required, got: %s", config->value(key)->asString()->value().c_str()); + _last_error.setLastError(std::string("Invalid download mode: ") + config->value(key)->asString()->value()); + + delete commit_policy; + commit_policy = NULL; + + return YCPVoid(); + } + } + + key = YCPString("medium_nr"); + // set the medium number + if(!config->value(key).isNull()) + { + if (config->value(key)->isInteger()) + { + unsigned medium_nr = config->value(key)->asInteger()->value(); + commit_policy->restrictToMedia(medium_nr); + + y2milestone("Restricting commit only to medium number: %u", medium_nr); + } + else + { + y2error("Invalid medium number: integer is required, got: %s", config->value(key)->asString()->value().c_str()); + _last_error.setLastError(std::string("Invalid medium number: ") + config->value(key)->asString()->value()); + + delete commit_policy; + commit_policy = NULL; + + return YCPVoid(); + } + } + + key = YCPString("dry_run"); + // set the medium number + if(!config->value(key).isNull()) + { + if (config->value(key)->isBoolean()) + { + bool dry_run = config->value(key)->asBoolean()->value(); + commit_policy->dryRun(dry_run); + + y2milestone("Dry run commit: %s", config->value(key)->asString()->value().c_str()); + } + else + { + y2error("Dry run option: boolean is required, got: %s", config->value(key)->asString()->value().c_str()); + _last_error.setLastError(std::string("Invalid dry run option: ") + config->value(key)->asString()->value()); + + delete commit_policy; + commit_policy = NULL; + + return YCPVoid(); + } + } + + key = YCPString("exclude_docs"); + // set the medium number + if(!config->value(key).isNull()) + { + if (config->value(key)->isBoolean()) + { + bool exclude_docs = config->value(key)->asBoolean()->value(); + commit_policy->rpmExcludeDocs(exclude_docs); + + y2milestone("Excluding documentation: %s", config->value(key)->asString()->value().c_str()); + } + else + { + y2error("Exclude documentation option: boolean is required, got: %s", config->value(key)->asString()->value().c_str()); + _last_error.setLastError(std::string("Invalid exclude documentation option: ") + config->value(key)->asString()->value()); + + delete commit_policy; + commit_policy = NULL; + + return YCPVoid(); + } + } + + key = YCPString("no_signature"); + // set the medium number + if(!config->value(key).isNull()) + { + if (config->value(key)->isBoolean()) + { + bool no_signature = config->value(key)->asBoolean()->value(); + commit_policy->rpmNoSignature(no_signature); + + y2milestone("Don't check RPM signature: %s", config->value(key)->asString()->value().c_str()); + } + else + { + y2error("No signature option: boolean is required, got: %s", config->value(key)->asString()->value().c_str()); + _last_error.setLastError(std::string("Invalid no signature option: ") + config->value(key)->asString()->value()); + + delete commit_policy; + commit_policy = NULL; + + return YCPVoid(); + } + } + } + + YCPValue ret = CommitHelper(commit_policy); + + delete commit_policy; + commit_policy = NULL; + + return ret; +} + +/* + Helper function for adding/removing an upgrade repository +*/ +YCPValue PkgFunctions::AddRemoveUpgradeRepo(const YCPInteger &repo, bool add) +{ + if (repo.isNull()) + { + y2error("Passed nil paramter"); + _last_error.setLastError("Used 'nil' repository ID for upgrade"); + return YCPBoolean(false); + } + + long long repo_id = repo->value(); + YRepo_Ptr r = logFindRepository(repo_id); + if (!r) + { + y2error("Invalid repository ID %lld", repo_id); + _last_error.setLastError("Invalid repository ID " + repo->toString()); + return YCPBoolean(false); + } + + zypp::Repository repository(zypp::ResPool::instance().reposFind(r->repoInfo().alias())); + + if (repository == zypp::Repository::noRepository) + { + y2error("Invalid repository ID %lld", repo_id); + _last_error.setLastError("Invalid repository ID " + repo->toString()); + return YCPBoolean(false); + } + + if (add) + { + y2milestone("Adding upgrade repo %lld", repo_id); + zypp_ptr()->resolver()->addUpgradeRepo(repository); + } + else + { + y2milestone("Removing upgrade repo %lld", repo_id); + zypp_ptr()->resolver()->removeUpgradeRepo(repository); + } + + return YCPBoolean(true); +} + +/** + @builtin AddUpgradeRepo + + @short Add upgrade repository for distribution upgrade + @return boolean true on success +*/ +YCPValue PkgFunctions::AddUpgradeRepo(const YCPInteger &repo) +{ + return AddRemoveUpgradeRepo(repo, true); +} + +/** + @builtin RemoveUpgradeRepo + + @short Remove a repository from upgrade list + @return boolean true on success +*/ +YCPValue PkgFunctions::RemoveUpgradeRepo(const YCPInteger &repo) +{ + return AddRemoveUpgradeRepo(repo, false); +} + +/** + @builtin GetUpgradeRepos + + @short Get list of current upgrade repositories + @return list<integer> all current upgrade repositories +*/ +YCPValue PkgFunctions::GetUpgradeRepos() +{ + YCPList ret; + + unsigned long index = 0; + for_(it, repos.begin(), repos.end()) + { + if (!(*it)->isDeleted()) + { + zypp::Repository repository(zypp::ResPool::instance().reposFind((*it)->repoInfo().alias())); + if (zypp_ptr()->resolver()->upgradingRepo(repository)) + { + ret->add(YCPInteger(index)); + } + } + index++; + } + + std::string result(ret->toString()); + y2milestone("Current upgrade repos: %s", result.c_str()); + return ret; +} + /** @builtin GetBackupPath diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/PkgFunctions.cc new/yast2-pkg-bindings-2.21.3/src/PkgFunctions.cc --- old/yast2-pkg-bindings-2.20.3/src/PkgFunctions.cc 2009-04-29 12:58:11.000000000 +0200 +++ new/yast2-pkg-bindings-2.21.3/src/PkgFunctions.cc 2011-06-16 10:18:23.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: PkgFunctions.cc 57028 2009-04-29 10:58:09Z lslezak $ + File: $Id: PkgFunctions.cc 64337 2011-06-14 11:34:05Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Functions related to error handling Namespace: Pkg @@ -35,6 +35,8 @@ #include <ycp/YCPBoolean.h> #include <ycp/YCPMap.h> #include <ycp/YCPVoid.h> +#include <ycp/YCPSymbol.h> +#include <ycp/YCPList.h> #include <zypp/ZYppFactory.h> @@ -59,6 +61,7 @@ _target_root( "/" ) , _target_loaded(false) , zypp_pointer(NULL) + , commit_policy(NULL) ,_callbackHandler( *new CallbackHandler(*this) ) , base_product(NULL) { @@ -274,3 +277,105 @@ last_reported_repo = repo; last_reported_mediumnr = medium; } + +/** + * @builtin ZConfig + * @short get the current libzypp configuration + * @return map<string,any> libzypp configuration map + */ +YCPValue PkgFunctions::ZConfig() +{ + zypp::ZConfig &zconfig = zypp::ZConfig::instance(); + + YCPMap ret; + + ret->add(YCPString("repo_cache_path"), YCPString(zconfig.repoCachePath().asString())); + ret->add(YCPString("repo_metadata_path"), YCPString(zconfig.repoMetadataPath().asString())); + ret->add(YCPString("repo_solv_files_path"), YCPString(zconfig.repoSolvfilesPath().asString())); + ret->add(YCPString("repo_packages_path"), YCPString(zconfig.repoPackagesPath().asString())); + + ret->add(YCPString("config_path"), YCPString(zconfig.configPath().asString())); + + ret->add(YCPString("known_repos_path"), YCPString(zconfig.knownReposPath().asString())); + ret->add(YCPString("known_services_path"), YCPString(zconfig.knownServicesPath().asString())); + + ret->add(YCPString("repo_add_probe"), YCPBoolean(zconfig.repo_add_probe())); + ret->add(YCPString("repo_refresh_delay"), YCPInteger(zconfig.repo_refresh_delay())); + ret->add(YCPString("repo_label_is_alias"), YCPBoolean(zconfig.repoLabelIsAlias())); + + ret->add(YCPString("download_max_concurrent_connections"), YCPInteger(zconfig.download_max_concurrent_connections())); + ret->add(YCPString("download_min_download_speed"), YCPInteger(zconfig.download_min_download_speed())); + ret->add(YCPString("download_max_download_speed"), YCPInteger(zconfig.download_max_download_speed())); + ret->add(YCPString("download_max_silent_tries"), YCPInteger(zconfig.download_max_silent_tries())); + ret->add(YCPString("download_use_deltarpm"), YCPBoolean(zconfig.download_use_deltarpm())); + ret->add(YCPString("download_use_deltarpm_always"), YCPBoolean(zconfig.download_use_deltarpm_always())); + ret->add(YCPString("download_media_prefer_download"), YCPBoolean(zconfig.download_media_prefer_download())); + ret->add(YCPString("download_media_prefer_volatile"), YCPBoolean(zconfig.download_media_prefer_volatile())); + + const char* dmode; + zypp::DownloadMode dm = zconfig.commit_downloadMode(); + + if (dm == zypp::DownloadDefault) dmode = "default"; + else if (dm == zypp::DownloadInAdvance) dmode = "download_in_advance"; + else if (dm == zypp::DownloadAsNeeded) dmode = "download_as_needed"; + else if (dm == zypp::DownloadInHeaps) dmode = "download_in_heaps"; + else if (dm == zypp::DownloadOnly) dmode = "download_only"; + else dmode = "unknown"; + + ret->add(YCPString("download_mode"), YCPSymbol(dmode)); + + ret->add(YCPString("system_root"), YCPString(zconfig.systemRoot().asString())); + ret->add(YCPString("system_architecture"), YCPString(zconfig.systemArchitecture().asString())); + ret->add(YCPString("system_default_architecture"), YCPString(zconfig.defaultSystemArchitecture().asString())); + + ret->add(YCPString("text_locale_default"), YCPString(zconfig.defaultTextLocale().code())); + ret->add(YCPString("text_locale"), YCPString(zconfig.textLocale().code())); + + ret->add(YCPString("vendor_path"), YCPString(zconfig.vendorPath().asString())); + + ret->add(YCPString("solver_only_requires"), YCPBoolean(zconfig.solver_onlyRequires())); + ret->add(YCPString("solver_allow_vendor_change"), YCPBoolean(zconfig.solver_allowVendorChange())); + ret->add(YCPString("solver_cleandeps_on_remove"), YCPBoolean(zconfig.solver_cleandepsOnRemove())); + ret->add(YCPString("solver_upgrade_testcases_to_keep"), YCPBoolean(zconfig.solver_upgradeTestcasesToKeep())); + ret->add(YCPString("solver_upgrade_remove_dropped_packages"), YCPBoolean(zconfig.solverUpgradeRemoveDroppedPackages())); + ret->add(YCPString("solver_check_system_file"), YCPString(zconfig.solver_checkSystemFile().asString())); + + ret->add(YCPString("locks_file"), YCPString(zconfig.locksFile().asString())); + ret->add(YCPString("locks_file_apply"), YCPBoolean(zconfig.apply_locks_file())); + + ret->add(YCPString("update_data_path"), YCPString(zconfig.update_dataPath().asString())); + ret->add(YCPString("update_messages_path"), YCPString(zconfig.update_messagesPath().asString())); + ret->add(YCPString("update_scripts_path"), YCPString(zconfig.update_scriptsPath().asString())); + ret->add(YCPString("update_messages_notify"), YCPString(zconfig.updateMessagesNotify())); + + YCPList rpm_flags; + zypp::target::rpm::RpmInstFlags flags = zconfig.rpmInstallFlags(); + + if (flags.testFlag(zypp::target::rpm::RPMINST_EXCLUDEDOCS)) rpm_flags->add(YCPString("--excludedocs")); + if (flags.testFlag(zypp::target::rpm::RPMINST_NOSCRIPTS)) rpm_flags->add(YCPString("--noscripts")); + if (flags.testFlag(zypp::target::rpm::RPMINST_FORCE)) rpm_flags->add(YCPString("--force")); + if (flags.testFlag(zypp::target::rpm::RPMINST_IGNORESIZE)) rpm_flags->add(YCPString("--ignoresize")); + if (flags.testFlag(zypp::target::rpm::RPMINST_JUSTDB)) rpm_flags->add(YCPString("--justdb")); + if (flags.testFlag(zypp::target::rpm::RPMINST_NODEPS)) rpm_flags->add(YCPString("--nodeps")); + if (flags.testFlag(zypp::target::rpm::RPMINST_NODIGEST)) rpm_flags->add(YCPString("--nodigest")); + if (flags.testFlag(zypp::target::rpm::RPMINST_NOSIGNATURE)) rpm_flags->add(YCPString("--nosignature")); + if (flags.testFlag(zypp::target::rpm::RPMINST_TEST)) rpm_flags->add(YCPString("--test")); + + if (flags.testFlag(zypp::target::rpm::RPMINST_NOUPGRADE)) + rpm_flags->add(YCPString("-i")); + else + rpm_flags->add(YCPString("-U")); + + ret->add(YCPString("rpm_install_flags"), rpm_flags); + + ret->add(YCPString("history_log_file"), YCPString(zconfig.historyLogFile().asString())); + + ret->add(YCPString("credentials_global_dir"), YCPString(zconfig.credentialsGlobalDir().asString())); + ret->add(YCPString("credentials_global_file"), YCPString(zconfig.credentialsGlobalFile().asString())); + + ret->add(YCPString("plugins_path"), YCPString(zconfig.pluginsPath().asString())); + + ret->add(YCPString("distro_version_pkg"), YCPString(zconfig.distroverpkg())); + + return ret; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/PkgFunctions.h new/yast2-pkg-bindings-2.21.3/src/PkgFunctions.h --- old/yast2-pkg-bindings-2.20.3/src/PkgFunctions.h 2010-11-02 15:41:55.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/src/PkgFunctions.h 2011-06-23 11:19:44.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: PkgFunctions.h 62715 2010-11-02 14:41:55Z lslezak $ + File: $Id: PkgFunctions.h 64508 2011-06-21 14:56:55Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Handles Pkg::function (list_of_arguments) calls Namespace: Pkg @@ -49,6 +49,7 @@ #include <zypp/RepoManager.h> #include <zypp/ProgressData.h> #include <zypp/TmpPath.h> +#include <zypp/ZYppCommitPolicy.h> #include <YRepo.h> #include <i18n.h> @@ -134,9 +135,8 @@ // helper - copy a file or directory bool CopyToDir(const std::string &source, const std::string &target, bool backup = false, bool recursive = true); - void RemoveResolvablesFrom(const std::string &alias); - bool AnyResolvableFrom(const std::string &alias); - bool LoadResolvablesFrom(const zypp::RepoInfo &repoinfo, const zypp::ProgressData::ReceiverFnc & progressrcv = zypp::ProgressData::ReceiverFnc(), bool network_check = false); + void RemoveResolvablesFrom(YRepo_Ptr repo); + bool LoadResolvablesFrom(YRepo_Ptr repo, const zypp::ProgressData::ReceiverFnc & progressrcv = zypp::ProgressData::ReceiverFnc(), bool network_check = false); std::string UniqueAlias(const std::string &alias); YCPValue GetPkgLocation(const YCPString& p, bool full_path); @@ -195,6 +195,9 @@ YCPMap Resolvable2YCPMap(const zypp::PoolItem &item, const std::string &req_kind, bool dependencies); + // CommitPolicy used for commit + zypp::ZYppCommitPolicy *commit_policy; + private: /** @@ -228,6 +231,10 @@ YCPValue SourceProvideFileCommon(const YCPInteger &id, const YCPInteger &mid, const YCPString& f, const bool optional, const bool check_signatures, const bool digested); + + // a helper function to add or remove an upgrade repository + YCPValue AddRemoveUpgradeRepo(const YCPInteger &repo, bool add); + public: // general /* TYPEINFO: void() */ @@ -705,8 +712,19 @@ YCPBoolean PkgSolveCheckTargetOnly (); /* TYPEINFO: integer()*/ YCPValue PkgSolveErrors (); + YCPValue CommitHelper(const zypp::ZYppCommitPolicy *policy); /* TYPEINFO: list<any>(integer)*/ YCPValue PkgCommit (const YCPInteger& medianr); + /* TYPEINFO: list<any>(map<string,any>)*/ + YCPValue Commit (const YCPMap& config); + /* TYPEINFO: map<string,any>()*/ + YCPValue CommitPolicy(); + /* TYPEINFO: boolean(integer)*/ + YCPValue AddUpgradeRepo(const YCPInteger &repo); + /* TYPEINFO: list<integer>()*/ + YCPValue GetUpgradeRepos(); + /* TYPEINFO: boolean(integer)*/ + YCPValue RemoveUpgradeRepo(const YCPInteger &repo); /* TYPEINFO: boolean(map<string,any>)*/ YCPValue AddLock(const YCPMap &lock); @@ -823,6 +841,9 @@ /* TYPEINFO: boolean(string)*/ YCPValue ServiceSave(const YCPString &alias); + // configuration related functions + /* TYPEINFO: map<string,any>()*/ + YCPValue ZConfig(); YCPValue ResolvablePropertiesEx(const YCPString& name, const YCPSymbol& kind_r, const YCPString& version, bool dependencies); YCPValue ResolvableSetPatches(const YCPSymbol& kind_r, bool preselect); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/Resolvable_Properties.cc new/yast2-pkg-bindings-2.21.3/src/Resolvable_Properties.cc --- old/yast2-pkg-bindings-2.20.3/src/Resolvable_Properties.cc 2010-01-18 16:31:02.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/src/Resolvable_Properties.cc 2011-06-16 10:18:23.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: Resolvable_Properties.cc 60435 2010-01-18 15:31:01Z lslezak $ + File: $Id: Resolvable_Properties.cc 64337 2011-06-14 11:34:05Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Resolvable properties Namespace: Pkg @@ -91,7 +91,8 @@ + "description" + "display_name" + "short_name" - + "product_file" -> string : product file (full file name with target root prefix) + + "product_file" -> string : product file (full file name with target root prefix) (only for installed products) + + "product_package" -> string : package name providing the product (only for available products) + "upgrades" -> list<map> : parsed data from the product file (upgrades section) + "name" -> string + "summary" -> string @@ -420,6 +421,8 @@ if (refpkg) { + info->add(YCPString("product_package"), YCPString(refpkg->name())); + // get the package files zypp::Package::FileList files( refpkg->filelist() ); y2milestone("The reference package has %d files", files.size()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/Source_Create.cc new/yast2-pkg-bindings-2.21.3/src/Source_Create.cc --- old/yast2-pkg-bindings-2.20.3/src/Source_Create.cc 2010-09-30 19:45:18.000000000 +0200 +++ new/yast2-pkg-bindings-2.21.3/src/Source_Create.cc 2011-04-05 13:33:29.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: Source_Create.cc 62519 2010-09-30 17:45:17Z lslezak $ + File: $Id: Source_Create.cc 63716 2011-04-05 11:33:32Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Functions related to repository registration Namespace: Pkg @@ -684,7 +684,7 @@ YRepo_Ptr repo = logFindRepository(*it); // no detailed progress needed, refresh has been done in createManagedSource() - LoadResolvablesFrom(repo->repoInfo(), subprogrcv2); + LoadResolvablesFrom(repo, subprogrcv2); // search for a base product if it hasn't been set if (base && !base_product) @@ -720,7 +720,7 @@ YRepo_Ptr repo = logFindRepository(new_id); // load the resolvables - LoadResolvablesFrom(repo->repoInfo(), subprogrcv_load); + LoadResolvablesFrom(repo, subprogrcv_load); if (base && !base_product) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/Source_Load.cc new/yast2-pkg-bindings-2.21.3/src/Source_Load.cc --- old/yast2-pkg-bindings-2.20.3/src/Source_Load.cc 2010-10-25 09:15:13.000000000 +0200 +++ new/yast2-pkg-bindings-2.21.3/src/Source_Load.cc 2011-06-23 14:12:23.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: Source_Load.cc 62668 2010-10-22 07:05:35Z lslezak $ + File: $Id: Source_Load.cc 64562 2011-06-23 12:12:27Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Functions for initializing the package manager Namespace: Pkg @@ -267,7 +267,7 @@ prog.sendTo(refresh_subprogress); y2debug("Progress status: %lld", prog_total.val()); - if (AnyResolvableFrom((*it)->repoInfo().alias())) + if ((*it)->isLoaded()) { y2milestone("Resolvables from '%s' are already present, not loading", (*it)->repoInfo().alias().c_str()); } @@ -293,6 +293,13 @@ try { + if (!refresh_started_called) + { + // call the init callback + CallRefreshStarted(); + refresh_started_called = true; + } + zypp::RepoManager::RefreshCheckStatus ref_stat = repomanager.checkIfToRefreshMetadata((*it)->repoInfo(), *((*it)->repoInfo().baseUrlsBegin())); if (ref_stat != zypp::RepoManager::REFRESH_NEEDED) @@ -303,12 +310,6 @@ y2milestone("Autorefreshing source: %s", (*it)->repoInfo().alias().c_str()); // refresh the repository - if (!refresh_started_called) - { - // call the init callback - CallRefreshStarted(); - refresh_started_called = true; - } RefreshWithCallbacks((*it)->repoInfo(), prog.receiver()); } // NOTE: subtask progresses are reported as done in the destructor @@ -362,7 +363,7 @@ prog.sendTo(rebuild_subprogress); y2debug("Progress status: %lld", prog_total.val()); - if (AnyResolvableFrom((*it)->repoInfo().alias())) + if ((*it)->isLoaded()) { y2milestone("Resolvables from '%s' are already present, not rebuilding the cache", (*it)->repoInfo().alias().c_str()); } @@ -447,14 +448,14 @@ // subtask zypp::CombinedProgressData load_subprogress(prog_total, 100); - if (AnyResolvableFrom((*it)->repoInfo().alias())) + if ((*it)->isLoaded()) { y2milestone("Resolvables from '%s' are already present, not loading", (*it)->repoInfo().alias().c_str()); } else { // load objects, do network status check - success = LoadResolvablesFrom((*it)->repoInfo(), load_subprogress, true) && success; + success = LoadResolvablesFrom(*it, load_subprogress, true) && success; } } y2debug("Progress status: %lld", prog_total.val()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/Source_Resolvables.cc new/yast2-pkg-bindings-2.21.3/src/Source_Resolvables.cc --- old/yast2-pkg-bindings-2.20.3/src/Source_Resolvables.cc 2009-04-29 08:51:26.000000000 +0200 +++ new/yast2-pkg-bindings-2.21.3/src/Source_Resolvables.cc 2011-04-05 13:33:29.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: Source_Resolvables.cc 57016 2009-04-29 06:51:26Z lslezak $ + File: $Id: Source_Resolvables.cc 63716 2011-04-05 11:33:32Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Functions for adding/removing resolvables in the pool Namespace: Pkg @@ -40,32 +40,28 @@ /* * A helper function - remove all resolvables from the repository from the pool */ -void PkgFunctions::RemoveResolvablesFrom(const std::string &alias) +void PkgFunctions::RemoveResolvablesFrom(YRepo_Ptr repo) { + const std::string &alias = repo->repoInfo().alias(); y2milestone("Removing resolvables from '%s'", alias.c_str()); // remove the resolvables if they have been loaded zypp::sat::Pool::instance().reposErase(alias); + + repo->resetLoaded(); } /* - * A helper function - is there any resolvable from the repository in the pool? + * A helper function - load resolvable from the repository into the pool */ -bool PkgFunctions::AnyResolvableFrom(const std::string &alias) +bool PkgFunctions::LoadResolvablesFrom(YRepo_Ptr repo, const zypp::ProgressData::ReceiverFnc &progressrcv, bool network_check) { - zypp::Repository r = zypp::sat::Pool::instance().reposFind(alias); - if ( r != zypp::Repository::noRepository ) + if (repo->isLoaded()) { - return ( r.solvablesSize() > 0 ); + y2milestone("Repository is already loaded"); + return true; } - return false; -} -/* - * A helper function - load resolvable from the repository into the pool - * Warning: Use AnyResolvableFrom() method for checing if the resolvables might be already loaded - */ -bool PkgFunctions::LoadResolvablesFrom(const zypp::RepoInfo &repoinfo, const zypp::ProgressData::ReceiverFnc &progressrcv, bool network_check) -{ + const zypp::RepoInfo &repoinfo = repo->repoInfo(); bool success = true; unsigned int size_start = zypp_ptr()->pool().size(); y2milestone("Loading resolvables from '%s', pool size at start: %d", repoinfo.alias().c_str(), size_start); @@ -119,6 +115,7 @@ } repomanager.loadFromCache(repoinfo); + repo->setLoaded(); //y2milestone("Loaded %zd resolvables", store.size()); } catch(const zypp::repo::RepoNotCachedException &excpt ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/Source_Save.cc new/yast2-pkg-bindings-2.21.3/src/Source_Save.cc --- old/yast2-pkg-bindings-2.20.3/src/Source_Save.cc 2009-01-06 12:43:33.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/src/Source_Save.cc 2011-04-05 13:33:29.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: Source_Save.cc 54392 2009-01-06 11:43:32Z lslezak $ + File: $Id: Source_Save.cc 63716 2011-04-05 11:33:32Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Functions for saving repository configuration Namespace: Pkg @@ -258,7 +258,7 @@ for (RepoCont::iterator it = repos.begin(); it != repos.end(); ++it) { - RemoveResolvablesFrom((*it)->repoInfo().alias()); + RemoveResolvablesFrom(*it); } // release all repositories diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/Source_Set.cc new/yast2-pkg-bindings-2.21.3/src/Source_Set.cc --- old/yast2-pkg-bindings-2.20.3/src/Source_Set.cc 2009-01-06 12:43:33.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/src/Source_Set.cc 2011-04-05 13:33:29.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: Source_Set.cc 54392 2009-01-06 11:43:32Z lslezak $ + File: $Id: Source_Set.cc 63716 2011-04-05 11:33:32Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: Functions for changing properties of a repository Namespace: Pkg @@ -69,8 +69,8 @@ // add/remove resolvables if (enable) { - // load resolvables only when they are missing - if (!AnyResolvableFrom(repo->repoInfo().alias())) + // load resolvables only when they haven't been loaded yet + if (!repo->isLoaded()) { std::list<std::string> stages; stages.push_back(_("Load Data")); @@ -82,13 +82,13 @@ pkgprogress.Start(_("Loading the Package Manager..."), stages, _(HelpTexts::load_resolvables)); - success = LoadResolvablesFrom(repo->repoInfo(), load_subprogress); + success = LoadResolvablesFrom(repo, load_subprogress); } } else { // the source has been disabled, remove resolvables from the pool - RemoveResolvablesFrom(repo->repoInfo().alias()); + RemoveResolvablesFrom(repo); } PkgFreshen(); @@ -399,7 +399,7 @@ { // the resolvables cannot be used anymore, remove them - RemoveResolvablesFrom(repo_alias); + RemoveResolvablesFrom(repo); // update 'repos' repo->setDeleted(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/YRepo.cc new/yast2-pkg-bindings-2.21.3/src/YRepo.cc --- old/yast2-pkg-bindings-2.20.3/src/YRepo.cc 2009-04-29 12:58:11.000000000 +0200 +++ new/yast2-pkg-bindings-2.21.3/src/YRepo.cc 2011-04-05 13:33:29.000000000 +0200 @@ -19,7 +19,7 @@ */ /* - File: $Id: YRepo.cc 57028 2009-04-29 10:58:09Z lslezak $ + File: $Id: YRepo.cc 63716 2011-04-05 11:33:32Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: YRepo class is a Yast representaion of a repository */ @@ -32,7 +32,7 @@ IMPL_PTR_TYPE(YRepo); YRepo::YRepo(zypp::RepoInfo & repo) - : _repo(repo), _deleted(false) + : _repo(repo), _deleted(false), _loaded(false) {} YRepo::~YRepo() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/src/YRepo.h new/yast2-pkg-bindings-2.21.3/src/YRepo.h --- old/yast2-pkg-bindings-2.20.3/src/YRepo.h 2009-04-29 12:58:11.000000000 +0200 +++ new/yast2-pkg-bindings-2.21.3/src/YRepo.h 2011-04-05 13:33:29.000000000 +0200 @@ -20,7 +20,7 @@ */ /* - File: $Id: YRepo.h 57028 2009-04-29 10:58:09Z lslezak $ + File: $Id: YRepo.h 63716 2011-04-05 11:33:32Z lslezak $ Author: Ladislav Slezák <[email protected]> Summary: YRepo class is a Yast representaion of a repository */ @@ -39,6 +39,7 @@ zypp::RepoInfo _repo; zypp::MediaSetAccess_Ptr _maccess; bool _deleted; + bool _loaded; YRepo() {} @@ -53,6 +54,10 @@ bool isDeleted() {return _deleted;} void setDeleted() {_deleted = true;} + bool isLoaded() {return _loaded;} + void setLoaded() {_loaded = true;} + void resetLoaded() {_loaded = false;} + public: static const YRepo NOREPO; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pkg-bindings-2.20.3/VERSION new/yast2-pkg-bindings-2.21.3/VERSION --- old/yast2-pkg-bindings-2.20.3/VERSION 2010-11-02 15:30:14.000000000 +0100 +++ new/yast2-pkg-bindings-2.21.3/VERSION 2011-06-23 14:12:14.000000000 +0200 @@ -1 +1 @@ -2.20.3 +2.21.3 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
