Hello community,
here is the log from the commit of package yast2-metapackage-handler
checked in at Thu Aug 30 22:28:56 CEST 2007.
--------
--- yast2-metapackage-handler/yast2-metapackage-handler.changes 2007-08-14 17:01:29.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-metapackage-handler/yast2-metapackage-handler.changes 2007-08-30 11:06:08.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Aug 30 11:01:27 CEST 2007 - mvidner@suse.cz
+
+- Do not add duplicate repositories (#300974). Also uses correct
+ name when adding repositories. This change breaks compatibility
+ with 10.2.
+- Fixed a failure when run as root (#305354).
+- Fixed bad appearance when using YMPs with no description or for
+ the wrong distribution.
+ (all by benji)
+- 0.6.0
+
+-------------------------------------------------------------------
Old:
----
yast2-metapackage-handler-0.5.3.tar.bz2
New:
----
yast2-metapackage-handler-0.6.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-metapackage-handler.spec ++++++
--- /var/tmp/diff_new_pack.b30788/_old 2007-08-30 22:28:04.000000000 +0200
+++ /var/tmp/diff_new_pack.b30788/_new 2007-08-30 22:28:04.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-metapackage-handler (Version 0.5.3)
+# spec file for package yast2-metapackage-handler (Version 0.6.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-metapackage-handler
URL: http://en.opensuse.org/Meta_Packages
-Version: 0.5.3
+Version: 0.6.0
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-metapackage-handler-0.5.3.tar.bz2
+Source0: yast2-metapackage-handler-0.6.0.tar.bz2
prefix: /usr
# should be required by devtools
BuildRequires: perl-XML-Writer pkgconfig
@@ -56,7 +56,7 @@
Benjamin Weber
%prep
-%setup -n yast2-metapackage-handler-0.5.3
+%setup -n yast2-metapackage-handler-0.6.0
%build
%{prefix}/bin/y2tool y2autoconf
@@ -103,6 +103,15 @@
%endif
%changelog
+* Thu Aug 30 2007 - mvidner@suse.cz
+- Do not add duplicate repositories (#300974). Also uses correct
+ name when adding repositories. This change breaks compatibility
+ with 10.2.
+- Fixed a failure when run as root (#305354).
+- Fixed bad appearance when using YMPs with no description or for
+ the wrong distribution.
+ (all by benji)
+- 0.6.0
* Tue Aug 14 2007 - jsuchome@suse.cz
- Merged proofread texts
- 0.5.3
++++++ yast2-metapackage-handler-0.5.3.tar.bz2 -> yast2-metapackage-handler-0.6.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/configure new/yast2-metapackage-handler-0.6.0/configure
--- old/yast2-metapackage-handler-0.5.3/configure 2007-08-14 16:55:44.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/configure 2007-08-30 13:01:38.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-metapackage-handler 0.5.3.
+# Generated by GNU Autoconf 2.60 for yast2-metapackage-handler 0.6.0.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-metapackage-handler'
PACKAGE_TARNAME='yast2-metapackage-handler'
-PACKAGE_VERSION='0.5.3'
-PACKAGE_STRING='yast2-metapackage-handler 0.5.3'
+PACKAGE_VERSION='0.6.0'
+PACKAGE_STRING='yast2-metapackage-handler 0.6.0'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1181,7 +1181,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-metapackage-handler 0.5.3 to adapt to many kinds of systems.
+\`configure' configures yast2-metapackage-handler 0.6.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1252,7 +1252,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-metapackage-handler 0.5.3:";;
+ short | recursive ) echo "Configuration of yast2-metapackage-handler 0.6.0:";;
esac
cat <<\_ACEOF
@@ -1330,7 +1330,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-metapackage-handler configure 0.5.3
+yast2-metapackage-handler configure 0.6.0
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1344,7 +1344,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-metapackage-handler $as_me 0.5.3, which was
+It was created by yast2-metapackage-handler $as_me 0.6.0, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2145,7 +2145,7 @@
# Define the identity of the package.
PACKAGE='yast2-metapackage-handler'
- VERSION='0.5.3'
+ VERSION='0.6.0'
cat >>confdefs.h <<_ACEOF
@@ -2372,7 +2372,7 @@
-VERSION="0.5.3"
+VERSION="0.6.0"
RPMNAME="yast2-metapackage-handler"
MAINTAINER="Martin Vidner "
@@ -3265,7 +3265,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-metapackage-handler $as_me 0.5.3, which was
+This file was extended by yast2-metapackage-handler $as_me 0.6.0, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3308,7 +3308,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-metapackage-handler config.status 0.5.3
+yast2-metapackage-handler config.status 0.6.0
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/configure.in new/yast2-metapackage-handler-0.6.0/configure.in
--- old/yast2-metapackage-handler-0.5.3/configure.in 2007-08-14 16:55:40.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/configure.in 2007-08-30 13:01:28.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-metapackage-handler
dnl
-dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.15.8 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-metapackage-handler, 0.5.3, http://bugs.opensuse.org/, yast2-metapackage-handler)
+AC_INIT(yast2-metapackage-handler, 0.6.0, http://bugs.opensuse.org/, yast2-metapackage-handler)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="0.5.3"
+VERSION="0.6.0"
RPMNAME="yast2-metapackage-handler"
MAINTAINER="Martin Vidner "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/Makefile.am new/yast2-metapackage-handler-0.6.0/Makefile.am
--- old/yast2-metapackage-handler-0.5.3/Makefile.am 2007-08-14 16:55:40.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/Makefile.am 2007-08-30 13:01:28.000000000 +0200
@@ -30,7 +30,7 @@
extra_COPYRIGHT_files = $(if $(HAS_YAST_LICENSE), $(COPYRIGHT_files_yast), $(COPYRIGHT_files_gpl))
-AUTOMAKE_OPTIONS = foreign dist-bzip2
+AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
# where devtools instal m4 snippets
# argh, executed literally
#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
@@ -210,8 +210,7 @@
# For po/ modules
checkpo:
- test ! -d $(srcdir)/po || $(MAKE) -C po checkpo
-# test ! -d $(srcdir)/po \
-# || { $(MAKE) -C po checkpo && $(MAKE) -C po make-pox; }
+ test ! -f $(srcdir)/po/Makefile || $(MAKE) -C po checkpo
+# test ! -f $(srcdir)/po/Makefile || $(MAKE) -C po checkpo make-pox
# No ./SUBDIRS file found - assuming default: All direct subdirs with Makefile.am
SUBDIRS = doc src
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/Makefile.in new/yast2-metapackage-handler-0.6.0/Makefile.in
--- old/yast2-metapackage-handler-0.5.3/Makefile.in 2007-08-14 16:55:46.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/Makefile.in 2007-08-30 13:01:41.000000000 +0200
@@ -87,8 +87,8 @@
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
+DIST_ARCHIVES = $(distdir).tar.bz2
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
@@ -217,7 +217,7 @@
COPYRIGHT.french COPYRIGHT.german COPYRIGHT.spanish
extra_COPYRIGHT_files = $(if $(HAS_YAST_LICENSE), $(COPYRIGHT_files_yast), $(COPYRIGHT_files_gpl))
-AUTOMAKE_OPTIONS = foreign dist-bzip2
+AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
# where devtools instal m4 snippets
# argh, executed literally
#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
@@ -233,8 +233,7 @@
@CREATE_PKGCONFIG_NOARCH_TRUE@@CREATE_PKGCONFIG_TRUE@pkgconfigdata_DATA = $(RPMNAME).pc
@CREATE_PKGCONFIG_NOARCH_FALSE@@CREATE_PKGCONFIG_TRUE@pkgconfig_DATA = $(RPMNAME).pc
TAGVERSION = $(Y2TOOL) tagversion
-# test ! -d $(srcdir)/po \
-# || { $(MAKE) -C po checkpo && $(MAKE) -C po make-pox; }
+# test ! -f $(srcdir)/po/Makefile || $(MAKE) -C po checkpo make-pox
# No ./SUBDIRS file found - assuming default: All direct subdirs with Makefile.am
SUBDIRS = doc src
all: all-recursive
@@ -515,7 +514,6 @@
$(am__remove_distdir)
dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
@@ -841,7 +839,7 @@
# For po/ modules
checkpo:
- test ! -d $(srcdir)/po || $(MAKE) -C po checkpo
+ test ! -f $(srcdir)/po/Makefile || $(MAKE) -C po checkpo
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/src/OneClickInstallUI.ycp new/yast2-metapackage-handler-0.6.0/src/OneClickInstallUI.ycp
--- old/yast2-metapackage-handler-0.5.3/src/OneClickInstallUI.ycp 2007-08-14 16:53:41.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/src/OneClickInstallUI.ycp 2007-08-30 10:59:30.000000000 +0200
@@ -308,6 +308,15 @@
$["id": "nothing", "widget":nothing]
];
}
+
+ //Don't display simple mode if not appropriate
+ if (!OneClickInstall::HaveAnythingToDo() || !OneClickInstall::HaveBundleDescription() || !OneClickInstall::HaveAnyRecommended())
+ {
+ installation_steps = installation_steps_advanced;
+ installation_widgets = installation_widgets_advanced;
+ }
+
+
/** </region> **/
/** <region name="wizardy bits"> **/
@@ -576,7 +585,16 @@
string communication_file =(string)SCR::Read (.target.tmpdir) + SEPARATOR + "oneclickinstall.xml";
OneClickInstall::ToXML(communication_file);
- integer ret = (integer)SCR::Execute (.target.bash, SU_CMD + " '/sbin/yast2 OneClickInstallWorker " + communication_file + "'");
+ //Check if we are already root #305354
+ map out = (map) SCR::Execute (.target.bash_output, "/usr/bin/id --user");
+ boolean root = out["stdout"]:"" == "0\n";
+ if(root)
+ {
+ WFM::call("OneClickInstallWorker",[communication_file]);
+ } else
+ {
+ integer ret = (integer)SCR::Execute (.target.bash, SU_CMD + " '/sbin/yast2 OneClickInstallWorker " + communication_file + "'");
+ }
//Load the response.
OneClickInstallWorkerResponse::FromXML(communication_file);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/src/OneClickInstallWorker.ycp new/yast2-metapackage-handler-0.6.0/src/OneClickInstallWorker.ycp
--- old/yast2-metapackage-handler-0.5.3/src/OneClickInstallWorker.ycp 2007-08-14 16:53:41.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/src/OneClickInstallWorker.ycp 2007-08-30 10:59:30.000000000 +0200
@@ -8,6 +8,13 @@
import "PackageCallbacks";
import "SourceManager";
import "Progress";
+
+ boolean FuzzyMatch(string one, string two)
+ {
+ string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+ return (tolower(filterchars(one,chars)) == tolower(filterchars(two,chars)));
+ }
+
/**
** Check whether this repository is already subscribed
**/
@@ -15,21 +22,32 @@
{
list<integer> sources = Pkg::SourceStartCache(true);
- list<string> existingSources = [];
list<string> deduped = [];
- foreach (integer value, sources,
- {
- string url = Pkg::SourceMediaData(value)["url"]:"Error";
-
- existingSources = add(existingSources,url);
- });
- foreach(string new, url_list,
+ foreach (string new, url_list,
{
- if (!contains(existingSources,new))
+ boolean dupeFound = false;
+ foreach (integer srcid, sources,
{
+ map repoData = Pkg::SourceGeneralData(srcid);
+ if (repoData["url"]:"" == new)
+ {
+ dupeFound = true;
+ break;
+ }
+ if (FuzzyMatch(repoData["name"]:"",OneClickInstall::GetRepositoryName(new)))
+ {
+ dupeFound = true;
+ break;
+ }
+ if (FuzzyMatch(repoData["alias"]:"",OneClickInstall::GetRepositoryName(new)))
+ {
+ dupeFound = true;
+ break;
+ }
+ });
+ if (!dupeFound)
deduped = add(deduped,new);
- }
});
return deduped;
@@ -48,8 +66,17 @@
boolean again = true;
while(again)
{
- integer srcid = Pkg::SourceCreate(new_url, "/");
- if (srcid == -1)
+ map repoData =
+ $[
+ "enabled":true,
+ "autorefresh":true,
+ "name":OneClickInstall::GetRepositoryName(new_url),
+ "alias":OneClickInstall::GetRepositoryName(new_url),
+ "base_urls":[new_url]
+ ];
+ integer srcid = Pkg::RepositoryAdd(repoData);
+ boolean success = Pkg::SourceRefreshNow(srcid);
+ if (!success)
{
if (Popup::YesNo (_("An error occurred while creating the installation source.") + "\n" + _("Details:") + "\n" + Pkg::LastError() + "\n" + _("Try again?")))
{
@@ -65,11 +92,11 @@
else
{
sourceids = add(sourceids,srcid);
- // enable and save the source
- Pkg::SourceSetEnabled(srcid, true);
+ // save the repository
Pkg::SourceSaveAll();
again = false;
}
+
}
});
return true;
@@ -81,6 +108,7 @@
**/
boolean installPackages(list<string> packages)
{
+ Pkg::SourceLoad();
foreach (string name, packages,
{
if (!Pkg::PkgInstall(name))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/src/OneClickInstall.ycp new/yast2-metapackage-handler-0.6.0/src/OneClickInstall.ycp
--- old/yast2-metapackage-handler-0.5.3/src/OneClickInstall.ycp 2007-08-10 14:05:46.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/src/OneClickInstall.ycp 2007-08-30 10:59:30.000000000 +0200
@@ -656,6 +656,54 @@
}
/**
+ * @return Whether we have anything to do
+ * Determine whether we have a proper metapackage, useful as we can't throw exceptions.
+ **/
+ global boolean HaveAnythingToDo()
+ {
+ return ((size(repositories) > 0) && (size(software) > 0));
+ }
+
+ /**
+ * @return Whether we have a bundle description for the whole bundle
+ * Build service isn't currently generating one for YMPs for individual packages.
+ **/
+ global boolean HaveBundleDescription()
+ {
+ return ((description != "") && (summary != "") && ( name != ""));
+ }
+
+ /**
+ * @return Whether we have any recommended repositories or packages
+ * If not we will have to show advanced view.
+ **/
+ global boolean HaveAnyRecommended()
+ {
+ boolean rec = false;
+ foreach (string name, map softwareDetails, software,
+ {
+ if (
+ (softwareDetails["action"]:"install" == "install") &&
+ (softwareDetails["recommended"]:"false" == "true")
+ )
+ rec = true;
+ return true;
+ });
+ foreach (string url, map repoDetails, repositories,
+ {
+ if (
+ (repoDetails["recommended"]:"false" == "true")
+ )
+ {
+ rec = true;
+ return true;
+ }
+ });
+ return rec;
+ }
+
+
+ /**
* Converts our map -> map structure to a list of maps with a "key" element.
* This is friendly for yast's XML serialisation support.
**/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-metapackage-handler-0.5.3/VERSION new/yast2-metapackage-handler-0.6.0/VERSION
--- old/yast2-metapackage-handler-0.5.3/VERSION 2007-08-14 16:55:13.000000000 +0200
+++ new/yast2-metapackage-handler-0.6.0/VERSION 2007-08-30 11:01:22.000000000 +0200
@@ -1 +1 @@
-0.5.3
+0.6.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org