[tbb-commits] [Git][tpo/applications/tor-browser-build][maint-12.0] Bug 40790: Fix dmg2mar after dmg changes from #28124

Richard Pospesel (@richard) git at gitlab.torproject.org
Fri Feb 17 16:42:30 UTC 2023



Richard Pospesel pushed to branch maint-12.0 at The Tor Project / Applications / tor-browser-build


Commits:
f50bc8b7 by Nicolas Vigier at 2023-02-17T16:42:29+00:00
Bug 40790: Fix dmg2mar after dmg changes from #28124


(cherry picked from commit a22a592fe52e08fbd1e0f36b2940706a8160a669)
- - - - -


1 changed file:

- tools/dmg2mar


Changes:

=====================================
tools/dmg2mar
=====================================
@@ -128,9 +128,11 @@ sub convert_files {
         my $oldmar = getcwd . '/' . $output;
         exit_error "Error extracting $output"
                 unless system('mar', '-C', $tmpdir_oldmar, '-x', $oldmar) == 0;
+        my $appdir = "$tmpdir/$appname/$appname.app";
+        exit_error "Missing directory $appdir" unless -d $appdir;
         my $wanted = sub {
             my $file = $File::Find::name;
-            $file =~ s{^$tmpdir/$appname\.app/}{};
+            $file =~ s{^$appdir/}{};
             if (-f "$tmpdir_oldmar/$file") {
                 my (undef, undef, $mode) = stat("$tmpdir_oldmar/$file");
                 chmod $mode, $File::Find::name;
@@ -139,14 +141,14 @@ sub convert_files {
             chmod 0644, $File::Find::name if -f $File::Find::name;
             chmod 0755, $File::Find::name if -d $File::Find::name;
         };
-        find($wanted, "$tmpdir/$appname.app");
+        find($wanted, $appdir);
 
         unlink $output;
         local $ENV{MOZ_PRODUCT_VERSION} = $file->{version};
         local $ENV{MAR_CHANNEL_ID} = "torbrowser-torproject-$channel";
         local $ENV{TMPDIR} = $tmpdir;
         (undef, $err, $success) =  capture_exec('make_full_update.sh', '-q',
-                                        $output, "$tmpdir/$appname.app");
+                                        $output, $appdir);
         exit_error "Error updating $output: $err" unless $success;
         exit_error "make_full_update.sh failed. $output does not exist."
             unless -f $output;



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/f50bc8b7ad3548161f5c7d2ea00c8d1895049bd6

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/f50bc8b7ad3548161f5c7d2ea00c8d1895049bd6
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230217/0c30afc4/attachment-0001.htm>


More information about the tbb-commits mailing list