xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion
@ 2015-06-23 16:06 Ian Campbell
  2015-06-23 16:06 ` [PATCH OSSTEST 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate Ian Campbell
  2015-06-25 10:34 ` [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion Ian Jackson
  0 siblings, 2 replies; 5+ messages in thread
From: Ian Campbell @ 2015-06-23 16:06 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

That is, the date without the suite suffix.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 mg-debian-installer-update | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index ba2fdc4..59f05ec 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -68,8 +68,8 @@ esac
 pfile=$sbase/non-free/binary-$arch/Packages.gz
 
 dstroot=`getconfig TftpPath`/`getconfig TftpDiBase`/
-date=`date +%Y-%m-%d`-$suite
-dst=$arch/$date
+date=`date +%Y-%m-%d`
+dst=$arch/$date-$suite
 
 cd $dstroot
 mkdir -p $dst
@@ -197,5 +197,5 @@ rm Packages.gz
 #ln -s $date current.new
 #mv -Tf current.new current
 
-echo $date
-echo >&2 "downloaded $dstroot/$arch/$date"
+echo "New TftpDiVersion: $date"
+echo >&2 "downloaded $dstroot/$dst"
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH OSSTEST 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate
  2015-06-23 16:06 [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion Ian Campbell
@ 2015-06-23 16:06 ` Ian Campbell
  2015-06-25 10:35   ` Ian Jackson
  2015-06-25 10:34 ` [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion Ian Jackson
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2015-06-23 16:06 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Where "appropriate" means if TftpDiVersion is set to current, which is
the default in standalone mode. The assumption is that someone wuth
that configration runs mg-debian-installer-update then they would
expected the update to be immediately effective.

There was some existing, but commented, code to do this update,
reinstate it with the correct condition and adjusting for the addition
of -$suite to the patch many moons ago.

There is no impact on any production configuration, since they always
set TftpDiVersion.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 mg-debian-installer-update | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index 59f05ec..f7a954a 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -67,6 +67,7 @@ esac
 
 pfile=$sbase/non-free/binary-$arch/Packages.gz
 
+tftpdiversion=`getconfig TftpDiVersion`
 dstroot=`getconfig TftpPath`/`getconfig TftpDiBase`/
 date=`date +%Y-%m-%d`
 dst=$arch/$date-$suite
@@ -192,10 +193,12 @@ done
 
 rm Packages.gz
 
-#cd $dstroot/$arch
-#rm -rf current.new
-#ln -s $date current.new
-#mv -Tf current.new current
+if [ x$tftpdiversion = xcurrent ]; then
+    cd $dstroot/$arch
+    rm -rf current-$suite.new
+    ln -s $date-$suite current-$suite.new
+    mv -Tf current-$suite.new current-$suite
+fi
 
 echo "New TftpDiVersion: $date"
 echo >&2 "downloaded $dstroot/$dst"
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion
  2015-06-23 16:06 [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion Ian Campbell
  2015-06-23 16:06 ` [PATCH OSSTEST 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate Ian Campbell
@ 2015-06-25 10:34 ` Ian Jackson
  2015-06-25 11:26   ` Ian Campbell
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2015-06-25 10:34 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion"):
> That is, the date without the suite suffix.
...
> -echo $date
> -echo >&2 "downloaded $dstroot/$arch/$date"
> +echo "New TftpDiVersion: $date"
> +echo >&2 "downloaded $dstroot/$dst"

You could make the output suitable for c&p ?

  +echo "TftpDiVersion $date"

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH OSSTEST 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate
  2015-06-23 16:06 ` [PATCH OSSTEST 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate Ian Campbell
@ 2015-06-25 10:35   ` Ian Jackson
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2015-06-25 10:35 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate"):
> Where "appropriate" means if TftpDiVersion is set to current, which is
> the default in standalone mode. The assumption is that someone wuth
> that configration runs mg-debian-installer-update then they would
> expected the update to be immediately effective.
> 
> There was some existing, but commented, code to do this update,
> reinstate it with the correct condition and adjusting for the addition
> of -$suite to the patch many moons ago.
> 
> There is no impact on any production configuration, since they always
> set TftpDiVersion.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion
  2015-06-25 10:34 ` [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion Ian Jackson
@ 2015-06-25 11:26   ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-06-25 11:26 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Thu, 2015-06-25 at 11:34 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion"):
> > That is, the date without the suite suffix.
> ...
> > -echo $date
> > -echo >&2 "downloaded $dstroot/$arch/$date"
> > +echo "New TftpDiVersion: $date"
> > +echo >&2 "downloaded $dstroot/$dst"
> 
> You could make the output suitable for c&p ?
> 
>   +echo "TftpDiVersion $date"

Good idea. Shall I resend or just do it on commit?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-25 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 16:06 [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion Ian Campbell
2015-06-23 16:06 ` [PATCH OSSTEST 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate Ian Campbell
2015-06-25 10:35   ` Ian Jackson
2015-06-25 10:34 ` [PATCH OSSTEST 1/2] mg-debian-installer-update: Print the correct value for TftpDiVersion Ian Jackson
2015-06-25 11:26   ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).