Permalink
Browse files

Fix script against new module layout.

  • Loading branch information...
1 parent b8b2832 commit 37231ed2e1fc85cbd59c7f4630b4490eda70a906 @ochameau committed Mar 19, 2013
Showing with 8 additions and 2 deletions.
  1. +1 −0 scripts/unzip-amo.sh
  2. +7 −2 unpack.py
View
@@ -18,6 +18,7 @@ do
# echo $XPI $KIND $ID
DST_DIR=$SRC_DIR/$KIND/$ID
mkdir -p $DST_DIR
+ echo $XPI $DST_DIR
unzip $XPI $DST_DIR && echo "unziped $ID" || echo "Failed to unzip $ID"
# unzip -oq $XPI -d $DST_DIR || echo "Failed to unzip $ID"
done
View
@@ -142,7 +142,7 @@ def processEntry(entry):
return
# We do not care about SDK packages dependencies
- if packageName in ["addon-kit", "api-utils"]:
+ if packageName in ["addon-sdk", "addon-kit", "api-utils"]:
return
requirements = None
@@ -166,6 +166,8 @@ def processEntry(entry):
addModule("api-utils", "unload")
elif reqname == "@loader/options":
()
+ elif reqname == "@l10n/data":
+ ()
else:
key = None
if "path" in val: # SDK >= 1.4
@@ -268,7 +270,7 @@ def getJidPrefix(manifest):
# )
def getPackagesFiles(zip, version, manifest, package):
packagePath = None
- parts = version.split(".")
+ parts = re.sub(r'(b|rc)\d+', '', version).split(".")
if int(parts[0]) >= 1 and int(parts[1]) >= 4:
# SDK >=1.4 have simplified resources folder layout
packagePath = package
@@ -331,6 +333,7 @@ def processAddon(path, args):
print path + "; " + version + "; " + res + "; " + json.dumps(bad_files)
elif args.action == "unpack":
+ bad_files = []
try:
bad_files = verify_addon(zip, version, manifest)
except Exception, e:
@@ -343,6 +346,7 @@ def processAddon(path, args):
print path + " unpacked to " + args.target
elif args.action == "repack":
+ bad_files = []
try:
bad_files = verify_addon(zip, version, manifest)
except Exception, e:
@@ -361,6 +365,7 @@ def processAddon(path, args):
print_diff(path, repacked_path, args.diffstat)
elif args.action == "repackability":
+ bad_files = []
try:
bad_files = verify_addon(zip, version, manifest)
except Exception, e:

0 comments on commit 37231ed

Please sign in to comment.