Bug 134832 - [GTK] Simplify make-dist command line arguments
Summary: [GTK] Simplify make-dist command line arguments
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2014-07-11 06:22 PDT by Carlos Garcia Campos
Modified: 2014-07-21 02:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.94 KB, patch)
2014-07-11 06:29 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2014-07-11 06:22:23 PDT
It's a bit unconvenient to use, specially when launched manually
Comment 1 Carlos Garcia Campos 2014-07-11 06:29:15 PDT
Created attachment 234762 [details]
Patch

Now I can do:

Release$ ../../Tools/gtk/make-dist.py -s ../../ ../../Tools/gtk/manifest.txt

instead of:

Release$ ../../Tools/gtk/make-dist.py -c -s ../../ --build-dir=./ --tarball-root=/webkitgtk-2.5.1 -o webkitgtk-2.5.1.tar ../../Tools/gtk/manifest.txt
Comment 2 Martin Robinson 2014-07-11 07:52:31 PDT
Comment on attachment 234762 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234762&action=review

> Tools/gtk/make-dist.py:294
> +        tarball_root = "webkitgtk"

You don't need the leading slash?
Comment 3 Carlos Garcia Campos 2014-07-13 01:39:38 PDT
(In reply to comment #2)
> (From update of attachment 234762 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=234762&action=review
> 
> > Tools/gtk/make-dist.py:294
> > +        tarball_root = "webkitgtk"
> 
> You don't need the leading slash?

No, that's already normalized in the Manifest constructor
Comment 4 Martin Robinson 2014-07-13 11:46:46 PDT
Comment on attachment 234762 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234762&action=review

Looks good, but consider moving the code that calculate the current version.

> Tools/gtk/make-dist.py:303
> +            pkgconfig_file = os.path.join(arguments.build_dir, "Source/WebKit2/webkit2gtk-3.0.pc")
> +            if os.path.isfile(pkgconfig_file):
> +                p = subprocess.Popen(['pkg-config', '--modversion', pkgconfig_file], stdout=subprocess.PIPE)
> +                version = p.communicate()[0]
> +                if version:
> +                    tarball_root += '-' + version.rstrip('\n')

Would it make sense to move to this after argument parsing so that other parts of the code can use arguments.version safely in the future?
Comment 5 Carlos Garcia Campos 2014-07-21 02:05:28 PDT
Committed r171297: <http://trac.webkit.org/changeset/171297>