lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re[2]: [lmi] Creating end-user packages for msw


From: Murphy, Kimberly
Subject: RE: Re[2]: [lmi] Creating end-user packages for msw
Date: Wed, 19 May 2010 10:41:09 -0400

Vadim Zeitlin wrote:

> On Thu, 13 May 2010 15:07:18 -0400 "Murphy, Kimberly" <address@hidden>
wrote:
> MK> It is based on local time. The default dates in 'workhorse.make' 
> MK> aren't ideal for our end-user packages. For example, let's assume 
> MK> today, 2010-05-13, we're packaging the month-end release for use 
> MK> on June 1st. I run 'make fardel' and a 
> 'lmi-20100513T1306Z' package 
> MK> is produced with an expiry of:
> MK> 
> MK> 2455329 2455377
> MK> [...]
>
>  I think both dates are too early simply because the offset 
> 2440587 used in
> workhorse.make is off by 1. This JDN corresponds to 
> 1969-12-31 date and not
> 1970-01-01 as I'd expect and as the number of seconds returned by +%s
> format specifier of date(1) counts from the latter date 
> ("Unix Epoch"), the
> result is one day too early. So I think we should simply use 2440588
> instead.
> [...]
> the same thing, of course, as this patch would do:
> 
> diff --git a/workhorse.make b/workhorse.make
> index 44fcb70..70361ac 100644
> --- a/workhorse.make
> +++ b/workhorse.make
> @@ -974,11 +974,10 @@ fardel_dir  := $(prefix)/$(fardel_name)
> 
>  fardel_date_script := \
>    d0=`$(DATE) +%Y-%m-01`; \
> -  d1=`$(DATE) --utc --date="$$d0 + 1 month         " +%s`; \
> -  d1=`$(DATE) --utc +%s`; \
> -  d2=`$(DATE) --utc --date="$$d0 + 2 months - 1 day" +%s`; \
> -  j1=`expr 2440587 + $$d1 / 86400`; \
> -  j2=`expr 2440587 + $$d2 / 86400`; \
> +  d1=`$(DATE) --utc --date="$$d0 + 1 month " +%s`; \
> +  d2=`$(DATE) --utc --date="$$d0 + 2 months" +%s`; \
> +  j1=`expr 2440588 + $$d1 / 86400`; \
> +  j2=`expr 2440588 + $$d2 / 86400`; \
>    echo -n "$$j1 $$j2" >expiry; \

Using this patch which fixes the JDN offset, 'make fardel' 
produces the desired begin and end dates. If I leave the 
second assignment to d1 in 'workhorse.make', an expiry with 
a begin date equal to the current date is produced. Both 
behaviors are befitting depending on the situation.

> MK> The actual expiry entered manually would be:
> MK> 
> MK> 2455349 2455379
> 
>  If we need the begin date to be the first of the following 
> month instead
> of the current date we should additionally remove the second 
> assignment to
> d1 in workhorse.make and use the first one, with "+ 1 month".

If the default in 'workhorse.make' is defined as the current date, 
then the custom script will need a way to remove the second 
assignment to d1, for those end-user packages which begin on the
first of the following month.

---------------------------------------------------------
This e-mail transmission may contain information that is 
proprietary, privileged and/or confidential and is
intended exclusively for the person(s) to whom it is
addressed. Any use, copying, retention or disclosure by
any person other than the intended recipient or the
intended recipient's designees is strictly prohibited. If
you are not the intended recipient or their designee,
please notify the sender immediately by return e-mail and
delete all copies.
---------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]