Issue #19 - fix ldm so that it will handle both date and sequence substitutions correctly.
Former-commit-id:8a4c883e0b
[formerly8a4c883e0b
[formerly efc134f920b0cc0e493d74f1bb14b22fdc8013ca]] Former-commit-id:31f989ecb4
Former-commit-id:81a360d139
This commit is contained in:
parent
1929f1df8e
commit
339d963f90
2 changed files with 51 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
Name: awips2-ldm
|
||||
Summary: AWIPS II LDM Distribution
|
||||
Version: 6.8.1
|
||||
Release: 18
|
||||
Release: 19
|
||||
Group: AWIPSII
|
||||
BuildRoot: /tmp
|
||||
URL: N/A
|
||||
|
@ -65,6 +65,9 @@ cp ${WORKSPACE_DIR}/${LDM_TAR_DIR}/ldm-6.8.1.patch0 \
|
|||
# Copy patch1 to the build directory.
|
||||
cp ${WORKSPACE_DIR}/${LDM_TAR_DIR}/ldm-6.8.1.patch1 \
|
||||
${LDM_BUILD_DIR}
|
||||
# Copy patch2 to the build directory.
|
||||
cp ${WORKSPACE_DIR}/${LDM_TAR_DIR}/ldm-6.8.1.patch2 \
|
||||
${LDM_BUILD_DIR}
|
||||
cd ${LDM_BUILD_DIR}
|
||||
tar -xvf ${LDM_TAR_FILE}
|
||||
# remove the copied tar file
|
||||
|
@ -81,6 +84,11 @@ patch -p1 < ../ldm-6.8.1.patch1
|
|||
# remove the patch file
|
||||
rm -f ../ldm-6.8.1.patch1
|
||||
|
||||
patch -p1 < ../ldm-6.8.1.patch2
|
||||
|
||||
# remove the patch file.
|
||||
rm -f ../ldm-6.8.1.patch2
|
||||
|
||||
%build
|
||||
LDM_BUILD_DIR="/tmp/awips2-${USER}/ldm-build"
|
||||
LDM_TAR_DIR="Installer.rpm/awips2.core/Installer.ldm/src"
|
||||
|
|
42
rpms/awips2.core/Installer.ldm/src/ldm-6.8.1.patch2
Normal file
42
rpms/awips2.core/Installer.ldm/src/ldm-6.8.1.patch2
Normal file
|
@ -0,0 +1,42 @@
|
|||
diff -crB ldm-6.8.1/src/pqact/palt.c ldm-6.8.1-patch2/src/pqact/palt.c
|
||||
*** ldm-6.8.1/src/pqact/palt.c 2012-03-21 14:43:55.000000000 -0500
|
||||
--- ldm-6.8.1-patch2/src/pqact/palt.c 2012-03-21 14:48:12.000000000 -0500
|
||||
***************
|
||||
*** 1148,1153 ****
|
||||
--- 1148,1154 ----
|
||||
*/
|
||||
static char buf1[_POSIX_ARG_MAX];
|
||||
static char buf2[_POSIX_ARG_MAX];
|
||||
+ static char final_buf[_POSIX_ARG_MAX];
|
||||
static char* argv[1 + _POSIX_ARG_MAX/2];
|
||||
|
||||
regsub(pal, prod->info.ident, buf1);
|
||||
***************
|
||||
*** 1159,1171 ****
|
||||
date_sub(buf2, buf1, prod->info.arrival.tv_sec);
|
||||
buf1[sizeof(buf1)-1] = 0;
|
||||
|
||||
! seq_sub(buf2, buf1, prod->info.seqno);
|
||||
! buf1[sizeof(buf1) -1] = 0;
|
||||
|
||||
if (ulogIsVerbose())
|
||||
! uinfo(" %s: %s and the ident is %s", s_actiont(&pal->action), buf1, prod->info.ident);
|
||||
|
||||
! argc = tokenize(buf1, argv, ARRAYLEN(argv));
|
||||
|
||||
if (argc < ARRAYLEN(argv))
|
||||
{
|
||||
--- 1160,1172 ----
|
||||
date_sub(buf2, buf1, prod->info.arrival.tv_sec);
|
||||
buf1[sizeof(buf1)-1] = 0;
|
||||
|
||||
! seq_sub(buf1, final_buf, prod->info.seqno);
|
||||
! final_buf[sizeof(final_buf) -1] = 0;
|
||||
|
||||
if (ulogIsVerbose())
|
||||
! uinfo(" %s: %s and the ident is %s", s_actiont(&pal->action), final_buf, prod->info.ident);
|
||||
|
||||
! argc = tokenize(final_buf, argv, ARRAYLEN(argv));
|
||||
|
||||
if (argc < ARRAYLEN(argv))
|
||||
{
|
Loading…
Add table
Reference in a new issue