Configure location of .bnd folder

53 views
Skip to first unread message

Peter Kirschner

unread,
Feb 22, 2018, 5:49:35 AM2/22/18
to bndtools-users
Hi everybody,

we are facing issues using bnd 3.5 building on linux with following error message.

     [exec] Error  : Unexpected ee.j2se;version=1.8,org.eclipse.osgi,org.eclipse.osgi.services,osgi.annotation,org.eclipse.jface,org.eclipse.swt,org.eclipse.swt.win32.win32.x86_64,  error java.nio.file.FileSystemException: /cecbuild/work/release/CEC-SDK/179/work/build/bnd/build.container.bnd/../cnf/cache/p2-ECTARGET_20180207-154218/org.eclipse.osgi-3.12.50.v20170928-1321.jar -> /home/cecbuild/.bnd/urlcache/shas/54A9C8777D6453D5FD2D1973D6E19D38C69DFD33.content: Invalid cross-device link,

As far as I investigated this is due to different devices on which the build happens and where .bnd folder is located.
So I tried to configure my HOME variable for the process to the same device/disk than the build is running on, but it is still using my users home drive "~".

Is there a way to configure the .bnd folder location?

any help kindly appreciated,

Peter

Peter Kriens

unread,
Feb 22, 2018, 6:00:36 AM2/22/18
to bndtool...@googlegroups.com
Looks like you’re using a repository that by default places the cache in your home directory. Which repos have you configured? If I know the types, I can tell you what property to set. (I hope.)

P

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Kirschner

unread,
Feb 22, 2018, 6:07:23 AM2/22/18
to bndtools-users
Hi Peter,

I'm using the following repo types...

   aQute.lib.deployer.FileRepo; \
   aQute.bnd.deployer.repository.LocalIndexedRepo; \
   aQute.bnd.repository.p2.provider.P2Repository; \
   aQute.bnd.deployer.repository.FixedIndexedRepo; \

regards,

Peter

Peter Kirschner

unread,
Feb 22, 2018, 6:09:37 AM2/22/18
to bndtools-users
I assume the culprit is the aQute.bnd.repository.p2.provider.P2Repository
All the others have been there for a while, without issues.

Peter Kirschner

unread,
Feb 22, 2018, 7:27:41 AM2/22/18
to bndtools-users




Issue must be inside my call, cause here ist the code trace ...

aQute.bnd.http.HttpClient
URLCache cache= new URLCache(IO.getFile("~/.bnd/urlcache"));

aQute.lib.io.IO
public static File getFile(String filename) {
          return getFile(work, filename);
}

        public static File getFile(File base, String file) {
           if (file.startsWith("~/")) {
                   file = file.substring(2);
                      if (!file.startsWith("~/")) {
                          return getFile(home, file);
                    }
              }
              if (file.startsWith("~")) {
                    file = file.substring(1);
                      return getFile(home.getParentFile(), file);
            }

        static {
               File tmp = null;
               try {
                  tmp = new File(System.getenv("HOME"));
         } catch (Exception e) {}
               if (tmp == null) {
                     tmp = new File(System.getProperty("user.home"));
               }
              home = tmp;
    }

Thanks for your support.

Peter Kriens

unread,
Feb 22, 2018, 8:55:58 AM2/22/18
to bndtool...@googlegroups.com
Sorry, had to go for lunch … 

Ok, so you found it? Kind regards,

Peter Kriens

Reply all
Reply to author
Forward
0 new messages