Hello community,
here is the log from the commit of package yast2-pkg-bindings for openSUSE:Factory
checked in at Wed Apr 1 17:31:04 CEST 2009.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2009-01-28 14:29:31.000000000 +0100
+++ yast2-pkg-bindings/yast2-pkg-bindings.changes 2009-03-30 17:00:47.845596000 +0200
@@ -1,0 +2,27 @@
+Mon Mar 30 16:24:58 CEST 2009 - lslezak@suse.cz
+
+- return "is_update_repo" flag in Pkg::SourceGeneralData() call
+ (requires loaded pool) (bnc#459527)
+- use zypp::RepoManager::makeStupidAlias() for generating
+ repository alias
+- 2.18.3
+
+-------------------------------------------------------------------
+Wed Mar 25 16:55:36 CET 2009 - lslezak@suse.cz
+
+- Fixed Pkg::SourceURL() - remove "credentials" query from URL
+ after obtaining the credentials from CredentialManager
+
+-------------------------------------------------------------------
+Fri Mar 20 15:04:10 CET 2009 - lslezak@suse.cz
+
+- Fixed Pkg::SourceURL() - read username and password using
+ CredentialManager (FATE#303652)
+
+-------------------------------------------------------------------
+Fri Feb 20 13:16:39 CET 2009 - ma@suse.de
+
+- Removed fragile test for service being modified. Leave it up to libzypp
+ to decide wich actions must be performed when saving a service. (bnc#476418)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-pkg-bindings-2.18.2.tar.bz2
New:
----
yast2-pkg-bindings-2.18.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.Zm8054/_old 2009-04-01 17:26:02.000000000 +0200
+++ /var/tmp/diff_new_pack.Zm8054/_new 2009-04-01 17:26:02.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings-devel-doc (Version 2.18.2)
+# spec file for package yast2-pkg-bindings-devel-doc (Version 2.18.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 2.18.2
+Version: 2.18.3
Release: 1
License: GPL v2 or later
Group: Documentation/HTML
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.18.2.tar.bz2
+Source0: yast2-pkg-bindings-2.18.3.tar.bz2
Prefix: %_prefix
# same as in the main package (because we use the same configure.in.in)
BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen gcc-c++ libgcrypt-devel libxcrypt-devel libxslt libzypp-devel perl-XML-Writer sgml-skel yast2-core-devel yast2-devtools
@@ -45,7 +45,7 @@
Ladislav Slez�k
%prep
-%setup -n yast2-pkg-bindings-2.18.2
+%setup -n yast2-pkg-bindings-2.18.3
# build only documentation, ignore all other directories
echo "doc" > SUBDIRS
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.Zm8054/_old 2009-04-01 17:26:03.000000000 +0200
+++ /var/tmp/diff_new_pack.Zm8054/_new 2009-04-01 17:26:03.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.18.2)
+# spec file for package yast2-pkg-bindings (Version 2.18.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-pkg-bindings
-Version: 2.18.2
+Version: 2.18.3
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.18.2.tar.bz2
+Source0: yast2-pkg-bindings-2.18.3.tar.bz2
Prefix: /usr
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 >= 5.24.7
@@ -47,7 +47,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.18.2
+%setup -n yast2-pkg-bindings-2.18.3
# build only the library, ignore documentation (it is in devel-doc package)
echo "src" > SUBDIRS
@@ -79,6 +79,21 @@
%{_libdir}/YaST2/plugin/libpy2Pkg.so
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog
+* Mon Mar 30 2009 lslezak@suse.cz
+- return "is_update_repo" flag in Pkg::SourceGeneralData() call
+ (requires loaded pool) (bnc#459527)
+- use zypp::RepoManager::makeStupidAlias() for generating
+ repository alias
+- 2.18.3
+* Wed Mar 25 2009 lslezak@suse.cz
+- Fixed Pkg::SourceURL() - remove "credentials" query from URL
+ after obtaining the credentials from CredentialManager
+* Fri Mar 20 2009 lslezak@suse.cz
+- Fixed Pkg::SourceURL() - read username and password using
+ CredentialManager (FATE#303652)
+* Fri Feb 20 2009 ma@suse.de
+- Removed fragile test for service being modified. Leave it up to libzypp
+ to decide wich actions must be performed when saving a service. (bnc#476418)
* Wed Jan 28 2009 lslezak@suse.cz
- Fixed Pkg::SetSolverFlags() function - properly set
"ignoreAlreadyRecommended" flag, do not select extra packages for
@@ -1432,7 +1447,7 @@
- Removed obsolete 'TargetUpdateInf'. That's old YaST(1)
stuff.
- 2.12.6
-* Wed Aug 03 2005 ma@suse.de
+* Thu Aug 04 2005 ma@suse.de
- Added YCP {Start,Error,Done}SourceRefresh callbacks.
- 2.12.5
* Wed Jul 27 2005 ma@suse.de
++++++ yast2-pkg-bindings-2.18.2.tar.bz2 -> yast2-pkg-bindings-2.18.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.18.2/configure new/yast2-pkg-bindings-2.18.3/configure
--- old/yast2-pkg-bindings-2.18.2/configure 2009-01-28 14:27:57.000000000 +0100
+++ new/yast2-pkg-bindings-2.18.3/configure 2009-03-30 16:54:03.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-pkg-bindings 2.18.2.
+# Generated by GNU Autoconf 2.63 for yast2-pkg-bindings 2.18.3.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -745,8 +745,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-pkg-bindings'
PACKAGE_TARNAME='yast2-pkg-bindings'
-PACKAGE_VERSION='2.18.2'
-PACKAGE_STRING='yast2-pkg-bindings 2.18.2'
+PACKAGE_VERSION='2.18.3'
+PACKAGE_STRING='yast2-pkg-bindings 2.18.3'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1536,7 +1536,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-pkg-bindings 2.18.2 to adapt to many kinds of systems.
+\`configure' configures yast2-pkg-bindings 2.18.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1608,7 +1608,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-pkg-bindings 2.18.2:";;
+ short | recursive ) echo "Configuration of yast2-pkg-bindings 2.18.3:";;
esac
cat <<\_ACEOF
@@ -1720,7 +1720,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-pkg-bindings configure 2.18.2
+yast2-pkg-bindings configure 2.18.3
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1734,7 +1734,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-pkg-bindings $as_me 2.18.2, which was
+It was created by yast2-pkg-bindings $as_me 2.18.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2581,7 +2581,7 @@
# Define the identity of the package.
PACKAGE='yast2-pkg-bindings'
- VERSION='2.18.2'
+ VERSION='2.18.3'
cat >>confdefs.h <<_ACEOF
@@ -2805,7 +2805,7 @@
-VERSION="2.18.2"
+VERSION="2.18.3"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
@@ -17209,7 +17209,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-pkg-bindings $as_me 2.18.2, which was
+This file was extended by yast2-pkg-bindings $as_me 2.18.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17272,7 +17272,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-pkg-bindings config.status 2.18.2
+yast2-pkg-bindings config.status 2.18.3
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.18.2/configure.in new/yast2-pkg-bindings-2.18.3/configure.in
--- old/yast2-pkg-bindings-2.18.2/configure.in 2009-01-28 14:27:44.000000000 +0100
+++ new/yast2-pkg-bindings-2.18.3/configure.in 2009-03-30 16:53:47.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.18.2, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.18.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.18.2"
+VERSION="2.18.3"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.18.2/src/Locks.cc new/yast2-pkg-bindings-2.18.3/src/Locks.cc
--- old/yast2-pkg-bindings-2.18.2/src/Locks.cc 2008-05-16 08:27:49.000000000 +0200
+++ new/yast2-pkg-bindings-2.18.3/src/Locks.cc 2009-03-06 14:33:51.000000000 +0100
@@ -71,8 +71,8 @@
{
for_(map_it, lock.begin(), lock.end())
{
- YCPValue key(map_it.key());
- YCPValue val(map_it.value());
+ YCPValue key(map_it->first);
+ YCPValue val(map_it->second);
if (key.isNull())
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.18.2/src/ServiceManager.cc new/yast2-pkg-bindings-2.18.3/src/ServiceManager.cc
--- old/yast2-pkg-bindings-2.18.2/src/ServiceManager.cc 2008-10-17 14:09:29.000000000 +0200
+++ new/yast2-pkg-bindings-2.18.3/src/ServiceManager.cc 2009-02-24 13:30:45.000000000 +0100
@@ -285,34 +285,21 @@
DBG << "Known Service: " << s_known << std::endl;
DBG << "Stored Service: " << s_stored << std::endl;
- bool modified = (s_stored.url() != s_known.url()
- || s_stored.name() != s_known.name()
- || s_stored.enabled() != s_known.enabled()
- || s_stored.autorefresh() != s_known.autorefresh()
- );
+ std::string orig_alias(s_known.origAlias());
- if (modified)
- {
- std::string orig_alias(s_known.origAlias());
-
- y2internal("orig_alias: %s", orig_alias.c_str());
+ y2internal("orig_alias: %s", orig_alias.c_str());
- // the old alias is empty for new services
- if (orig_alias.empty())
- {
- y2milestone("Adding new service %s", alias.c_str());
- // add the service
- repomgr.addService(s_known);
- }
- else
- {
- y2milestone("Saving service %s", alias.c_str());
- // use the old alias
- repomgr.modifyService(orig_alias, s_known);
- }
+ // the old alias is empty for new services
+ if (orig_alias.empty())
+ {
+ y2milestone("Adding new service %s", alias.c_str());
+ // add the service
+ repomgr.addService(s_known);
}
else
{
- y2milestone("Service %s has not been modified, not saving", alias.c_str());
+ y2milestone("Saving service %s", alias.c_str());
+ // use the old alias
+ repomgr.modifyService(orig_alias, s_known);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.18.2/src/Source_Create.cc new/yast2-pkg-bindings-2.18.3/src/Source_Create.cc
--- old/yast2-pkg-bindings-2.18.2/src/Source_Create.cc 2009-01-06 12:43:33.000000000 +0100
+++ new/yast2-pkg-bindings-2.18.3/src/Source_Create.cc 2009-03-30 16:53:44.000000000 +0200
@@ -19,7 +19,7 @@
*/
/*
- File: $Id: Source_Create.cc 54392 2009-01-06 11:43:32Z lslezak $
+ File: $Id: Source_Create.cc 56469 2009-03-30 14:53:43Z lslezak $
Author: Ladislav Slezák
Summary: Functions related to repository registration
Namespace: Pkg
@@ -237,40 +237,9 @@
// alias not set via URL, use the passed alias or the URL path
if (alias_r.empty())
{
- // use the last path element in URL
- std::string url_path = url.getPathName();
+ alias = zypp::RepoManager::makeStupidAlias(url);
- std::string::size_type pos_begin = url_path.rfind("/");
- std::string::size_type pos_end = std::string::npos;
-
- // ignore the trailing slash
- if (pos_begin == url_path.size() - 1)
- {
- pos_begin = url_path.rfind("/", url_path.size() - 2);
-
- if (pos_begin != std::string::npos)
- {
- pos_end = url_path.size() - pos_begin - 2;
- }
- }
- else
- {
- pos_end = url_path.size() - pos_begin - 1;
- }
-
- // ignore the found slash character
- pos_begin++;
-
- alias = std::string(url_path, pos_begin, pos_end);
-
- y2milestone("Alias from URL path: %s", alias.c_str());
-
- // fallback
- if (alias.empty())
- {
- y2milestone("URL alias is empty using 'Repository'");
- alias = "Repository";
- }
+ y2milestone("Using alias: %s", alias.c_str());
}
else
{
@@ -390,33 +359,8 @@
repo.setAutorefresh(params->value(YCPString("autorefresh"))->asBoolean()->value());
}
- std::string alias;
-
- if (!params->value( YCPString("alias") ).isNull() && params->value(YCPString("alias"))->isString())
- {
- alias = params->value(YCPString("alias"))->asString()->value();
- }
-
- if (alias.empty())
- {
- alias = timestamp();
-
- // the alias must be unique
- alias = UniqueAlias(alias);
- }
- else
- {
- if (aliasExists(alias))
- {
- y2error("alias %s already exists", alias.c_str());
- return YCPVoid();
- }
- }
-
- repo.setAlias(alias);
-
// use the first base URL as a fallback name
- std::string first_url;
+ zypp::Url first_url;
if (!params->value( YCPString("base_urls") ).isNull() && params->value(YCPString("base_urls"))->isList())
{
@@ -457,7 +401,7 @@
if (index == 0)
{
- first_url = url.asString();
+ first_url = url;
}
repo.addBaseUrl(url);
@@ -469,6 +413,33 @@
return YCPVoid();
}
+ std::string alias;
+
+ if (!params->value( YCPString("alias") ).isNull() && params->value(YCPString("alias"))->isString())
+ {
+ alias = params->value(YCPString("alias"))->asString()->value();
+ }
+
+ if (alias.empty())
+ {
+ // generate an alias
+ alias = zypp::RepoManager::makeStupidAlias(first_url);
+
+ // the alias must be unique
+ alias = UniqueAlias(alias);
+ }
+ else
+ {
+ if (aliasExists(alias))
+ {
+ y2error("alias %s already exists", alias.c_str());
+ return YCPVoid();
+ }
+ }
+
+ repo.setAlias(alias);
+
+
// check name parameter
if (!params->value( YCPString("name") ).isNull() && params->value(YCPString("name"))->isString())
{
@@ -480,7 +451,7 @@
// then use the first URL as the name
if (repo.name().empty())
{
- repo.setName(first_url);
+ repo.setName(first_url.asString());
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.18.2/src/Source_Get.cc new/yast2-pkg-bindings-2.18.3/src/Source_Get.cc
--- old/yast2-pkg-bindings-2.18.2/src/Source_Get.cc 2008-11-12 15:37:48.000000000 +0100
+++ new/yast2-pkg-bindings-2.18.3/src/Source_Get.cc 2009-03-30 16:32:58.000000000 +0200
@@ -19,7 +19,7 @@
*/
/*
- File: $Id: Source_Get.cc 53211 2008-11-12 14:34:46Z lslezak $
+ File: $Id: Source_Get.cc 56467 2009-03-30 14:32:58Z lslezak $
Author: Ladislav Slezák
Summary: Functions for reading repository properties
Namespace: Pkg
@@ -30,6 +30,8 @@
#include "ycpTools.h"
#include
+#include
+#include
#include
#include
@@ -111,6 +113,7 @@
* "name" : YCPString,
* "service" : YCPString, (service to which the repo belongs, empty if there is no service assigned)
* "keeppackages" : YCPBoolean,
+ * "is_update_repo" : YCPBoolean, (true if this is an update repo - this requires loaded objects in pool otherwise the flag is not returned! The value is stored in repo metadata, not in .repo file!)
* ];
*
* </code>
@@ -158,6 +161,15 @@
data->add( YCPString("keeppackages"), YCPBoolean(repo->repoInfo().keepPackages()));
+ // add Repository data
+ zypp::Repository repository(zypp::ResPool::instance().reposFind(repo->repoInfo().alias()));
+
+ if (repository != zypp::Repository::noRepository)
+ {
+ y2debug("adding zypp::Repository info");
+ data->add( YCPString("is_update_repo"), YCPBoolean(repository.isUpdateRepo()));
+ }
+
return data;
}
@@ -176,15 +188,56 @@
if (!repo)
return YCPVoid();
- std::string url;
+ zypp::Url url;
if (repo->repoInfo().baseUrlsBegin() != repo->repoInfo().baseUrlsEnd())
{
// #186842
- url = repo->repoInfo().baseUrlsBegin()->asCompleteString();
+ url = *(repo->repoInfo().baseUrlsBegin());
+
+ // add authentication data if exist
+ zypp::media::CredentialManager cm;
+
+ zypp::media::AuthData_Ptr auth = cm.getCred(url);
+
+ if (auth)
+ {
+ y2milestone("Authentication data found, adding to URL...");
+
+ if (auth->valid())
+ {
+ if (!auth->username().empty())
+ {
+ y2debug("Adding username...");
+ url.setUsername(auth->username());
+ }
+
+ if (!auth->password().empty())
+ {
+ y2debug("Adding password...");
+ url.setPassword(auth->password());
+ }
+ }
+ else
+ {
+ y2warning("Invalid authentication data, returning URL without username and password");
+ }
+
+ // does the url contain credentials query?
+ zypp::url::ParamMap params = url.getQueryStringMap();
+ zypp::url::ParamMap::iterator map_it = params.find("credentials");
+
+ if (map_it != params.end())
+ {
+ y2milestone("Removing credentials query from URL");
+ params.erase(map_it);
+ url.setQueryStringMap(params);
+ }
+ }
+
}
- return YCPString(url);
+ return YCPString(url.asCompleteString());
}
/****************************************************************************************
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-pkg-bindings-2.18.2/VERSION new/yast2-pkg-bindings-2.18.3/VERSION
--- old/yast2-pkg-bindings-2.18.2/VERSION 2009-01-28 14:12:43.000000000 +0100
+++ new/yast2-pkg-bindings-2.18.3/VERSION 2009-03-30 16:26:17.000000000 +0200
@@ -1 +1 @@
-2.18.2
+2.18.3
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org