Merge lp:~frankban/juju-gui/distfile-fixes into lp:juju-gui/experimental

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 288
Proposed branch: lp:~frankban/juju-gui/distfile-fixes
Merge into: lp:juju-gui/experimental
Diff against target: 15 lines (+3/-2)
1 file modified
Makefile (+3/-2)
To merge this branch: bzr merge lp:~frankban/juju-gui/distfile-fixes
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+140662@code.launchpad.net

Description of the change

Fix broken symbolic links in release tarballs.

Now, when the release is created (make distfile) the symbolic links
are followed.

Another solution could be to create relative links in "make build*".
However, I preferred to dereference the links for two reasons:
- it is simple;
- it allows uncompresing our release also in filesystems not supporting
  symlinks.

https://codereview.appspot.com/6962044/

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :

Reviewers: mp+140662_code.launchpad.net,

Message:
Please take a look.

Description:
Fix broken symbolic links in release tarballs.

Now, when the release is created (make distfile) the symbolic links
are followed.

Another solution could be to create relative links in "make build*".
However, I preferred to dereference the links for two reasons:
- it is simple;
- it allows uncompresing our release also in filesystems not supporting
   symlinks.

https://code.launchpad.net/~frankban/juju-gui/distfile-fixes/+merge/140662

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/6962044/

Affected files:
   M Makefile
   A [revision details]

Index: Makefile
=== modified file 'Makefile'
--- Makefile 2012-12-18 22:18:29 +0000
+++ Makefile 2012-12-19 12:09:20 +0000
@@ -399,8 +399,9 @@
   @echo "$(BRANCH_IS_CLEAN)"
  ifdef BRANCH_IS_GOOD
   mkdir -p releases
- tar c --auto-compress --exclude-vcs --exclude releases \
- --transform "s|^|$(RELEASE_NAME)/|" -f $(RELEASE_FILE) *
+ # When creating the tarball, ensure all symbolic links are followed.
+ tar -c --auto-compress --exclude-vcs --exclude releases \
+ --dereference --transform "s|^|$(RELEASE_NAME)/|" -f $(RELEASE_FILE) *
   @echo "Release was created in $(RELEASE_FILE)."
  else
   @echo "**************************************************************"

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision:
<email address hidden>

Revision history for this message
Gary Poster (gary) wrote :

Land as is.

Very nice. Didn't know about that option. Thank you.

Gary

https://codereview.appspot.com/6962044/

Revision history for this message
Francesco Banconi (frankban) wrote :

Benji, Gary, thanks for the reviews.

https://codereview.appspot.com/6962044/

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Fix broken symbolic links in release tarballs.

Now, when the release is created (make distfile) the symbolic links
are followed.

Another solution could be to create relative links in "make build*".
However, I preferred to dereference the links for two reasons:
- it is simple;
- it allows uncompresing our release also in filesystems not supporting
   symlinks.

R=benji, gary.poster
CC=
https://codereview.appspot.com/6962044

https://codereview.appspot.com/6962044/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2012-12-18 22:18:29 +0000
3+++ Makefile 2012-12-19 13:09:29 +0000
4@@ -399,8 +399,9 @@
5 @echo "$(BRANCH_IS_CLEAN)"
6 ifdef BRANCH_IS_GOOD
7 mkdir -p releases
8- tar c --auto-compress --exclude-vcs --exclude releases \
9- --transform "s|^|$(RELEASE_NAME)/|" -f $(RELEASE_FILE) *
10+ # When creating the tarball, ensure all symbolic links are followed.
11+ tar -c --auto-compress --exclude-vcs --exclude releases \
12+ --dereference --transform "s|^|$(RELEASE_NAME)/|" -f $(RELEASE_FILE) *
13 @echo "Release was created in $(RELEASE_FILE)."
14 else
15 @echo "**************************************************************"

Subscribers

People subscribed via source and target branches