This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | <sampledir>/examples/advanced is empty ! | ||
---|---|---|---|
Product: | usersguide | Reporter: | Marian Mirilovic <mmirilovic> |
Component: | Code | Assignee: | Filip Rachunek <frachunek> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | jglick, mgrummich, rbalada |
Priority: | P1 | ||
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Marian Mirilovic
2002-06-19 08:40:25 UTC
rest sample directories contains all files So, today's build is beta2-build, please solve this one ASAP. Thanks advance. This seems to be a side-effect of removing the MemoryView example. Filip, could you clean this up? I'm not sure if I can do anything with this issue. I was told that if I remove all files from examples/advanced directory on CVS, cvs update -P command should ignore this directory. Is there a way how to remove empty directory from CVS server? Hmm. Could it be a build script problem? Perhaps the examples dir wasn't cleaned? Works OK for me if I update -P. usersguide/demosrc/examples/advanced/ ought not be present in the source directory. Ruda? It's strange. I went through night build tracelog and the update was executed cvs -z6 -q -d :pserver:rbalada@cvs.netbeans.org:/cvs update '-D2002-06-19 01:00 +0000' -d -P _other_modules_ usersguide _other_modules_ Source package doesn't have the directory ;-( I found only one difference, that the source package repository was updated with -A switch - reset sticky tag. I updated build repository manualy with `cvs up -d -P` usersguide/demosrc/examples directory and the advanced directory has disappeared. I changed night build shell script to use -A switch also for build repository update. I expect it will be OK in next builds. I think I know what happened. When someone else deletes the last file from a CVS dir, and you have a checkout containing that dir, cvs up -P will delete the file but leave the dir. The next cvs up -P will delete the dir (assuming there are no backup files or other ignored trash lying around in it). So we just needed to wait one round. Well, please do the same for clock examples. clock folder is empty in [nb_dev](20020620) !!! I am re-adding the removed examples back to CVS. verified in [nb34_b2](200206201200) verified in [nb_dev](20020626) Ok, guys the same happends in todays build [nb_dev](20020709), advanced and clock folder are empty. Both folders aren't empty in build [nb_dev](20020708). My question is : Should we wait for new build, and will there be it ok? It seems like you again try to remove both example directories, Am I right? Tomorrow is Beta3 and we are going to high-resistance mode !!! Reopen and rising priority to P1 - it's regression. I think it should be okay in a new build. When I perform cvs update -P, both empty directories disappear. We removed these examples according to the proposal on nbui@netbeans.org. Note that if you do a cvs update -P -d and interrupt it partway through, you will be left with these empty dirs. It is probably better to change the build system to not rely on whether these dirs are empty or not. Suggestions: 1. Include the attr filesonly="true" on <zip> in 'tojar' target of usersguide/build.xml. Excludes directories. However this would probably cause sampledir unpacking to fail, unless usersguide/src/.../UGModule.java were patched in makeExamplesDir(): ---%<--- if (entry.isDirectory ()) { if (! new File (dir, name).mkdirs ()) throw new IOException (); } else { OutputStream os = new FileOutputStream (new File (dir, name)); try { int read; while ((read = zis.read (buf, 0, buf.length)) != -1) { os.write (buf, 0, read); } } finally { os.close (); } } --%<--- ==> ---%<--- if (entry.isDirectory()) continue; File f = new File(dir, name); f.getParentFile().mkdirs(); OutputStream os = new FileOutputStream(f); try { int read; while ((read = zis.read (buf, 0, buf.length)) != -1) { os.write (buf, 0, read); } } finally { os.close (); } --%<--- 2. Fix the build script to not include empty dirs. Add to .cvsignore: ---%<--- demosrc-tmp ---%<--- and change build.xml's tojar target: ---%<--- <target name="tojar" depends="compile"> <mkdir dir="demosrc-tmp"/> <copy todir="demosrc-tmp" preservelastmodified="true" includeemptydirs="false"> <!-- Source and classes both. --> <fileset dir="demosrc"/> </copy> <zip compress="true" zipfile="src/org/netbeans/modules/usersguide/demosrc.zip"> <fileset dir="demosrc-tmp"/> </zip> </target> ---%<--- and add to its clean target: ---%<--- <delete dir="demosrc-tmp"/> ---%<--- Did not actually try either of these fixes, but something like them may be useful. I have checked it in build 20020710-0552 [nbdev], there are no empty directories in examples folder. verified in [nb_release34](20020717) Resolved for 3.4.x or earlier, no new info since then -> closing. |