Hello community,
here is the log from the commit of package yast2-pkg-bindings
checked in at Wed Aug 29 22:50:53 CEST 2007.
--------
--- yast2-pkg-bindings/yast2-pkg-bindings.changes 2007-08-24 13:51:01.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-pkg-bindings/yast2-pkg-bindings.changes 2007-08-29 11:48:45.453430000 +0200
@@ -1,0 +2,7 @@
+Wed Aug 29 09:36:00 CEST 2007 - lslezak@suse.cz
+
+- reimplemented Pkg::SourceCacheCopyTo() - copy zypp cache from the
+ installation system to the target (#304310)
+- 2.15.46
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-2.15.45.tar.bz2
New:
----
yast2-pkg-bindings-2.15.46.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.dZ5558/_old 2007-08-29 22:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.dZ5558/_new 2007-08-29 22:50:19.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings-devel-doc (Version 2.15.45)
+# spec file for package yast2-pkg-bindings-devel-doc (Version 2.15.46)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-pkg-bindings-devel-doc
-Version: 2.15.45
+Version: 2.15.46
Release: 1
License: GPL v2 or later
Group: Documentation/HTML
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.15.45.tar.bz2
+Source0: yast2-pkg-bindings-2.15.46.tar.bz2
prefix: /usr
# same as in the main package (because we use the same configure.in.in)
BuildRequires: blocxx-devel boost boost-devel dbus-1-devel docbook-xsl-stylesheets doxygen gcc-c++ hal-devel libgcrypt-devel libxcrypt-devel libxslt libzypp libzypp-devel perl-XML-Writer rpm-devel sgml-skel yast2-core-devel yast2-devtools
@@ -37,7 +37,7 @@
Ladislav Slez�k
%prep
-%setup -n yast2-pkg-bindings-2.15.45
+%setup -n yast2-pkg-bindings-2.15.46
# build only documentation, ignore all other directories
echo "doc" > SUBDIRS
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.dZ5558/_old 2007-08-29 22:50:19.000000000 +0200
+++ /var/tmp/diff_new_pack.dZ5558/_new 2007-08-29 22:50:19.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-pkg-bindings (Version 2.15.45)
+# spec file for package yast2-pkg-bindings (Version 2.15.46)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-pkg-bindings
-Version: 2.15.45
+Version: 2.15.46
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-pkg-bindings-2.15.45.tar.bz2
+Source0: yast2-pkg-bindings-2.15.46.tar.bz2
prefix: /usr
BuildRequires: blocxx-devel boost boost-devel dbus-1-devel docbook-xsl-stylesheets doxygen gcc-c++ hal-devel libgcrypt-devel libxcrypt-devel libxslt perl-XML-Writer rpm-devel sgml-skel yast2-core-devel yast2-devtools
BuildRequires: libzypp-devel >= 3.13.11
@@ -40,7 +40,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-pkg-bindings-2.15.45
+%setup -n yast2-pkg-bindings-2.15.46
# build only the library, ignore documentation (it is in devel-doc package)
echo "src" > SUBDIRS
@@ -73,6 +73,10 @@
%doc %{prefix}/share/doc/packages/yast2-pkg-bindings
%changelog
+* Wed Aug 29 2007 - lslezak@suse.cz
+- reimplemented Pkg::SourceCacheCopyTo() - copy zypp cache from the
+ installation system to the target (#304310)
+- 2.15.46
* Thu Aug 23 2007 - lslezak@suse.cz
- Pkg::SourceLoad() - load resolvables from all working
repositories even when some of them fails (#302432)
++++++ yast2-pkg-bindings-2.15.45.tar.bz2 -> yast2-pkg-bindings-2.15.46.tar.bz2 ++++++
++++ 9729 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.15.45/configure.in new/yast2-pkg-bindings-2.15.46/configure.in
--- old/yast2-pkg-bindings-2.15.45/configure.in 2007-08-24 13:49:11.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.46/configure.in 2007-08-29 11:45:21.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-pkg-bindings
dnl
-dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.15.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-pkg-bindings, 2.15.45, http://bugs.opensuse.org/, yast2-pkg-bindings)
+AC_INIT(yast2-pkg-bindings, 2.15.46, http://bugs.opensuse.org/, yast2-pkg-bindings)
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="2.15.45"
+VERSION="2.15.46"
RPMNAME="yast2-pkg-bindings"
MAINTAINER="Ladislav Slezák "
@@ -143,8 +143,8 @@
AC_PROG_CC
AC_PROG_CPP
-CFLAGS="${CFLAGS} -Wall -Wformat -Wmissing-prototypes"
-CXXFLAGS="${CXXFLAGS} -Wall -Wformat"
+CFLAGS="${CFLAGS} -Wall -Wformat=2 -Wmissing-prototypes"
+CXXFLAGS="${CXXFLAGS} -Wall -Wformat=2"
: ${AGENT_LIBADD:='-L$(libdir) -lscr'}
AC_SUBST(AGENT_LIBADD)
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.15.45/Makefile.am new/yast2-pkg-bindings-2.15.46/Makefile.am
--- old/yast2-pkg-bindings-2.15.45/Makefile.am 2007-08-24 13:49:11.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.46/Makefile.am 2007-08-29 11:45:21.000000000 +0200
@@ -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 testsuite
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.15.45/missing new/yast2-pkg-bindings-2.15.46/missing
--- old/yast2-pkg-bindings-2.15.45/missing 2007-08-24 13:49:27.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.46/missing 2007-08-29 11:45:39.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2005-06-08.21
+scriptversion=2006-05-10.23
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
@@ -33,6 +33,8 @@
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +46,7 @@
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +79,7 @@
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
-case "$1" in
+case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@@ -135,7 +138,7 @@
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case "$1" in
+case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -214,25 +217,25 @@
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@@ -244,18 +247,18 @@
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@@ -267,11 +270,9 @@
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@@ -289,11 +290,17 @@
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@@ -317,13 +324,13 @@
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 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.15.45/src/Source.cc new/yast2-pkg-bindings-2.15.46/src/Source.cc
--- old/yast2-pkg-bindings-2.15.45/src/Source.cc 2007-08-23 13:53:23.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.46/src/Source.cc 2007-08-29 09:17:53.000000000 +0200
@@ -45,6 +45,7 @@
#include
#include
#include
+#include
#include
@@ -1774,14 +1775,81 @@
* To be called at end of initial installation.
*
* @param string dir Root directory of target.
- * @return boolean
+ * @return boolean true on success
**/
YCPValue
PkgModuleFunctions::SourceCacheCopyTo (const YCPString& dir)
{
- y2warning( "Pkg::SourceCacheCopyTo is obsolete now, it does nothing" );
+ // error message (followed by detailed description)
+ const std::string msg = _("Error: Cannot copy the cache to the target directory\n");
- return YCPBoolean( true );
+ std::string d = dir->value();
+ y2milestone("Copying source cache to '%s'...", d.c_str());
+
+ if (d.empty())
+ {
+ y2error("Empty parameter in Pkg::SourceCacheCopyTo()!");
+ return YCPBoolean(false);
+ }
+
+ std::string target = d + "/var/cache";
+
+ // create the target dir
+ const char* argv[] =
+ {
+ "mkdir",
+ // create parent dir
+ "-p",
+ // finish parameter list
+ "--",
+ // target
+ target.c_str(),
+ NULL
+ };
+
+ // discard stderr, no pty, stderr_fd = -1, use the default locale
+ zypp::ExternalProgram prog(argv, zypp::ExternalProgram::Discard_Stderr, false, -1, true);
+
+ int code = prog.close();
+
+ if (code)
+ {
+ // error message (followed by directory name)
+ _last_error.setLastError(msg + _("Cannot create directory ") + target);
+ y2error("Cannot create target directory %s", target.c_str());
+ return YCPBoolean(false);
+ }
+
+ // copy /var/cache/zypp to the target system
+ const char* argv2[] =
+ {
+ "cp",
+ // preserve time stamps
+ "-a",
+ // recursive
+ "-r",
+ // finish parameter list
+ "--",
+ // source
+ "/var/cache/zypp",
+ // target
+ target.c_str(),
+ NULL
+ };
+
+ // discard stderr, no pty, stderr_fd = -1, use the default locale
+ zypp::ExternalProgram prog2(argv2, zypp::ExternalProgram::Discard_Stderr, false, -1, true);
+
+ int code2 = prog2.close();
+
+ if (code2)
+ {
+ // error message
+ _last_error.setLastError(msg + _("Copying failed"));
+ y2error("Cannot copy /var/cache/zypp to %s", d.c_str());
+ }
+
+ return YCPBoolean(!code2);
}
/****************************************************************************************
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.15.45/VERSION new/yast2-pkg-bindings-2.15.46/VERSION
--- old/yast2-pkg-bindings-2.15.45/VERSION 2007-08-23 13:53:35.000000000 +0200
+++ new/yast2-pkg-bindings-2.15.46/VERSION 2007-08-29 09:37:58.000000000 +0200
@@ -1 +1 @@
-2.15.45
+2.15.46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org