Opened 11 years ago

Closed 11 years ago

#1946 closed defect (fixed)

wingrass: demolocation includes .svn/ cruft

Reported by: hamish Owned by: grass-dev@…
Priority: trivial Milestone: 6.4.3
Component: Packaging Version: svn-develbranch6
Keywords: wingrass Cc:
CPU: x86-32 Platform: MSWindows XP

Description

the nightly build wingrass installers ship '.svn/' files for the demolocation.

perhaps somewhere needs to do 'svn export' not 'svn checkout'?

thanks, Hamish

Change History (21)

in reply to:  description ; comment:1 by neteler, 11 years ago

Replying to hamish:

the nightly build wingrass installers ship '.svn/' files for the demolocation.

To better understand: is it a problem?

in reply to:  1 comment:2 by hamish, 11 years ago

Replying to neteler:

Replying to hamish:

the nightly build wingrass installers ship '.svn/' files for the demolocation.

To better understand: is it a problem?

It does not cause breakage, but it should be removed.

Hamish

comment:3 by martinl, 11 years ago

Priority: normaltrivial

comment:4 by hamish, 11 years ago

please don't ignore it. it's a 2 minute job and these things make us look unprofessional.

thanks, Hamish

in reply to:  4 ; comment:5 by martinl, 11 years ago

Replying to hamish:

please don't ignore it. it's a 2 minute job and these things make us look unprofessional.

huh, "trivial" means ignoring? if it's a 2 minute job, feel free to fix it. Martin

comment:6 by hamish, 11 years ago

.. it seemed to be going that way. Yes, I had a look at fixing it myself before filing the ticket, but couldn't see where in src:mswindows/ and addons:tools/wingrass-packager/ it was done. Any hints?

thanks, Hamish

in reply to:  6 comment:7 by hellik, 11 years ago

Replying to hamish:

.. it seemed to be going that way. Yes, I had a look at fixing it myself before filing the ticket, but couldn't see where in src:mswindows/ and addons:tools/wingrass-packager/ it was done. Any hints?

http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi.tmpl#L13

Helmut

comment:8 by hamish, 11 years ago

so, IIUC, the packager does a 'svn up' on their machine into a local C:\osgeo4w dir, then the packaging script recursively copies from within that checked out source tree?

http://trac.osgeo.org/grass/wiki/CompileOnWindows#CreatetheWinGRASSInstaller

Line 586 of GRASS-Installer.nsi.tmpl has:

File /r ${DEMOLOCATION_PATH}\*.*

how to restrict that, or afterwards recursively rm the 6 .svn/ dirs within it? or just forget anything fancy and remove them by hand after the copy:

RMDir /r "$GIS_DATABASE\demolocation/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/vector/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/vector/mysites/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/vector/point/.svn"
RMDir /r "$GIS_DATABASE\demolocation/PERMANENT/dbf/.svn"

http://nsis.sourceforge.net/Delete_files_and_subdirectories

(I think that recursive remove is also needed for the extracted ms VC++ dll dir in Temp/, right now it gets left behind after install)

thanks, Hamish

in reply to:  8 comment:9 by martinl, 11 years ago

Replying to hamish:

so, IIUC, the packager does a 'svn up' on their machine into a local C:\osgeo4w dir, then the packaging script recursively copies from within that checked out source tree?

see

source:grass-addons/tools/wingrass-packager/grass_compile.sh#L14

Martin

in reply to:  8 comment:10 by hellik, 11 years ago

Replying to hamish:

(I think that recursive remove is also needed for the extracted ms VC++ dll dir in Temp/, right now it gets left behind after install)

http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi.tmpl#L1000

Delete "$TEMP\$ARCHIVE_NAME"
Delete "$TEMP\$ORIGINAL_UNTAR_FOLDER"

the downloaded files and folders should be deleted.

if e.g. vcredist_2005_x86.exe creates another folder with extracted files, shouldn't be this cleaning the os?

comment:11 by hamish, 11 years ago

left over in ...\Local Settings\Temp\ are a install_msruntime dir from osgeo4w, with bin/ and etc/ within it, and an empty "Microsoft Visual C++ Runtime 2010 x86 Redistributible Setup_10.0.30319" dir, and matching 2010 .html and .txt log files.

wrt the 'install_msruntime' dir, does "Delete" work for folders?

Hamish

in reply to:  description ; comment:12 by glynn, 11 years ago

Replying to hamish:

the nightly build wingrass installers ship '.svn/' files for the demolocation.

I think that this isn't restricted to Windows; the "builddemolocation" target in the top-level Makefile simply copies the demolocation directory to dist.<arch> (using "tar c ... | tar x ...").

In 7.x, the demolocation directory has a Makefile which explicitly creates target directories and copies files with $(INSTALL_DATA).

Also: recent versions of the subversion client use a single .svn directory in the root of the working directory, rather than having a separate .svn directory in each subdirectory, so updating the subversion client would make this particular issue disappear.

comment:13 by hamish, 11 years ago

attempt to remove the unpacked 'install_msruntime' dir in devbr6 r56001.

in reply to:  12 comment:14 by hamish, 11 years ago

Replying to glynn:

Replying to hamish:

the nightly build wingrass installers ship '.svn/' files for the demolocation.

I think that this isn't restricted to Windows; the "builddemolocation" target in the top-level Makefile simply copies the demolocation directory to dist.<arch> (using "tar c ... | tar x ...").

that is correct, it's in all 'make install' for svn builds.

In 7.x, the demolocation directory has a Makefile which explicitly creates target directories and copies files with $(INSTALL_DATA).

since there's no Other.make in grass6 I'd just go with the cheap & dirty approach-of-least-change:

Index: Makefile
===================================================================
--- Makefile	(revision 55903)
+++ Makefile	(working copy)
@@ -389,6 +389,13 @@
 builddemolocation:
 	test -d ${ARCH_DISTDIR} || ${MAKE_DIR_CMD} ${ARCH_DISTDIR}
 	-tar cBf - demolocation | (cd ${ARCH_DISTDIR}/ ; tar xBfo - ) 2>/dev/null
+	-(cd ${ARCH_DISTDIR}/demolocation ; \
+		rm -rf ".svn" ; \
+		rm -rf "PERMANENT/.svn" ; \
+		rm -rf "PERMANENT/vector/.svn" ; \
+		rm -rf "PERMANENT/vector/mysites/.svn" ; \
+		rm -rf "PERMANENT/vector/point/.svn" ; \
+		rm -rf "PERMANENT/dbf/.svn" )
 	@ echo "GISDBASE: ${RUN_GISBASE}" > ${RUN_GISRC}
 	@ echo "LOCATION_NAME: demolocation" >> ${RUN_GISRC}
 	@ echo "MAPSET: PERMANENT" >> ${RUN_GISRC}

I notice that the last part creates a file called demolocation/.grassrc65, when it should perhaps be .grassrc6? That's named by Platform.make.in:

RUN_GISRC           = ${ARCH_DISTDIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}

(RUN_GISRC is used by e.g. Man.make at build time, with the GISRC= override set to the same variable, so it doesn't matter much what it's called)

?, Hamish

comment:15 by hamish, 11 years ago

second call for comments on the cheap & dirty patch in comment:14.

comment:16 by hamish, 11 years ago

patch committed in devbr6 and relbr64, but only affects 'make install', which the nsis installer doesn't use.

another attempt at cleaning it up wingrass committed in devbr6 r56107.

Hamish

comment:17 by hamish, 11 years ago

wingrass7 was also copying over the .svn/ files (doesn't use 'make install', just copies from source dir), devbr6 fix for that merged to trunk in r56108.

I also notice in a wingrass7 install that a Makefile and grassrc.tmpl file have made it into $GISBASE/demolocation.

Hamish

in reply to:  5 ; comment:18 by martinl, 11 years ago

Replying to martinl:

Replying to hamish:

please don't ignore it. it's a 2 minute job and these things make us look unprofessional.

huh, "trivial" means ignoring? if it's a 2 minute job, feel free to fix it. Martin

as you can see such "2 minutes jobs" are usually taking more then "2 minutes", currently stand-alone installer for G65 and G70 are broken

SetOutPath: "$GIS_DATABASE\demolocation"
File: Returning to: "."
File: "$DEMOLOCATION_PATH" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in script ".\grass65\GRASS-Installer.nsi" on line 586 -- aborting creation
 process

in reply to:  18 ; comment:19 by hamish, 11 years ago

Replying to martinl:

currently stand-alone installer for G65 and G70 are broken

SetOutPath: "$GIS_DATABASE\demolocation"
File: Returning to: "."
File: "$DEMOLOCATION_PATH" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in script ".\grass65\GRASS-Installer.nsi" on line 586 -- aborting creation
 process

try r56130,1. Probably nothing to do with .svn/ additions, just me not understanding the nsis scripting language very well in a side-edit.

Hamish

in reply to:  19 comment:20 by martinl, 11 years ago

Replying to hamish:

Replying to martinl: try r56130,1. Probably nothing to do with .svn/ additions, just me not understanding the nsis scripting language very well in a side-edit.

standalone installers are back (build 577) (1).

(1) http://wingrass.fsv.cvut.cz/

comment:21 by hamish, 11 years ago

Resolution: fixed
Status: newclosed

now working in 6.5 and backported to 6.4 in r56142.

other-cruft loose ends filed as #1966.

closing ticket.

Hamish

Note: See TracTickets for help on using tickets.