Mailinglist Archive: yast-commit (815 mails)

< Previous Next >
[yast-commit] r39973 - in /trunk/packager: package/yast2-packager.changes src/clients/inst_productsources.ycp
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Mon, 06 Aug 2007 09:33:53 -0000
  • Message-id: <20070806093354.0F023B588C@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Mon Aug  6 11:33:53 2007
New Revision: 39973

URL: http://svn.opensuse.org/viewcvs/yast?rev=39973&view=rev
Log:
- Using new Pkg::RepositoryAdd and Pkg::SourceRefreshNow functions
  that enables installation to set the repository name and alias
  before it is used (#297422).


Modified:
    trunk/packager/package/yast2-packager.changes
    trunk/packager/src/clients/inst_productsources.ycp

Modified: trunk/packager/package/yast2-packager.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=39973&r1=39972&r2=39973&view=diff
==============================================================================
--- trunk/packager/package/yast2-packager.changes (original)
+++ trunk/packager/package/yast2-packager.changes Mon Aug  6 11:33:53 2007
@@ -3,6 +3,9 @@
 
 - Added text into the license-confirmation dialog about where to
   find the license on the media (FATE #302018).
+- Using new Pkg::RepositoryAdd and Pkg::SourceRefreshNow functions
+  that enables installation to set the repository name and alias
+  before it is used (#297422).
 
 -------------------------------------------------------------------
 Thu Aug  2 21:13:04 CEST 2007 - locilka@xxxxxxx

Modified: trunk/packager/src/clients/inst_productsources.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/inst_productsources.ycp?rev=39973&r1=39972&r2=39973&view=diff
==============================================================================
--- trunk/packager/src/clients/inst_productsources.ycp (original)
+++ trunk/packager/src/clients/inst_productsources.ycp Mon Aug  6 11:33:53 2007
@@ -814,8 +814,15 @@
        return (symbol) dialog_ret;
     }
 
-    boolean CreateSource (string url, string pth) {
-       integer src_id = Pkg::SourceCreate (url, pth);
+    boolean CreateSource (string url, string pth, string repo_name) {
+       integer src_id = Pkg::RepositoryAdd ($[
+           "enabled" : true,
+           "name" : repo_name,
+           "base_urls" : url,
+           "prod_dir" : pth,
+           "alias" : url,
+       ]);
+
        if (src_id == nil) {
            Report::Error (sformat (
                // TRANSLATORS: pop-up error message
@@ -832,6 +839,8 @@
            return false;
        }
 
+       Pkg::SourceRefreshNow (src_id);
+
        if (Stage::initial()) {
            AddOnProduct::Integrate (src_id);
 
@@ -951,9 +960,15 @@
        foreach (string repo_id, repos_to_be_used, {
            // If not at once, call one stage per repository
            if (! at_once) Progress::NextStage();
-           CreateSource (list_of_repos[repo_id, "url"]:"", list_of_repos[repo_id, "path"]:"/");
+           CreateSource (
+               list_of_repos[repo_id, "url"]:"",
+               list_of_repos[repo_id, "path"]:"/",
+               GetLocalizedString (repo_id, ["summary", "name"])
+           );
        });
+
        
+
        // Redraw installation wizard
        if (Stage::initial()) {
            UpdateWizardSteps();
@@ -964,7 +979,7 @@
 
        Progress::Finish();
        sleep (600);
-
+       
        return `next;
     }
 

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages