jenkins-bot has submitted this change and it was merged.

Change subject: Revert "checkoutMediaWiki: sudo as mwdeploy for most things"
......................................................................


Revert "checkoutMediaWiki: sudo as mwdeploy for most things"

This reverts commit 4e7f22c82ff96fd64d057fb29cbf39dc3aebca71.

Change-Id: I2ec91aa33e05c2dc367db8a6f6ba56be5397906b
---
M multiversion/checkoutMediaWiki.php
1 file changed, 7 insertions(+), 13 deletions(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/multiversion/checkoutMediaWiki.php 
b/multiversion/checkoutMediaWiki.php
index f5b4590..4dbaa30 100644
--- a/multiversion/checkoutMediaWiki.php
+++ b/multiversion/checkoutMediaWiki.php
@@ -35,13 +35,11 @@
                exit( 1 );
        }
 
-
-
        # MW install path
        $destIP = MEDIAWIKI_STAGING_DIR . "/$dstVersion";
 
        if ( !file_exists( $destIP ) ) {
-               sudo( 'git clone -n ' .
+               passthru( 'git clone -n ' .
                        'https://gerrit.wikimedia.org/r/p/mediawiki/core.git ' .
                        escapeshellarg( $destIP ),
                        $ret );
@@ -55,14 +53,14 @@
                        exit( 1 );
                }
 
-               sudo( 'git config branch.autosetuprebase always', $ret );
+               passthru( 'git config branch.autosetuprebase always', $ret );
                if ( $ret ) {
                        # Don't exit, this isn't a show-stopper
                        print "Error running setting autosetuprebase\n";
                }
 
                $checkoutVersion = $gitVersion == 'master' ? $gitVersion : 
"wmf/$gitVersion";
-               sudo( 'git checkout ' . escapeshellarg( $checkoutVersion ), 
$ret );
+               passthru( 'git checkout ' . escapeshellarg( $checkoutVersion ), 
$ret );
                if ( $ret ) {
                        print "Error checking out branch\n";
                        exit( 1 );
@@ -109,7 +107,7 @@
                                }
 
                                foreach ( $cmds as $cmd ) {
-                                       sudo( $cmd, $ret );
+                                       passthru( $cmd, $ret );
 
                                        if ( $ret ) {
                                                print "'${cmd}' failed in 
${path}\n";
@@ -120,7 +118,7 @@
                                chdir( $rawPath );
 
                                # Update submodules for checked out repos
-                               sudo( 'git submodule update --init --recursive' 
, $ret );
+                               passthru( 'git submodule update --init 
--recursive' , $ret );
 
                                if ( $ret ) {
                                        print "Submodule update failed in 
${dir}\n";
@@ -130,7 +128,7 @@
                        }
                }
 
-               sudo( 'git submodule update --init --recursive', $ret );
+               passthru( 'git submodule update --init --recursive', $ret );
                if ( $ret ) {
                        print "Error updating submodules\n";
                        exit( 1 );
@@ -142,7 +140,7 @@
                        print "Error finding list of submodules\n";
                } else {
                        foreach ( $submodules as $moduleName ) {
-                               sudo( "git config 
submodule.\"{$moduleName}\".update rebase", $ret );
+                               passthru( "git config 
submodule.\"{$moduleName}\".update rebase", $ret );
                                if ( $ret ) {
                                        print "Failed to set submodule 
\"{$moduleName}\" to rebase on update.\n";
                                }
@@ -217,7 +215,3 @@
        }
 }
 
-// Do stuff as mwdeploy
-function sudo( $cmd, &$ret ) {
-       passthru( "sudo -u mwdeploy $cmd", $ret );
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/253684
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ec91aa33e05c2dc367db8a6f6ba56be5397906b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: 20after4 <mmod...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to