Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2017-01-23 11:26:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old) and /work/SRC/openSUSE:Factory/.yast2-packager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2016-12-03 18:24:29.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes 2017-01-23 11:26:27.398891076 +0100 @@ -1,0 +2,8 @@ +Wed Dec 21 15:06:31 CET 2016 - sch...@suse.de + +- Adjust /etc/zypp/zypp.conf in the installed system when + software/minimalistic_libzypp_config is enabled in the control + file (FATE#321764) +- 3.2.11 + +------------------------------------------------------------------- Old: ---- yast2-packager-3.2.10.tar.bz2 New: ---- yast2-packager-3.2.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.f1cHRx/_old 2017-01-23 11:26:27.794834948 +0100 +++ /var/tmp/diff_new_pack.f1cHRx/_new 2017-01-23 11:26:27.798834381 +0100 @@ -1,7 +1,7 @@ # # spec file for package yast2-packager # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.2.10 +Version: 3.2.11 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -41,6 +41,9 @@ # Pkg::SourceSetPriority() BuildRequires: yast2-pkg-bindings >= 3.2.1 +# Augeas lenses +BuildRequires: augeas-lenses + # Newly added RPM Requires: yast2-country-data >= 2.16.3 @@ -65,6 +68,9 @@ # .process agent Requires: yast2-core >= 2.16.35 +# Augeas lenses +Requires: augeas-lenses + # setenv() builtin Conflicts: yast2-core < 2.15.10 @@ -119,9 +125,11 @@ %dir %{yast_yncludedir}/checkmedia %dir %{yast_yncludedir}/packager %dir %{yast_libdir}/packager +%dir %{yast_libdir}/packager/cfa %{yast_yncludedir}/checkmedia/* %{yast_yncludedir}/packager/* %{yast_libdir}/packager/* +%{yast_libdir}/packager/cfa/* %{yast_clientdir}/*.rb %{yast_moduledir}/* %{yast_desktopdir}/*.desktop ++++++ yast2-packager-3.2.10.tar.bz2 -> yast2-packager-3.2.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/.travis.yml new/yast2-packager-3.2.11/.travis.yml --- old/yast2-packager-3.2.10/.travis.yml 2016-12-01 11:28:47.423752215 +0100 +++ new/yast2-packager-3.2.11/.travis.yml 2017-01-17 12:06:11.399301000 +0100 @@ -1,11 +1,11 @@ -language: cpp -compiler: - - gcc +sudo: required +language: bash +services: + - docker + before_install: - # disable rvm, use system Ruby - - rvm reset - - wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh - - sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 yast2-pkg-bindings yast2-storage" -g "rspec:3.3.0 yast-rake simplecov coveralls cheetah" + - docker build -t yast-packager-image . script: - - sudo rake install - - COVERAGE=1 rake test:unit + # the "yast-travis-ruby" script is included in the base yastdevel/ruby image + # see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby + - docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-packager-image yast-travis-ruby diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/Dockerfile new/yast2-packager-3.2.11/Dockerfile --- old/yast2-packager-3.2.10/Dockerfile 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.2.11/Dockerfile 2017-01-17 12:06:11.399301000 +0100 @@ -0,0 +1,3 @@ +FROM yastdevel/ruby +COPY . /usr/src/app + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/package/yast2-packager.changes new/yast2-packager-3.2.11/package/yast2-packager.changes --- old/yast2-packager-3.2.10/package/yast2-packager.changes 2016-12-01 11:28:47.459752215 +0100 +++ new/yast2-packager-3.2.11/package/yast2-packager.changes 2017-01-17 12:06:11.423301000 +0100 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Wed Dec 21 15:06:31 CET 2016 - sch...@suse.de + +- Adjust /etc/zypp/zypp.conf in the installed system when + software/minimalistic_libzypp_config is enabled in the control + file (FATE#321764) +- 3.2.11 + +------------------------------------------------------------------- Thu Dec 1 08:03:05 UTC 2016 - lsle...@suse.cz - Mark the selected default patterns as optional so the user can diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/package/yast2-packager.spec new/yast2-packager-3.2.11/package/yast2-packager.spec --- old/yast2-packager-3.2.10/package/yast2-packager.spec 2016-12-01 11:28:47.459752215 +0100 +++ new/yast2-packager-3.2.11/package/yast2-packager.spec 2017-01-17 12:06:11.423301000 +0100 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.2.10 +Version: 3.2.11 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -41,6 +41,9 @@ # Pkg::SourceSetPriority() BuildRequires: yast2-pkg-bindings >= 3.2.1 +# Augeas lenses +BuildRequires: augeas-lenses + # Newly added RPM Requires: yast2-country-data >= 2.16.3 @@ -65,6 +68,9 @@ # .process agent Requires: yast2-core >= 2.16.35 +# Augeas lenses +Requires: augeas-lenses + # setenv() builtin Conflicts: yast2-core < 2.15.10 @@ -119,9 +125,11 @@ %dir %{yast_yncludedir}/checkmedia %dir %{yast_yncludedir}/packager %dir %{yast_libdir}/packager +%dir %{yast_libdir}/packager/cfa %{yast_yncludedir}/checkmedia/* %{yast_yncludedir}/packager/* %{yast_libdir}/packager/* +%{yast_libdir}/packager/cfa/* %{yast_clientdir}/*.rb %{yast_moduledir}/* %{yast_desktopdir}/*.desktop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/src/lib/packager/cfa/zypp_conf.rb new/yast2-packager-3.2.11/src/lib/packager/cfa/zypp_conf.rb --- old/yast2-packager-3.2.10/src/lib/packager/cfa/zypp_conf.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.2.11/src/lib/packager/cfa/zypp_conf.rb 2017-01-17 12:06:11.443301000 +0100 @@ -0,0 +1,32 @@ +require "cfa/base_model" +require "cfa/augeas_parser" +require "cfa/matcher" + +module Yast + module Packager + module CFA + # Represents a Zypper configuration file. + class ZyppConf < ::CFA::BaseModel + # Configuration parser + PARSER = ::CFA::AugeasParser.new("puppet.lns") + # Path to configuration file + PATH = "/etc/zypp/zypp.conf".freeze + + def initialize(file_handler: nil) + super(PARSER, PATH, file_handler: file_handler) + end + + # Set options to keep a minimalistic package selection + def set_minimalistic! + data["main"]["solver.onlyRequires"] = "true" + data["main"]["rpm.install.excludedocs"] = "yes" + data["main"]["multiversion"] = nil + end + + def section(name) + data[name] + end + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/src/lib/packager/clients/pkg_finish.rb new/yast2-packager-3.2.11/src/lib/packager/clients/pkg_finish.rb --- old/yast2-packager-3.2.10/src/lib/packager/clients/pkg_finish.rb 2016-12-01 11:28:47.563752215 +0100 +++ new/yast2-packager-3.2.11/src/lib/packager/clients/pkg_finish.rb 2017-01-17 12:06:11.443301000 +0100 @@ -15,6 +15,7 @@ require "installation/finish_client" require "packages/repository" +require "packager/cfa/zypp_conf" module Yast class PkgFinishClient < ::Installation::FinishClient @@ -43,6 +44,7 @@ Yast.import "FileUtils" Yast.import "Packages" Yast.import "Directory" + Yast.import "ProductFeatures" end # @see Implements ::Installation::FinishClient#modes @@ -80,6 +82,13 @@ # (needs to be done _after_ saving repositories, see bnc#700881) Pkg.SourceCacheCopyTo(Installation.destdir) + # Patching /etc/zypp/zypp.conf in order not to install + # recommended packages, doc-packages,... + # (needed for products like CASP) + if ProductFeatures.GetBooleanFeature("software", "minimalistic_libzypp_config") + set_minimalistic_libzypp_conf + end + # copy list of failed packages to installed system if File.exist?(FAILED_PKGS_PATH) ::FileUtils.cp(FAILED_PKGS_PATH, File.join(Installation.destdir, FAILED_PKGS_PATH), @@ -194,5 +203,16 @@ Pkg.TargetFinish Pkg.TargetInitialize(Installation.destdir) end + + # Set libzypp configuration to install the minimal amount of packages + # + # @see Yast::Packager::CFA::ZyppConf#set_minimalistic! + def set_minimalistic_libzypp_conf + log.info("Setting libzypp configuration as minimalistic") + config = Packager::CFA::ZyppConf.new + config.load + config.set_minimalistic! + config.save + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/test/data/zypp/zypp.conf new/yast2-packager-3.2.11/test/data/zypp/zypp.conf --- old/yast2-packager-3.2.10/test/data/zypp/zypp.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.2.11/test/data/zypp/zypp.conf 2017-01-17 12:06:11.471301000 +0100 @@ -0,0 +1,633 @@ +## Configuration file for software management +## /etc/zypp/zypp.conf +## +## Boolean values are 0 1 yes no on off true false + + +[main] + + +## +## Override the detected architecture +## +## Valid values: i586, i686, x86_64, ppc, ppc64, ia64, s390, s390x, .. +## Default value: Autodetected +## +## ** CAUTION: Only set if you know what you're doing ! +## ** Changing this needs a full refresh (incl. download) +## ** of all repository data. +## +# arch = s390 + + +## +## Path where the caches are kept. +## +## Valid values: A directory +## Default value: /var/cache/zypp +## +# cachedir = /var/cache/zypp + + +## +## Path where the repo metadata is downloaded and kept. +## +## Valid values: A directory +## Default value: {cachedir}/raw +## +## Changing this needs a full refresh (incl. download) of all repository data +## +# metadatadir = /var/cache/zypp/raw + + +## +## Path where the repo solv files are created and kept. +## +## Valid values: A directory +## Default value: {cachedir}/solv +## +# solvfilesdir = /var/cache/zypp/solv + + +## +## Path where the repo packages are downloaded and kept. +## +## Valid values: A directory +## Default value: {cachedir}/packages +## +# packagesdir = /var/cache/zypp/packages + + +## +## Path where the configuration files are kept. +## +## Valid values: A directory +## Default value: /etc/zypp +## +# configdir = /etc/zypp + +## +## Path where the known repositories .repo files are kept +## +## Valid values: A directory +## Default value: {configdir}/repos.d +## +## Changing this invalidates all known repositories +## +# reposdir = /etc/zypp/repos.d + +## +## Path where the known services .service files are kept +## +## Valid values: A directory +## Default value: {configdir}/services.d +## +## Changing this invalidates all known services +## +# servicesdir = /etc/zypp/services.d + + +## +## Whether repository urls should be probed when added +## +## Valid values: boolean +## Default value: false +## +## If true, accessability of repositories is checked immediately (when added) +## (e.g. 'zypper ar' will check immediately) +## If false, accessability of repositories is checked when refreshed +## (e.g. 'zypper ar' will delay the check until the next refresh) +## +# repo.add.probe = false + + +## +## Amount of time in minutes that must pass before another refresh. +## +## Valid values: Integer +## Default value: 10 +## +## If you have autorefresh enabled for a repository, it is checked for +## up-to-date metadata not more often than every <repo.refresh.delay> +## minutes. If an automatic request for refresh comes before <repo.refresh.delay> +## minutes passed since the last check, the request is ignored. +## +## A value of 0 means the repository will always be checked. To get the opposite +## effect, disable autorefresh for your repositories. +## +## This option has no effect for repositories with autorefresh disabled, nor for +## user-requested refresh. +## +# repo.refresh.delay = 10 + +## +## Translated package descriptions to download from repos. +## +## A list of locales for which translated package descriptions should +## be downloaded, in case they are availavble and the repo supports this. +## Not all repo formats support downloading specific translations only. +## +## Valid values: List of locales like 'en', 'en_US'... +## Default value: RequestedLocales +## +## If data for a specific locale are not available, we try to find some +## fallback. Translations for 'en' are always downloaded. +## +# repo.refresh.locales = en, de + +## +## Maximum number of concurrent connections to use per transfer +## +## Valid values: Integer +## Default value: 5 +## +## This setting is only used if more than one is possible +## Setting it to a reasonable number avoids flooding servers +## +# download.max_concurrent_connections = 5 + +## +## Sets the minimum download speed (bytes per second) +## until the connection is dropped +## This can be useful to prevent security attacks on hosts by +## providing updates at very low speeds. +## +## 0 means no limit +## +# download.min_download_speed = 0 + +## Maximum download speed (bytes per second) +## 0 means no limit +# download.max_download_speed = 0 + +## Number of tries per download which will be +## done without user interaction +## 0 means no limit (use with caution) +# download.max_silent_tries = 5 + +## +## Maximum time in seconds that you allow a transfer operation to take. +## +## This is useful for preventing your batch jobs from hanging for hours due +## to slow networks or links going down. Limiting operations to less than a +## few minutes risk aborting perfectly normal operations. +## +## Valid values: [0,3600] +## Default value: 180 +## +# download.transfer_timeout = 180 + +## +## Whether to consider using a .delta.rpm when downloading a package +## +## Valid values: boolean +## Default value: true +## +## Using a delta rpm will decrease the download size for package updates +## since it does not contain all files of the package but only the binary +## diff of changed ones. Recreating the rpm package on the local machine +## is an expensive operation (memory,CPU). If your network connection is +## not too slow, you benefit from disabling .delta.rpm. +## +# download.use_deltarpm = true + +## +## Whether to consider using a deltarpm even when rpm is local +## +## Valid values: boolean +## Default value: false +## +## This option has no effect unless download.use_deltarpm is set true. +## +# download.use_deltarpm.always = false + +## +## Hint which media to prefer when installing packages (download vs. CD). +## +## Valid values: download, volatile +## Default value: download +## +## Note that this just a hint. First of all the solver will choose the 'best' +## package according to its repos priority, version and architecture. But if +## there is a choice, we will prefer packages from the desired media. +## +## Packages available locally are always preferred. The question is whether +## you prefer packages being downloaded via FTP/HTTP/HTTPS (download), rather +## than being prompted to insert a CD/DVD (volatile), in case they are available +## on both media. +## +## Name | Priority | URI +## openSUSE-11.1 99 dvd:/// +## openSUSE-11.1-Oss 99 http://download.opensuse.org/distribution/11.1/repo/oss +## +## In the above example 2 repositories with similar content are used. Rather +## than raising the priority of one of them to 'prefer' a certain media, you +## should use the same priority for both and set download.media_preference +## instead. +## +## download.media_preference = download + +## +## Path where media are preferably mounted or downloaded +## +## Valid values: A (writable) directory +## Default value: /var/adm/mount +## +## The media backend will try to organize media mount points and download areas +## below this directory, unless a different location is requested by the application. +## +## If the directory is not accessible and read/writable for a specific user, +## the fallback is to use /var/tmp. +## +## download.media_mountdir = /var/adm/mount + +## +## Signature checking (repodata and rpm packages) +## +## boolean gpgcheck (default: on) +## boolean repo_gpgcheck (default: unset -> according to gpgcheck) +## boolean pkg_gpgcheck (default: unset -> according to gpgcheck) +## +## If 'gpgcheck' is 'on' we will either check the signature of repo metadata +## (packages are secured via checksum in the metadata), or the signature of +## an rpm package to install if it's repo metadata are not signed or not +## checked. +## +## The default behavior can be altered by explicitly setting 'repo_gpgcheck' and/or +## 'pkg_gpgcheck' to perform those checks always (if 'on') or never (if 'off'). +## +## Explicitly setting 'gpgcheck', 'repo_gpgcheck' 'pkg_gpgcheck' in a +## repositories .repo file will overwrite the defaults here. +## +## DISABLING GPG CHECKS IS NOT RECOMMENDED. +## Signing data enables the recipient to verify that no modifications +## occurred after the data were signed. Accepting data with no, wrong +## or unknown signature can lead to a corrupted system and in extreme +## cases even to a system compromise. +## +# repo_gpgcheck = unset -> according to gpgcheck +# pkg_gpgcheck = unset -> according to gpgcheck + +## +## Commit download policy to use as default. +## +## DownloadOnly, Just download all packages to the local cache. +## Do not install. Implies a dry-run. +## +## DownloadInAdvance, First download all packages to the local cache. +## Then start to install. +## +## DownloadInHeaps, Similar to DownloadInAdvance, but try to split +## the transaction into heaps, where at the end of +## each heap a consistent system state is reached. +## +## DownloadAsNeeded Alternating download and install. Packages are +## cached just to avid CD/DVD hopping. This is the +## traditional behaviour. +## +## <UNSET> If a value is not set, empty or unknown, we pick +## some sane default. +## +## commit.downloadMode = + +## +## Defining directory which contains vendor description files. +## +## One file in this directory reflects a group of equivalent vendors. e.G.: +## (filename is "nvidia" but could be any other name): +## ------------------------- file contains begin ----------------------- +## [main] +## +## vendors = nvidia,suse,opensuse +## +## ------------------------- file contains end ----------------------- +## Libzypp makes an string comparision (like strncmp, case-insensitive) +## whereas the beginning of the strings are compared only. +## e.G. vendor "opensuse11.0" is compatible to "openSuSE". +## +## Valid values: A directory +## Default value: {configdir}/vendors.d +## +# vendordir = /etc/zypp/vendors.d + + +## +## Whether required packages are installed ONLY +## So recommended packages, language packages and packages which depend +## on hardware (modalias) will not be regarded. +## +## Valid values: boolean +## Default value: false +## +# solver.onlyRequires = false + +## +## EXPERTS ONLY: Per default the solver will not replace packages of +## different vendors, unless you explicitly ask to do so. Setting this +## option to TRUE will disable this vendor check (unless the application +## explicitly re-enables it). Packages will then be considered based on +## repository priority and version only. This may easily damage your system. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: false +## +# solver.allowVendorChange = false + +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether to allow package version downgrades upon DUP. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowDowngrade = true + +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether follow package renames upon DUP. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowNameChange = true + +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether to allow changing the packages architecture upon DUP. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowArchChange = true + +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether to allow changing the packages vendor upon DUP. If you +## are following a continuous distribution like Tumbleweed or Factory +## where you use 'zypper dup --no-allow-vendor-change' quite frequently, +## you may indeed benefit from disabling the VendorChange. Packages from +## OBS repos will then be kept rather than being overwritten by Tumbleweeds +## version. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowVendorChange = true + +## +## EXPERTS ONLY: Cleanup when deleting packages. Whether the solver should +## per default try to remove packages exclusively required by the ones he's +## asked to delete. +## +## This option should be used on a case by case basis, enabled via +## command line options or switches the applications offer. Changing +## the global default on a system where unattended actions are performed, +## may easily damage your system. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: false +## +# solver.cleandepsOnRemove = false + +## +## This file contains requirements/conflicts which fulfill the +## needs of a running system. +## For example the system would be broken if not glibc or kernel is +## installed. +## So the user will be informed if these packages will be deleted. +## +## Format: Each line represents one dependency: +## e.g. +## requires:kernel +## requires:glibc +## Default value: {configdir}/systemCheck +## +# solver.checkSystemFile = /etc/zypp/systemCheck + +## +## This directory can contain files that contain requirements/conflicts +## which fulfill the needs of a running system (see checkSystemFile). +## +## Files are read in alphabetical order. +## +## Default value: {configdir}/systemCheck.d +## +# solver.checkSystemFileDir = /etc/zypp/systemCheck.d + +## +## When committing a dist upgrade (e.g. 'zypper dup') a solver testcase +## is written to /var/log/updateTestcase-<date>. It is needed in bugreports. +## This option returns the number of testcases to keep on the system. Old +## cases will be deleted, as new ones are created. +## +## Use 0 to write no testcase at all, or -1 to keep all testcases. +## +## Valid values: Integer +## Default value: 2 +## +# solver.upgradeTestcasesToKeep = 2 + +## +## Whether dist upgrade should remove a products dropped packages. +## +## A new product may suggest a list of old and no longer supported +## packages (dropped packages). Performing a dist upgrade the solver +## may try to delete them, even if they do not cause any dependency +## problem. +## +## Turning this option off, the solver will not try to remove those +## packages unless they actually do cause dependency trouble. You may +## do the cleanup manually, or simply leave them installed as long +## as you don't need the disk space. +## +## Valid values: Boolean +## Default value: true +## +# solver.upgradeRemoveDroppedPackages = true + +## +## Packages which can be installed in different versions at the same time. +## +## Packages are selected either by name, or by provides. In the later case +## the string must start with "provides:" immediately followed by the capability. +## +## Example: +## kernel - just packages whith name 'kernel' +## provides:multiversion(kernel) - all packages providing 'multiversion(kernel)' +## (kenel and kmp packages should do this) +## Valid values: +## Comma separated list of packages. +## +## Default value: +## empty +## +multiversion = provides:multiversion(kernel) + +## +## Defining directory which may contain additional multiversion definitions. +## +## If the directory exists, each file in this directory is scanned, expecting +## one valid multiversion list entry per line. Empty lines and lines starting +## with '#' are ignored. +## ------------------------- [/etc/zypp/multiversion.d/example file begin] ----------------------- +## # An alternate way to enable kernel packages being +## # installed in parallel: +## +## provides:multiversion(kernel) +## ------------------------- [/etc/zypp/multiversion.d/example file end] ----------------------- +## +## Valid values: A directory +## Default value: {configdir}/multiversion.d +## +# multiversiondir = /etc/zypp/multiversion.d + +## Comma separated list of kernel packages to keep installed in parallel, if the +## above multiversion variable is set. Packages can be specified as +## 2.6.32.12-0.7 - Exact version to keep +## latest - Keep kernel with the highest version number +## latest-N - Keep kernel with the Nth highest version number +## running - Keep the running kernel +## oldest - Keep kernel with the lowest version number (the GA kernel) +## oldest+N - Keep kernel with the Nth lowest version number +## +## Note: This entry is not evaluated by libzypp, but by the +## purge-kernels service (via /sbin/purge-kernels). +## +## Default: Do not delete any kernels if multiversion = provides:multiversion(kernel) is set +multiversion.kernels = latest,latest-1,running + +## +## Path to locks file. If not exist then is create. +## In this file is saved also UI locks. +## +## valid value: path to file or place where file can be created +## default value: {configdir}/locks +## +# locksfile.path = /etc/zypp/locks + +## +## Whether to apply locks in locks file after zypp start. +## +## Valid values: boolean +## Default value: true +## +# locksfile.apply = true + +## +## Where update items are stored +## (example: scripts, messages) +## +## Valid values: path to directory +## Default value: /var/adm +## +# update.datadir = /var/adm + +## +## Where update messages are stored +## +## Valid values: path to directory +## Default value: {update.datadir}/update-messages +## +# update.messagesdir = /var/adm/update-messages + +## +## Where update scripts are stored +## +## Valid values: path to directory +## Default value: {update.datadir}/update-scripts +## +# update.scriptsdir = /var/adm/update-scripts + +## +## Command to be invoked to send update messages. +## +## Packages may leave an update message file in {update.messagesdir}. +## At the end of each commit, zypp collects those messages and may send +## a notification to the user. +## +## zypp will prepare the update messages according to the selected +## content format and pipe the content to the command. +## +## Format: +## single - For each update message invoke the command and send +## the message. +## none - For each update message invoke the command but don't +## use a pipe to send any data. You probably want to pass +## the message file on the commandline using %P (see +## Substitutions). +## digest - Single invocation of the command, sending the path +## names of all update message. One per line. +## bulk - Single invocation of the command, sending the +## concatenated content of all update messages, separated +## by Ctrl-L. +## +## Substitutions: +## %p - package identification (name-version-release.arch) +## %P - full path to the update message file +## +## Valid values: The value is specified as "format | command". +## An empty value will turn off any notification. +## +## Examples: single | mail -s 'Update message from %p' root +## none | my-send-script -f %P +## +## Default value: single | /usr/lib/zypp/notify-message -p %p +## +# update.messages.notify = single | /usr/lib/zypp/notify-message -p %p + +## +## Options for package installation: excludedocs +## +## Don't install any files which are marked as documentation. +## +## Valid values: boolean +## Default value: no +## +# rpm.install.excludedocs = no + +## +## Location of history log file. +## +## The history log is described at +## http://en.opensuse.org/Libzypp/Package_History +## +## Valid values: absolute path to a file +## Default value: /var/log/zypp/history +## +# history.logfile = /var/log/zypp/history + +## +## Global credentials directory path. +## +## If a URL contains ?credentials=<filename> parameter, the credentials will +## be stored and looked for in a file named <filename> in this directory. +## +## Valid values: absolute path to a directory +## Default value: /etc/zypp/credentials.d +## +# credentials.global.dir = /etc/zypp/credentials.d + +## +## Global credentials catalog file path. +## +## This file contains a catalog of all known user credentials which were +## not stored via the ?credentials=<filename> URL parameter, i.e. passed +## in URL as username:password component, or entered by user in +## an authentication dialog. +## +## Valid values: absolute path to a file +## Default value: /etc/zypp/credentials.cat +## +# credentials.global.file = /etc/zypp/credentials.cat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/test/data/zypp/zypp.conf.expected new/yast2-packager-3.2.11/test/data/zypp/zypp.conf.expected --- old/yast2-packager-3.2.10/test/data/zypp/zypp.conf.expected 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.2.11/test/data/zypp/zypp.conf.expected 2017-01-17 12:06:11.471301000 +0100 @@ -0,0 +1,577 @@ +## Configuration file for software management +## /etc/zypp/zypp.conf +## +## Boolean values are 0 1 yes no on off true false +[main] +## +## Override the detected architecture +## +## Valid values: i586, i686, x86_64, ppc, ppc64, ia64, s390, s390x, .. +## Default value: Autodetected +## +## ** CAUTION: Only set if you know what you're doing ! +## ** Changing this needs a full refresh (incl. download) +## ** of all repository data. +## +# arch = s390 +## +## Path where the caches are kept. +## +## Valid values: A directory +## Default value: /var/cache/zypp +## +# cachedir = /var/cache/zypp +## +## Path where the repo metadata is downloaded and kept. +## +## Valid values: A directory +## Default value: {cachedir}/raw +## +## Changing this needs a full refresh (incl. download) of all repository data +## +# metadatadir = /var/cache/zypp/raw +## +## Path where the repo solv files are created and kept. +## +## Valid values: A directory +## Default value: {cachedir}/solv +## +# solvfilesdir = /var/cache/zypp/solv +## +## Path where the repo packages are downloaded and kept. +## +## Valid values: A directory +## Default value: {cachedir}/packages +## +# packagesdir = /var/cache/zypp/packages +## +## Path where the configuration files are kept. +## +## Valid values: A directory +## Default value: /etc/zypp +## +# configdir = /etc/zypp +## +## Path where the known repositories .repo files are kept +## +## Valid values: A directory +## Default value: {configdir}/repos.d +## +## Changing this invalidates all known repositories +## +# reposdir = /etc/zypp/repos.d +## +## Path where the known services .service files are kept +## +## Valid values: A directory +## Default value: {configdir}/services.d +## +## Changing this invalidates all known services +## +# servicesdir = /etc/zypp/services.d +## +## Whether repository urls should be probed when added +## +## Valid values: boolean +## Default value: false +## +## If true, accessability of repositories is checked immediately (when added) +## (e.g. 'zypper ar' will check immediately) +## If false, accessability of repositories is checked when refreshed +## (e.g. 'zypper ar' will delay the check until the next refresh) +## +# repo.add.probe = false +## +## Amount of time in minutes that must pass before another refresh. +## +## Valid values: Integer +## Default value: 10 +## +## If you have autorefresh enabled for a repository, it is checked for +## up-to-date metadata not more often than every <repo.refresh.delay> +## minutes. If an automatic request for refresh comes before <repo.refresh.delay> +## minutes passed since the last check, the request is ignored. +## +## A value of 0 means the repository will always be checked. To get the opposite +## effect, disable autorefresh for your repositories. +## +## This option has no effect for repositories with autorefresh disabled, nor for +## user-requested refresh. +## +# repo.refresh.delay = 10 +## +## Translated package descriptions to download from repos. +## +## A list of locales for which translated package descriptions should +## be downloaded, in case they are availavble and the repo supports this. +## Not all repo formats support downloading specific translations only. +## +## Valid values: List of locales like 'en', 'en_US'... +## Default value: RequestedLocales +## +## If data for a specific locale are not available, we try to find some +## fallback. Translations for 'en' are always downloaded. +## +# repo.refresh.locales = en, de +## +## Maximum number of concurrent connections to use per transfer +## +## Valid values: Integer +## Default value: 5 +## +## This setting is only used if more than one is possible +## Setting it to a reasonable number avoids flooding servers +## +# download.max_concurrent_connections = 5 +## +## Sets the minimum download speed (bytes per second) +## until the connection is dropped +## This can be useful to prevent security attacks on hosts by +## providing updates at very low speeds. +## +## 0 means no limit +## +# download.min_download_speed = 0 +## Maximum download speed (bytes per second) +## 0 means no limit +# download.max_download_speed = 0 +## Number of tries per download which will be +## done without user interaction +## 0 means no limit (use with caution) +# download.max_silent_tries = 5 +## +## Maximum time in seconds that you allow a transfer operation to take. +## +## This is useful for preventing your batch jobs from hanging for hours due +## to slow networks or links going down. Limiting operations to less than a +## few minutes risk aborting perfectly normal operations. +## +## Valid values: [0,3600] +## Default value: 180 +## +# download.transfer_timeout = 180 +## +## Whether to consider using a .delta.rpm when downloading a package +## +## Valid values: boolean +## Default value: true +## +## Using a delta rpm will decrease the download size for package updates +## since it does not contain all files of the package but only the binary +## diff of changed ones. Recreating the rpm package on the local machine +## is an expensive operation (memory,CPU). If your network connection is +## not too slow, you benefit from disabling .delta.rpm. +## +# download.use_deltarpm = true +## +## Whether to consider using a deltarpm even when rpm is local +## +## Valid values: boolean +## Default value: false +## +## This option has no effect unless download.use_deltarpm is set true. +## +# download.use_deltarpm.always = false +## +## Hint which media to prefer when installing packages (download vs. CD). +## +## Valid values: download, volatile +## Default value: download +## +## Note that this just a hint. First of all the solver will choose the 'best' +## package according to its repos priority, version and architecture. But if +## there is a choice, we will prefer packages from the desired media. +## +## Packages available locally are always preferred. The question is whether +## you prefer packages being downloaded via FTP/HTTP/HTTPS (download), rather +## than being prompted to insert a CD/DVD (volatile), in case they are available +## on both media. +## +## Name | Priority | URI +## openSUSE-11.1 99 dvd:/// +## openSUSE-11.1-Oss 99 http://download.opensuse.org/distribution/11.1/repo/oss +## +## In the above example 2 repositories with similar content are used. Rather +## than raising the priority of one of them to 'prefer' a certain media, you +## should use the same priority for both and set download.media_preference +## instead. +## +## download.media_preference = download +## +## Path where media are preferably mounted or downloaded +## +## Valid values: A (writable) directory +## Default value: /var/adm/mount +## +## The media backend will try to organize media mount points and download areas +## below this directory, unless a different location is requested by the application. +## +## If the directory is not accessible and read/writable for a specific user, +## the fallback is to use /var/tmp. +## +## download.media_mountdir = /var/adm/mount +## +## Signature checking (repodata and rpm packages) +## +## boolean gpgcheck (default: on) +## boolean repo_gpgcheck (default: unset -> according to gpgcheck) +## boolean pkg_gpgcheck (default: unset -> according to gpgcheck) +## +## If 'gpgcheck' is 'on' we will either check the signature of repo metadata +## (packages are secured via checksum in the metadata), or the signature of +## an rpm package to install if it's repo metadata are not signed or not +## checked. +## +## The default behavior can be altered by explicitly setting 'repo_gpgcheck' and/or +## 'pkg_gpgcheck' to perform those checks always (if 'on') or never (if 'off'). +## +## Explicitly setting 'gpgcheck', 'repo_gpgcheck' 'pkg_gpgcheck' in a +## repositories .repo file will overwrite the defaults here. +## +## DISABLING GPG CHECKS IS NOT RECOMMENDED. +## Signing data enables the recipient to verify that no modifications +## occurred after the data were signed. Accepting data with no, wrong +## or unknown signature can lead to a corrupted system and in extreme +## cases even to a system compromise. +## +# repo_gpgcheck = unset -> according to gpgcheck +# pkg_gpgcheck = unset -> according to gpgcheck +## +## Commit download policy to use as default. +## +## DownloadOnly, Just download all packages to the local cache. +## Do not install. Implies a dry-run. +## +## DownloadInAdvance, First download all packages to the local cache. +## Then start to install. +## +## DownloadInHeaps, Similar to DownloadInAdvance, but try to split +## the transaction into heaps, where at the end of +## each heap a consistent system state is reached. +## +## DownloadAsNeeded Alternating download and install. Packages are +## cached just to avid CD/DVD hopping. This is the +## traditional behaviour. +## +## <UNSET> If a value is not set, empty or unknown, we pick +## some sane default. +## +## commit.downloadMode = +## +## Defining directory which contains vendor description files. +## +## One file in this directory reflects a group of equivalent vendors. e.G.: +## (filename is "nvidia" but could be any other name): +## ------------------------- file contains begin ----------------------- +## [main] +## +## vendors = nvidia,suse,opensuse +## +## ------------------------- file contains end ----------------------- +## Libzypp makes an string comparision (like strncmp, case-insensitive) +## whereas the beginning of the strings are compared only. +## e.G. vendor "opensuse11.0" is compatible to "openSuSE". +## +## Valid values: A directory +## Default value: {configdir}/vendors.d +## +# vendordir = /etc/zypp/vendors.d +## +## Whether required packages are installed ONLY +## So recommended packages, language packages and packages which depend +## on hardware (modalias) will not be regarded. +## +## Valid values: boolean +## Default value: false +## +# solver.onlyRequires = false +## +## EXPERTS ONLY: Per default the solver will not replace packages of +## different vendors, unless you explicitly ask to do so. Setting this +## option to TRUE will disable this vendor check (unless the application +## explicitly re-enables it). Packages will then be considered based on +## repository priority and version only. This may easily damage your system. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: false +## +# solver.allowVendorChange = false +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether to allow package version downgrades upon DUP. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowDowngrade = true +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether follow package renames upon DUP. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowNameChange = true +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether to allow changing the packages architecture upon DUP. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowArchChange = true +## +## EXPERTS ONLY: TUNE DISTRIBUTION UPGRADE (DUP) +## Set whether to allow changing the packages vendor upon DUP. If you +## are following a continuous distribution like Tumbleweed or Factory +## where you use 'zypper dup --no-allow-vendor-change' quite frequently, +## you may indeed benefit from disabling the VendorChange. Packages from +## OBS repos will then be kept rather than being overwritten by Tumbleweeds +## version. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: true +## +# solver.dupAllowVendorChange = true +## +## EXPERTS ONLY: Cleanup when deleting packages. Whether the solver should +## per default try to remove packages exclusively required by the ones he's +## asked to delete. +## +## This option should be used on a case by case basis, enabled via +## command line options or switches the applications offer. Changing +## the global default on a system where unattended actions are performed, +## may easily damage your system. +## +## CHANGING THE DEFAULT IS NOT RECOMMENDED. +## +## Valid values: boolean +## Default value: false +## +# solver.cleandepsOnRemove = false +## +## This file contains requirements/conflicts which fulfill the +## needs of a running system. +## For example the system would be broken if not glibc or kernel is +## installed. +## So the user will be informed if these packages will be deleted. +## +## Format: Each line represents one dependency: +## e.g. +## requires:kernel +## requires:glibc +## Default value: {configdir}/systemCheck +## +# solver.checkSystemFile = /etc/zypp/systemCheck +## +## This directory can contain files that contain requirements/conflicts +## which fulfill the needs of a running system (see checkSystemFile). +## +## Files are read in alphabetical order. +## +## Default value: {configdir}/systemCheck.d +## +# solver.checkSystemFileDir = /etc/zypp/systemCheck.d +## +## When committing a dist upgrade (e.g. 'zypper dup') a solver testcase +## is written to /var/log/updateTestcase-<date>. It is needed in bugreports. +## This option returns the number of testcases to keep on the system. Old +## cases will be deleted, as new ones are created. +## +## Use 0 to write no testcase at all, or -1 to keep all testcases. +## +## Valid values: Integer +## Default value: 2 +## +# solver.upgradeTestcasesToKeep = 2 +## +## Whether dist upgrade should remove a products dropped packages. +## +## A new product may suggest a list of old and no longer supported +## packages (dropped packages). Performing a dist upgrade the solver +## may try to delete them, even if they do not cause any dependency +## problem. +## +## Turning this option off, the solver will not try to remove those +## packages unless they actually do cause dependency trouble. You may +## do the cleanup manually, or simply leave them installed as long +## as you don't need the disk space. +## +## Valid values: Boolean +## Default value: true +## +# solver.upgradeRemoveDroppedPackages = true +## +## Packages which can be installed in different versions at the same time. +## +## Packages are selected either by name, or by provides. In the later case +## the string must start with "provides:" immediately followed by the capability. +## +## Example: +## kernel - just packages whith name 'kernel' +## provides:multiversion(kernel) - all packages providing 'multiversion(kernel)' +## (kenel and kmp packages should do this) +## Valid values: +## Comma separated list of packages. +## +## Default value: +## empty +## +multiversion = +## +## Defining directory which may contain additional multiversion definitions. +## +## If the directory exists, each file in this directory is scanned, expecting +## one valid multiversion list entry per line. Empty lines and lines starting +## with '#' are ignored. +## ------------------------- [/etc/zypp/multiversion.d/example file begin] ----------------------- +## # An alternate way to enable kernel packages being +## # installed in parallel: +## +## provides:multiversion(kernel) +## ------------------------- [/etc/zypp/multiversion.d/example file end] ----------------------- +## +## Valid values: A directory +## Default value: {configdir}/multiversion.d +## +# multiversiondir = /etc/zypp/multiversion.d +## Comma separated list of kernel packages to keep installed in parallel, if the +## above multiversion variable is set. Packages can be specified as +## 2.6.32.12-0.7 - Exact version to keep +## latest - Keep kernel with the highest version number +## latest-N - Keep kernel with the Nth highest version number +## running - Keep the running kernel +## oldest - Keep kernel with the lowest version number (the GA kernel) +## oldest+N - Keep kernel with the Nth lowest version number +## +## Note: This entry is not evaluated by libzypp, but by the +## purge-kernels service (via /sbin/purge-kernels). +## +## Default: Do not delete any kernels if multiversion = provides:multiversion(kernel) is set +multiversion.kernels = latest,latest-1,running +## +## Path to locks file. If not exist then is create. +## In this file is saved also UI locks. +## +## valid value: path to file or place where file can be created +## default value: {configdir}/locks +## +# locksfile.path = /etc/zypp/locks +## +## Whether to apply locks in locks file after zypp start. +## +## Valid values: boolean +## Default value: true +## +# locksfile.apply = true +## +## Where update items are stored +## (example: scripts, messages) +## +## Valid values: path to directory +## Default value: /var/adm +## +# update.datadir = /var/adm +## +## Where update messages are stored +## +## Valid values: path to directory +## Default value: {update.datadir}/update-messages +## +# update.messagesdir = /var/adm/update-messages +## +## Where update scripts are stored +## +## Valid values: path to directory +## Default value: {update.datadir}/update-scripts +## +# update.scriptsdir = /var/adm/update-scripts +## +## Command to be invoked to send update messages. +## +## Packages may leave an update message file in {update.messagesdir}. +## At the end of each commit, zypp collects those messages and may send +## a notification to the user. +## +## zypp will prepare the update messages according to the selected +## content format and pipe the content to the command. +## +## Format: +## single - For each update message invoke the command and send +## the message. +## none - For each update message invoke the command but don't +## use a pipe to send any data. You probably want to pass +## the message file on the commandline using %P (see +## Substitutions). +## digest - Single invocation of the command, sending the path +## names of all update message. One per line. +## bulk - Single invocation of the command, sending the +## concatenated content of all update messages, separated +## by Ctrl-L. +## +## Substitutions: +## %p - package identification (name-version-release.arch) +## %P - full path to the update message file +## +## Valid values: The value is specified as "format | command". +## An empty value will turn off any notification. +## +## Examples: single | mail -s 'Update message from %p' root +## none | my-send-script -f %P +## +## Default value: single | /usr/lib/zypp/notify-message -p %p +## +# update.messages.notify = single | /usr/lib/zypp/notify-message -p %p +## +## Options for package installation: excludedocs +## +## Don't install any files which are marked as documentation. +## +## Valid values: boolean +## Default value: no +## +# rpm.install.excludedocs = no +## +## Location of history log file. +## +## The history log is described at +## http://en.opensuse.org/Libzypp/Package_History +## +## Valid values: absolute path to a file +## Default value: /var/log/zypp/history +## +# history.logfile = /var/log/zypp/history +## +## Global credentials directory path. +## +## If a URL contains ?credentials=<filename> parameter, the credentials will +## be stored and looked for in a file named <filename> in this directory. +## +## Valid values: absolute path to a directory +## Default value: /etc/zypp/credentials.d +## +# credentials.global.dir = /etc/zypp/credentials.d +## +## Global credentials catalog file path. +## +## This file contains a catalog of all known user credentials which were +## not stored via the ?credentials=<filename> URL parameter, i.e. passed +## in URL as username:password component, or entered by user in +## an authentication dialog. +## +## Valid values: absolute path to a file +## Default value: /etc/zypp/credentials.cat +## +# credentials.global.file = /etc/zypp/credentials.cat +solver.onlyRequires=true +rpm.install.excludedocs=yes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/test/lib/cfa/zypp_conf_test.rb new/yast2-packager-3.2.11/test/lib/cfa/zypp_conf_test.rb --- old/yast2-packager-3.2.10/test/lib/cfa/zypp_conf_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-3.2.11/test/lib/cfa/zypp_conf_test.rb 2017-01-17 12:06:11.471301000 +0100 @@ -0,0 +1,51 @@ +#!/usr/bin/env rspec + +require_relative "../../test_helper" + +require "packager/cfa/zypp_conf" +require "tmpdir" + +describe Yast::Packager::CFA::ZyppConf do + ZYPP_CONF_EXAMPLE = FIXTURES_PATH.join("zypp/zypp.conf").freeze + ZYPP_CONF_EXPECTED = FIXTURES_PATH.join("zypp/zypp.conf.expected").freeze + + subject(:config) { Yast::Packager::CFA::ZyppConf.new } + let(:zypp_conf_path) { ZYPP_CONF_EXAMPLE } + + before do + stub_const("Yast::Packager::CFA::ZyppConf::PATH", zypp_conf_path) + end + + describe "#set_minimalistic!" do + before { config.load } + + it "sets minimalistic options" do + config.set_minimalistic! + main = config.section("main") + expect(main["solver.onlyRequires"]).to eq("true") + expect(main["rpm.install.excludedocs"]).to eq("yes") + expect(main["multiversion"]).to be_nil + end + end + + describe "#save" do + let(:tmpdir) { Dir.mktmpdir } + let(:zypp_conf_path) { File.join(tmpdir, "zypp.conf") } + let(:expected_content) { File.read(FIXTURES_PATH.join("zypp/zypp.conf.expected")) } + + before do + FileUtils.cp(ZYPP_CONF_EXAMPLE, File.join(tmpdir, "zypp.conf")) + config.load + end + + after do + FileUtils.remove_entry tmpdir + end + + it "modifies the file accordingly to given options" do + config.set_minimalistic! + config.save + expect(File.read(zypp_conf_path)).to eq(File.read(ZYPP_CONF_EXPECTED)) + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/test/packages_test.rb new/yast2-packager-3.2.11/test/packages_test.rb --- old/yast2-packager-3.2.10/test/packages_test.rb 2016-12-01 11:28:47.775752215 +0100 +++ new/yast2-packager-3.2.11/test/packages_test.rb 2017-01-17 12:06:11.471301000 +0100 @@ -82,10 +82,17 @@ end context "when no /proc/cmdline is defined" do - it "returns empty list" do + it "returns empty list when a Dell system is not detected" do expect(Yast::SCR).to receive(:Read).with(SCR_PROC_CMDLINE_PATH).and_return(nil) + expect(Yast::Packages).to receive(:DellSystem).and_return(false) expect(Yast::Packages.kernelCmdLinePackages).to eq([]) end + + it "returns biosdevname package when a Dell system is detected" do + expect(Yast::SCR).to receive(:Read).with(SCR_PROC_CMDLINE_PATH).and_return(nil) + expect(Yast::Packages).to receive(:DellSystem).and_return(true) + expect(Yast::Packages.kernelCmdLinePackages).to eq(["biosdevname"]) + end end context "when biosdevname behavior not defined on the Kernel command line" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.2.10/test/pkg_finish_test.rb new/yast2-packager-3.2.11/test/pkg_finish_test.rb --- old/yast2-packager-3.2.10/test/pkg_finish_test.rb 2016-12-01 11:28:47.787752215 +0100 +++ new/yast2-packager-3.2.11/test/pkg_finish_test.rb 2017-01-17 12:06:11.471301000 +0100 @@ -11,15 +11,20 @@ Yast.import "Pkg" Yast.import "Installation" Yast.import "WFM" + Yast.import "ProductFeatures" FAILED_PKGS_PATH = "/var/lib/YaST2/failed_packages" subject(:client) { Yast::PkgFinishClient.new } let(:repositories) { [] } + let(:minimalistic_libzypp_config) { false } before do allow(Yast::WFM).to receive(:Args).and_return(args) allow(::Packages::Repository).to receive(:enabled).and_return(repositories) + allow(Yast::ProductFeatures).to receive(:GetBooleanFeature) + .with("software", "minimalistic_libzypp_config") + .and_return(minimalistic_libzypp_config) end describe "Info" do @@ -38,6 +43,7 @@ let(:args) { ["Write"] } let(:destdir) { "/mnt" } let(:update) { false } + let(:zypp_conf) { double("zypp_conf", load: true, save: true, :set_minimalistic! => true) } before do allow(Yast::Installation).to receive(:destdir).and_return(destdir) @@ -46,6 +52,8 @@ allow(Yast::Pkg).to receive(:SourceLoad) allow(File).to receive(:exist?).and_call_original allow(File).to receive(:exist?).with(FAILED_PKGS_PATH).and_return(false) + allow(Yast::Packager::CFA::ZyppConf) + .to receive(:new).and_return(zypp_conf) end it "saves repository information" do @@ -196,6 +204,20 @@ expect(Yast::WFM).to receive(:call).with("inst_extrasources") client.run end + + context "if libzypp's minimalistic configuration is enabled" do + let(:minimalistic_libzypp_config) { true } + + it "sets libzypp configuration to be minimalistic" do + expect(zypp_conf).to receive(:set_minimalistic!) + client.run + end + end + + it "does not set libzypp configuration to be minimalistic" do + expect(zypp_conf).to_not receive(:set_minimalistic!) + client.run + end end end end