Skip to contentSkip to conversation

package: make package download from Mercurial repositories more robust

PATCH New Mathias De Maré 3 participants 5 messages Dec 10, 2013 – Dec 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package: make package download from Mercurial repositories more robust

Previously, when cloning a Mercurial repository,
aborting the clone could (in some cases) leave behind an empty directory. As a result, a later clone would fail.

---
 package/pkg-download.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-download.mk +1 -0
index 758b211..c00689b 100644
@@ -178,6 +178,7 @@ endef
 define DOWNLOAD_HG
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
 	(pushd $(DL_DIR) > /dev/null && \
+	rm -rf $($(PKG)_BASE_NAME) && \
 	$(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
 	$(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
 	              --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 package: make package download from Mercurial repositories more robust

Quoted 14 lines · Mathias De Mar?

Previously, when cloning a Mercurial repository,
aborting the clone could (in some cases) leave behind an empty directory. As a result, a later clone would fail.

---
 package/pkg-download.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-download.mk +0 -0
index 758b211..c00689b 100644

package/pkg-download.mk endef · line 184

Quoted 7 lines
package/pkg-download.mk +1 -0
@@ -178,6 +178,7 @@ endef
 define DOWNLOAD_HG
        test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
        (pushd $(DL_DIR) > /dev/null && \
+       rm -rf $($(PKG)_BASE_NAME) && \
        $(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
        $(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
                      --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \
#2 lore raw

PATCH 1/1 package: make package download from Mercurial repositories more robust

Quoted 11 lines · Thomas De Schampheleire
Quoted 9 lines · Mathias De Mar?

Previously, when cloning a Mercurial repository,
aborting the clone could (in some cases) leave behind an empty directory. As a result, a later clone would fail.

---
 package/pkg-download.mk | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

package/pkg-download.mk endef · line 184

Quoted 12 lines
package/pkg-download.mk +1 -0
index 758b211..c00689b 100644
@@ -178,6 +178,7 @@ endef
 define DOWNLOAD_HG
        test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
        (pushd $(DL_DIR) > /dev/null && \
+       rm -rf $($(PKG)_BASE_NAME) && \
        $(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
        $(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
                      --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \

It seems that patchwork did not pick up this ack, nor the reply itself... Is this a known issue?

#3 lore raw

PATCH 1/1 package: make package download from Mercurial repositories more robust

Hello,

should I do anything extra to get this patch into buildroot?

Greetings,
Mathias

Quoted 26 lines · Thomas De Schampheleire
Quoted 4 lines · Thomas De Schampheleire
Quoted 2 lines · Mathias De Mar?

Previously, when cloning a Mercurial repository, aborting the clone could (in some cases) leave behind an empty

directory.

Quoted 7 lines
Quoted 7 lines

As a result, a later clone would fail.

---
 package/pkg-download.mk | 1 +
 1 file changed, 1 insertion(+)
Quoted 10 lines

package/pkg-download.mk endef · line 182

Quoted 10 lines
package/pkg-download.mk +1 -0
index 758b211..c00689b 100644
@@ -178,6 +178,7 @@ endef
 define DOWNLOAD_HG
        test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
        (pushd $(DL_DIR) > /dev/null && \
+       rm -rf $($(PKG)_BASE_NAME) && \
        $(HG) clone --noupdate --rev $($(PKG)_DL_VERSION)

$($(PKG)_SITE) $($(PKG)_BASE_NAME) && \

Quoted 1 line

package/pkg-download.mk endef · line 183

Quoted 1 line
package/pkg-download.mk +0 -0
        $(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz
Quoted 9 lines

--prefix $($(PKG)_BASE_NAME)/ \

Quoted 1 line

package/pkg-download.mk endef · line 184

Quoted 1 line
package/pkg-download.mk +0 -0
                      --rev $($(PKG)_DL_VERSION)

$(DL_DIR)/$($(PKG)_SOURCE) && \

Quoted 2 lines

It seems that patchwork did not pick up this ack, nor the reply itself... Is this a known issue?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131216/879c8805/attachment.html>

#4 lore raw

PATCH 1/1 package: make package download from Mercurial repositories more robust

In reply to Mathias De Maré

Dear Mathias De Mar?,

Quoted 8 lines · Mathias De Mar?

Previously, when cloning a Mercurial repository,
aborting the clone could (in some cases) leave behind an empty directory. As a result, a later clone would fail.

---
 package/pkg-download.mk | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks. I've manually added Thomas DS Acked-by, since it was not automatically picked up by patchwork for some reason.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com