Bug 134832

Summary: [GTK] Simplify make-dist command line arguments
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, commit-queue, gns, gyuyoung.kim, pnormand, rakuco, sergio
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

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>