Commit Graph

21 Commits

Author SHA1 Message Date
Elias Probst
d657b9ee86 Bug 1293234 - Use octal notation for permission modes in the build system; r=gps
As of Python 3, decimal notations of octal values for permission modes
are no longer permitted and will result in a `SyntaxError` exception
(`invalid token`).

Using the proper octal notation which is also Python 2.7 compatible will
fix this issue.
2016-08-08 13:45:17 +02:00
Nick Alexander
2d70746d4a Bug 1260241 - Pre: Add compress option to Jarrer.add. r=glandium
MozReview-Commit-ID: FWXeBOi9FTY
2016-03-28 19:02:05 -07:00
Mike Hommey
5112a4f23d Bug 1241398 - Remove the FilePurger class. r=gps
Its only last use was removed.
2016-01-22 07:00:23 +09:00
Mike Hommey
6b5d97726a Bug 1230060 - Allow to restrict what unaccounted files to remove when copying from a FileCopier. r=gps
The default behavior for a FileCopier's copy is to remove all the files and
directories in the destination that aren't in its registry.

The remove_unaccounted argument can be passed as False to disable this
behavior.

This change adds another possibility, where remove_unaccounted may be a
FileRegistry, in which case only the files in that registry are removed.

This allows to e.g. only remove files that were copied from a previous
FileCopier.copy, leaving aside files that were in the destination for some
other reason.
2015-12-05 11:04:21 +09:00
Carsten "Tomcat" Book
d65875b031 Backed out changeset 0dcea48cbf38 (bug 1230060) for bustage due to race conditions of some sort 2015-12-04 15:18:07 +01:00
Mike Hommey
2f06389354 Bug 1230060 - Allow to restrict what unaccounted files to remove when copying from a FileCopier. r=gps
The default behavior for a FileCopier's copy is to remove all the files and
directories in the destination that aren't in its registry.

The remove_unaccounted argument can be passed as False to disable this
behavior.

This change adds another possibility, where remove_unaccounted may be a
FileRegistry, in which case only the files in that registry are removed.

This allows to e.g. only remove files that were copied from a previous
FileCopier.copy, leaving aside files that were in the destination for some
other reason.
2015-12-04 19:25:42 +09:00
Mike Hommey
68bedfffa9 Bug 1216371 - Add a proxy class to access a subtree of a FileRegistry as an independent FileRegistry. r=gps 2015-11-19 08:05:51 +09:00
Chris Manchester
096aebf086 Bug 1224411 - Speed up FileRegistry._partial_paths by memoizing on the basis of directory. r=nalexander
This function was found to be a little slow while profiling due to repeated calls to
mozpath.dirname. This patch speeds up the function replacing dirname with string manipulation
(these paths are already normalized), by caching results on the basis of directory,
and converting from iteration to recursion to increase use of the cache.

This commit speeds up the "install tests" step run as a part of the build and running
tests by ~10% on a fast linux laptop.
2015-11-13 16:14:40 -08:00
Mike Hommey
2e51d2ef87 Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
Back when mozpack.path was added, it was used as:

  import mozpack.path
  mozpack.path.func()

Nowadays, the common idiom is:

  import mozpack.path as mozpath
  mozpath.func()

because it's shorter.

$ git grep mozpath\\. | wc -l
423
$ git grep mozpack.path\\. | wc -l
123

This change was done with:
$ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g'
$ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/'
$ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
2015-03-27 08:13:16 +09:00
Nick Alexander
9347026ba6 Bug 971525 - Optionally make FileCopier only delete symlinked directories it needs to replace. r=gps 2014-02-13 22:19:48 -08:00
Nick Alexander
577d27d59f Bug 971272 - Post: Add informational test showing unnecessary directories may be created. r=gps 2014-02-13 09:09:09 -08:00
Nick Alexander
7ce0a8041d Bug 971272 - Part 2: Expose FileRegistry.required_directories. r=gps 2014-02-13 09:09:08 -08:00
Nick Alexander
a266af3f79 Bug 971272 - Part 1: Guard against adding {foo, foo/bar} to FileRegistry. r=gps
This already raised if the order was [foo, foo/bar].  But it didn't
prevent adding [foo/bar, foo].

The only sub-classes of FileRegistry are FileCopier and Jarrer.

FileCopier.copy threw in the previously unhandled case: the order of
creation is the same as the order of addition, so that foo is created
after foo/bar.

A zip file index can contain both foo and foo/bar.  I don't think we
should rely on this property in our use of Jarrer, but if we already do,
I guess we need to move these guards into FileCopier.  Let's hope that's
not the case!

(For the record: On my Mac OS X system, unzipping such a zip file
prompts the user for what to do, depending on the order of the entries
in the zip index.)
2014-02-13 09:09:08 -08:00
Nick Alexander
4dd3ef64d9 Bug 971265 - Add --no-remove-empty-directories to process_install_manifest.py. r=gps 2014-02-13 09:09:08 -08:00
Gregory Szorc
ddb90ab40d Bug 918392 - Handle symlinked directories properly; r=glandium 2013-09-24 10:44:27 -07:00
Gregory Szorc
1731428768 Bug 911362 - FileCopier support for not removing unreferenced files; r=glandium 2013-09-03 19:38:07 -07:00
Gregory Szorc
9c6f45b732 Bug 890097 - Part 3: Capture detailed information for FileCopier actions; r=glandium 2013-07-23 14:37:04 -07:00
Gregory Szorc
4ab8c3f766 Bug 884587 - Part 0: Teach FileCopier how to remove unwritable files on Windows; r=glandium 2013-06-28 14:46:56 -07:00
Gregory Szorc
c779cac9bd Bug 884569 - Support for removing untracked files from a directory; r=glandium 2013-06-19 19:57:48 -07:00
Mike Hommey
0db6eb8e66 Bug 835309 - Look at .xpi file contents when unifying them for universal builds. r=gps 2013-02-03 07:19:15 +01:00
Mike Hommey
8d6a15b2f6 Bug 780561 - Unit tests for the new packager code. r=ted,r=gps 2013-01-23 11:23:14 +01:00