Hello community,
here is the log from the commit of package yast2-packager
checked in at Tue Nov 20 11:42:05 CET 2007.
--------
--- yast2-packager/yast2-packager.changes 2007-11-19 16:35:00.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-packager/yast2-packager.changes 2007-11-20 11:15:52.578732000 +0100
@@ -1,0 +2,11 @@
+Tue Nov 20 10:40:30 CET 2007 - lslezak@suse.cz
+
+- checkmedia: added support for checking ISO files, display
+ a warning if the medium doesn't contain MD5 checksum in the
+ application area
+- display the total download size from http and ftp repositories
+ in the installation proposal (#331538)
+- describe the items in the SW proposal
+- 2.16.8
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-2.16.7.tar.bz2
New:
----
yast2-packager-2.16.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.H16000/_old 2007-11-20 11:41:41.000000000 +0100
+++ /var/tmp/diff_new_pack.H16000/_new 2007-11-20 11:41:41.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.16.7)
+# spec file for package yast2-packager (Version 2.16.8)
#
# 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-packager
-Version: 2.16.7
+Version: 2.16.8
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.16.7.tar.bz2
+Source0: yast2-packager-2.16.8.tar.bz2
Prefix: /usr
BuildRequires: gcc-c++ libxcrypt-devel perl-XML-Writer update-desktop-files yast2-country yast2-devtools yast2-slp yast2-testsuite yast2-xml
# Installation::installedVersion && Installation::updateVersion
@@ -66,7 +66,7 @@
Arvin Schnell
%prep
-%setup -n yast2-packager-2.16.7
+%setup -n yast2-packager-2.16.8
%build
%{prefix}/bin/y2tool y2autoconf
@@ -102,6 +102,14 @@
%{prefix}/lib/YaST2/servers_non_y2/ag_*
%doc %{prefix}/share/doc/packages/yast2-packager
%changelog
+* Tue Nov 20 2007 - lslezak@suse.cz
+- checkmedia: added support for checking ISO files, display
+ a warning if the medium doesn't contain MD5 checksum in the
+ application area
+- display the total download size from http and ftp repositories
+ in the installation proposal (#331538)
+- describe the items in the SW proposal
+- 2.16.8
* Mon Nov 19 2007 - lslezak@suse.cz
- checkmedia: colorize the output to make the result (esp. errors)
more visible (part of #309003)
++++++ yast2-packager-2.16.7.tar.bz2 -> yast2-packager-2.16.8.tar.bz2 ++++++
++++ 3377 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-packager-2.16.7/configure.in new/yast2-packager-2.16.8/configure.in
--- old/yast2-packager-2.16.7/configure.in 2007-11-19 14:41:58.000000000 +0100
+++ new/yast2-packager-2.16.8/configure.in 2007-11-20 11:13:23.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.15.9 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-packager, 2.16.6, http://bugs.opensuse.org/, yast2-packager)
+AC_INIT(yast2-packager, 2.16.8, http://bugs.opensuse.org/, yast2-packager)
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.16.6"
+VERSION="2.16.8"
RPMNAME="yast2-packager"
MAINTAINER="Ladislav Slezak "
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-packager-2.16.7/src/include/checkmedia/ui.ycp new/yast2-packager-2.16.8/src/include/checkmedia/ui.ycp
--- old/yast2-packager-2.16.7/src/include/checkmedia/ui.ycp 2007-11-19 16:34:03.000000000 +0100
+++ new/yast2-packager-2.16.8/src/include/checkmedia/ui.ycp 2007-11-20 10:42:22.000000000 +0100
@@ -8,7 +8,7 @@
* Authors:
* Ladislav Slezak
*
- * $Id: ui.ycp 42175 2007-11-19 15:34:03Z lslezak $
+ * $Id: ui.ycp 42200 2007-11-20 09:42:21Z lslezak $
*
* All user interface functions.
*
@@ -30,6 +30,12 @@
import "GetInstArgs";
import "Directory";
+// selected input file (used when checking a file instead of physical CD/DVD medium)
+string iso_filename = "";
+
+// checking file (ISO image) instead of a medium is in progress
+boolean checking_file = false;
+
define list<term> CDdevices(string preferred) {
list<map> cds = (list<map>)SCR::Read(.probe.cdrom);
list<term> ret = [];
@@ -74,7 +80,7 @@
map trasmap = $[
// rich text message, %1 = CD identification
"app" : " "
- + _("<BIG><B>%1</B></BIG>"),
+ + _("<BIG><B>%1</B></BIG>") + (checking_file ? sformat(" (%1)", iso_filename) : ""),
// rich text message, %1 medium number, e.g. CD1,CD2...
"media" : _("<UL><LI>Medium: %1</LI></UL>"),
// rich text message, %1 = size of the medium
@@ -135,6 +141,24 @@
return ret;
}
+// does the medium contain MD5 checksum in the application area?
+boolean md5sumTagPresent(string input)
+{
+ string command = sformat("dd if=%1 bs=1 skip=33651 count=512", input);
+
+ map res = (map)SCR::Execute(.target.bash_output, command);
+
+ if (res["exit"]:-1 != 0)
+ {
+ y2warning("command failed: %1", command);
+ return nil;
+ }
+
+ y2milestone("Read application area: %1", res["stdout"]:"");
+
+ return regexpmatch(res["stdout"]:"", "md5sum=");
+}
+
// mount CD drive and check whether there is directory 'media.1' (the first medium) and 'boot' (bootable product CD)
define boolean InsertedCD1() {
boolean ret = true;
@@ -258,10 +282,10 @@
") +
// help text - media check 3/7
-_("<P>Select a drive, insert a medium into the drive, and press <B>Start Check</B>
-to perform the check. The check can take several minutes depending on
-speed of the drive and size of the medium. The check verifies the MD5 checksum.</P>
-") +
+_("<P>Select a drive, insert a medium into the drive or press <B>Start Check</B>
+or use <B>Check ISO File</B> and select an ISO file.
+The check can take several minutes depending on speed of the
+drive and size of the medium. The check verifies the MD5 checksum.</P> ") +
// help text - media check 4/7
_("<P>If the check of the medium fails, you should not continue the installation.
@@ -290,7 +314,22 @@
// combobox label
CheckMedia::forced_start ? `VBox(`Left(`Label(label)), `VSpacing(0.6)) : `Empty(),
// combo box
- `Left(`ComboBox(`id(`cddevices), _("&CD or DVD Drive"), CDdevices(CheckMedia::preferred_drive))),
+ `HBox(
+ `ComboBox(`id(`cddevices), _("&CD or DVD Drive"), CDdevices(CheckMedia::preferred_drive)),
+ `VBox(
+ // empty label for aligning the widgets
+ `Label(""),
+ // push button label
+ `PushButton(`id(`start), _("&Start Check"))
+ ),
+ `HStretch(),
+ `VBox(
+ // empty label for aligning the widgets
+ `Label(""),
+ // push button label
+ `PushButton(`id(`iso_file), _("Check ISO File..."))
+ )
+ ),
`VSpacing(0.4),
// widget label
`Left(`Label(_("Status Information"))),
@@ -298,15 +337,9 @@
`VSpacing(0.4),
// progress bar label
`ProgressBar(`id(`progress), _("Progress")),
- `VSpacing(1),
- `HBox(
- // push button label
- `PushButton(`id(`start), _("&Start Check")),
- `HSpacing(2),
- // push button label
- `PushButton(`id(`stop), Label::CancelButton())
- )//,
-// `VSpacing(1)
+ `VSpacing(0.4),
+ // push button label
+ `PushButton(`id(`stop), Label::CancelButton())
);
Wizard::SetContents(caption,
@@ -349,9 +382,27 @@
break;
}
}
- else if (ret == `start)
+ else if (ret == `start || ret == `iso_file)
{
- string selecteddrive = (string)UI::QueryWidget(`id(`cddevices), `Value);
+ string selecteddrive = "";
+
+ checking_file = (ret == `iso_file);
+
+ if (checking_file)
+ {
+ // window title - open file dialog
+ selecteddrive = UI::AskForExistingFile(iso_filename, "*.iso", _("Select an ISO File to Check"));
+
+ // remember for the next run
+ if (selecteddrive != nil)
+ {
+ iso_filename = selecteddrive;
+ }
+ }
+ else
+ {
+ selecteddrive = (string)UI::QueryWidget(`id(`cddevices), `Value);
+ }
if (selecteddrive != nil && selecteddrive != "")
{
@@ -372,6 +423,17 @@
}
else
{
+ if (md5sumTagPresent(selecteddrive) == false)
+ {
+ if (!Popup::ContinueCancel(_("The medium does not contain MD5 checksum.
+The content of the medium cannot be verified.
+
+Only readability of the medium will be checked.")))
+ {
+ continue;
+ }
+ }
+
CheckMedia::Start(selecteddrive);
boolean loop = true;
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-packager-2.16.7/src/modules/Packages.ycp new/yast2-packager-2.16.8/src/modules/Packages.ycp
--- old/yast2-packager-2.16.7/src/modules/Packages.ycp 2007-11-19 14:04:37.000000000 +0100
+++ new/yast2-packager-2.16.8/src/modules/Packages.ycp 2007-11-20 11:13:10.000000000 +0100
@@ -3,7 +3,7 @@
* Package: Package selections
* Authors: Anas Nashif
*
- * $Id: Packages.ycp 41775 2007-11-05 11:20:46Z locilka $
+ * $Id: Packages.ycp 42203 2007-11-20 10:13:09Z lslezak $
*/
{
@@ -170,6 +170,62 @@
}
/**
+ * Count the total size of packages to be installed
+ * @return string formatted size of packages to be installed
+ */
+global integer CountSizeToBeDownloaded() {
+ integer ret = 0;
+
+ // get list of remote repositories
+ // consider only http and ftp protocols as remote
+
+ // all enabled sources
+ list<integer> repos = Pkg::SourceGetCurrent(true);
+ list<integer> remote_repos = [];
+
+ foreach(integer repo, repos,
+ {
+ string url = Pkg::SourceGeneralData(repo)["url"]:"";
+ string scheme = URL::Parse()["scheme"]:"";
+
+ if (tolower(scheme) == "http" || tolower(scheme) == "ftp")
+ {
+ y2milestone("Found remote repository %1: %2", repo, url);
+ remote_repos = add(remote_repos, repo);
+ }
+ }
+ );
+
+ // shortcut, no remote repository found
+ if (size(remote_repos) == 0)
+ {
+ y2milestone("No remote repository found");
+ return 0;
+ }
+
+ list<string> packages = Pkg::GetPackages (`selected, true);
+
+ foreach (string p, packages, {
+ list<map> properties = Pkg::ResolvablePropertiesEx(p, `package, "");
+
+ foreach(map prop, properties,
+ {
+ // the package is selected for installation
+ if (prop["status"] == `selected && contains(remote_repos, prop["source"]:-1))
+ {
+ y2debug("Found remote package %1-%2 (%3) from repository %4", p, prop["version"]:"", prop["download_size"]:0, prop["source"]:-1);
+
+ ret = ret + prop["download_size"]:0;
+ }
+ }
+ );
+
+ y2milestone("Total size of packages to download: %1 (%2 B)", String::FormatSizeWithPrecision(ret, 1, true), ret);
+
+ return ret;
+}
+
+/**
* Return information about suboptimal distribution if relevant
* @return string the information string or empty string
*/
@@ -206,9 +262,12 @@
global list<string> SummaryOutput (list<symbol> flags) {
list<string> output = [ InfoAboutSubOptimalDistribution () ];
if (contains (flags, `product))
- output = (list<string>)merge (output, ListSelected (`product, ""));
+ // installation proposal - SW summary, %1 is name of the installed product
+ // (e.g. openSUSE 10.3, SUSE Linux Enterprise ...)
+ output = (list<string>)merge (output, ListSelected (`product, _("Product: %1")));
if (contains (flags, `desktop))
- output = (list<string>)add (output, DefaultDesktop::Description ());
+ // installation proposal - SW summary, %1 is name of the selected desktop (e.g. KDE)
+ output = (list<string>)add (output, sformat(_("Desktop: %1"), DefaultDesktop::Description ()));
if (contains (flags, `pattern))
output = (list<string>)
merge (output, ListSelected (`pattern, "+ %1"));
@@ -216,11 +275,26 @@
output = (list<string>)
merge (output, ListSelected (`selection, "+ %1"));
if (contains (flags, `size))
+ {
output = (list<string>)add (output,
- // part of summary, %1 is size of packages (in MB or GB)
+ // installation proposal - SW summary, %1 is size of the selected packages (in MB or GB)
sformat (_("Size of Packages to Install: %1"),
CountSizeToBeInstalled ()));
+ // add download size
+ integer download_size = CountSizeToBeDownloaded();
+ if (download_size > 0)
+ {
+ output = (list<string>)add (output,
+ // installation proposal - SW summary, %1 is download size of the selected packages
+ // which will be installed from an ftp or http repository (in MB or GB)
+ sformat (_("Size of Packages to Download: %1"),
+ return String::FormatSizeWithPrecision(download_size, 1, true);
+ )
+ );
+ }
+ }
+
output = filter (string o, output, {
return o != "" && o != nil;
});
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-packager-2.16.7/VERSION new/yast2-packager-2.16.8/VERSION
--- old/yast2-packager-2.16.7/VERSION 2007-11-19 16:32:58.000000000 +0100
+++ new/yast2-packager-2.16.8/VERSION 2007-11-20 11:09:06.000000000 +0100
@@ -1 +1 @@
-2.16.7
+2.16.8
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org