Author: locilka Date: Tue Sep 11 16:04:48 2007 New Revision: 40853 URL: http://svn.opensuse.org/viewcvs/yast?rev=40853&view=rev Log: - Online repositories need to be added with unique alias (#309317). - 2.15.77 Modified: trunk/packager/VERSION trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/inst_productsources.ycp trunk/packager/src/include/checkmedia/ui.ycp Modified: trunk/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=40853&r1=40852&r2=40853&view=diff ============================================================================== --- trunk/packager/VERSION (original) +++ trunk/packager/VERSION Tue Sep 11 16:04:48 2007 @@ -1 +1 @@ -2.15.76 +2.15.77 Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=40853&r1=40852&r2=40853&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Sep 11 16:04:48 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Sep 11 16:02:49 CEST 2007 - locilka@suse.cz + +- Online repositories need to be added with unique alias (#309317). +- 2.15.77 + +------------------------------------------------------------------- Tue Sep 11 15:41:07 CEST 2007 - lslezak@suse.cz - Properly create the progress popup in ncurses so it can be closed Modified: trunk/packager/src/clients/inst_productsources.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/inst_productsources.ycp?rev=40853&r1=40852&r2=40853&view=diff ============================================================================== --- trunk/packager/src/clients/inst_productsources.ycp (original) +++ trunk/packager/src/clients/inst_productsources.ycp Tue Sep 11 16:04:48 2007 @@ -124,7 +124,33 @@ return sformat ("(%1|%2)", s_url, s_path); } + // See bugzilla #309317 + string GetUniqueAlias (string alias_orig) { + if (alias_orig == nil) alias_orig = ""; + + // all current aliases + list <string> aliases = maplist (integer i, Pkg::SourceGetCurrent(false), { + map info = Pkg::SourceGeneralData (i); + return info["alias"]:""; + }); + + // default + string alias = alias_orig; + + // repository alias must be unique + // if it already exists add "_<number>" suffix to it + integer idx = 1; + while (contains (aliases, alias)) { + alias = sformat("%1_%2", alias_orig, idx); + idx = idx + 1; + } + if (alias_orig != alias) { + y2milestone ("Alias '%1' changed to '%2'", alias_orig, alias); + } + + return alias; + } // See bugzilla #307680 // Proxy needs to be read from sysconfig and @@ -1089,7 +1115,9 @@ "name" : repo_name, "base_urls" : [url], "prod_dir" : pth, - "alias" : url, + // alias needs to be unique + // bugzilla #309317 + "alias" : GetUniqueAlias (url), "type" : repo_type, ]); } Modified: trunk/packager/src/include/checkmedia/ui.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/include/checkmedia/ui.ycp?rev=40853&r1=40852&r2=40853&view=diff ============================================================================== --- trunk/packager/src/include/checkmedia/ui.ycp (original) +++ trunk/packager/src/include/checkmedia/ui.ycp Tue Sep 11 16:04:48 2007 @@ -140,8 +140,17 @@ if (instmode == "cd" || instmode == "dvd") { + string cdrom_device = (string) SCR::Read(.etc.install_inf.Cdrom); + + // bugzilla #305495 + if (cdrom_device == nil || cdrom_device == "") { + y2error ("No Cdrom present in install.inf"); + // try to recover + return true; + } + // get CD device name - string bootcd = "/dev/" + (string)SCR::Read(.etc.install_inf.Cdrom); + string bootcd = "/dev/" + cdrom_device; // is the device mounted? list<map> mounts = (list<map>)SCR::Read(.proc.mounts); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org