Author: lslezak Date: Thu Aug 16 14:44:36 2007 New Revision: 40319 URL: http://svn.opensuse.org/viewcvs/yast?rev=40319&view=rev Log: - Pkg::SourceCreate() - disable autorefresh for CD/DVD repositories (#300928) - 2.15.43 Modified: trunk/pkg-bindings/VERSION trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Source.cc Modified: trunk/pkg-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/VERSION?rev=40319&r1=40318&r2=40319&view=diff ============================================================================== --- trunk/pkg-bindings/VERSION (original) +++ trunk/pkg-bindings/VERSION Thu Aug 16 14:44:36 2007 @@ -1 +1 @@ -2.15.42 +2.15.43 Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=40319&r1=40318&r2=40319&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Thu Aug 16 14:44:36 2007 @@ -4,6 +4,9 @@ - return history of exceptions in Pkg::LastError() result (#299716) - Pkg::SourceCreate() - use the last path component from URL as name (#299816) +- Pkg::SourceCreate() - disable autorefresh for CD/DVD repositories + (#300928) +- 2.15.43 ------------------------------------------------------------------- Thu Aug 9 10:20:08 CEST 2007 - lslezak@suse.cz Modified: trunk/pkg-bindings/src/Source.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source.cc?rev=40319&r1=40318&r2=40319&view=diff ============================================================================== --- trunk/pkg-bindings/src/Source.cc (original) +++ trunk/pkg-bindings/src/Source.cc Thu Aug 16 14:44:36 2007 @@ -1569,13 +1569,22 @@ // add read only mount option to the URL if needed url = addRO(url); + bool autorefresh = true; + + std::string scheme = zypp::str::toLower(url.getScheme()); + if (scheme == "cd" || scheme == "dvd") + { + y2milestone("Disabling autorefresh for CD/DVD repository"); + autorefresh = false; + } + repo.setAlias(alias); repo.setName(name); repo.setType(repotype); repo.addBaseUrl(url); repo.setPath(path_r); repo.setEnabled(true); - repo.setAutorefresh(true); + repo.setAutorefresh(autorefresh); y2milestone("Adding source '%s' (%s)", repo.alias().c_str(), url.asString().c_str()); // note: exceptions should be caught by the calling code -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org