[wpkg-users] [Bug 55] New: /noremove patch

bugzilla-daemon at wpkg.org bugzilla-daemon at wpkg.org
Thu Jan 25 21:48:03 CET 2007


Please reply using this URL only: http://bugs.wpkg.org/show_bug.cgi?id=55

           Summary: /noremove patch
           Product: WPKG
           Version: 0.9.10
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: wpkg.js
        AssignedTo: mangoo at mch.one.pl
        ReportedBy: mangoo at mch.one.pl
         QAContact: wpkg-users at lists.wpkg.org


Well - i made a small patch, to that I can use wpkg as I need to.
I added the argument /noremove
It prevents any removal of packages so I will never remove packages when 
I use /synchronize. In that manner I can use profiles to add software - 
without removing.
This is my first .js - so bare with me..
/Thomas

--- wpkg-0.9.10.js    Mon Jul 10 19:47:14 2006
+++ wpkg.js    Thu Jan 25 20:41:16 2007
@@ -99,6 +99,7 @@
 var err_summary = "";
 var debug = false;
 var dryrun = false;
+var noremove = false;
 
 var quiet = false;
 var profile;
@@ -220,6 +221,11 @@
         forceInstall = true;
     }
    
+    // process property named arguments that set values
+    if (isArgSet(argv, "/noremove")) {
+        noremove = true;
+    }
+   
     if (argn("rebootcmd") != null) {
         rebootCmd=(argn("rebootcmd"));
     }
@@ -597,7 +603,7 @@
     if (found) {
             dinfo("Checked removal of package: " + packageName);
             notifyUserStart();
-            removePackage(removablesArray[i]);
+            if (!noremove) removePackage(removablesArray[i]);
     } else {
           if (quitonerror) {
                 throw new Error("Installation error while synchronizing " +
@@ -919,7 +925,7 @@
         return;
     }
    
-    removePackage(node);
+    if (!noremove) removePackage(node);
 }

-- 
Configure bugmail: http://bugs.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.






_______________________________________________
wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list