makeLazyLoad.R.patch 2.78 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
Message-ID: <16731.1755.857376.453277@mithrandir.hornik.net>
Date: Wed, 29 Sep 2004 21:02:51 +0200
To: Dirk Eddelbuettel <edd@debian.org>
Cc: Prof Brian Ripley <ripley@stats.ox.ac.uk>,
        Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>,
        Chris Lawrence <chris@lordsutch.com>, bates@stat.wisc.edu,
        kurt.hornik@r-project.org, martin.maechler@r-project.org
Subject: Re: Still fails under 2.0.0 beta 2004.09.28 (Re: Build failures with R 2.0.0 beta)
Reply-To: Kurt.Hornik@wu-wien.ac.at
From: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>

>>>>> Dirk Eddelbuettel writes:

> On Wed, Sep 29, 2004 at 01:32:28PM +0100, Prof Brian Ripley wrote:
>> I am effectively offline until Friday, but could try to look then.

> I would _greatly_ appreciate your help. I applied Kurt's patch, but
> that didn't fix it. I may have picked the wrong branch.

Interesting.  I just tried the effect of applying

--- makeLazyLoad.R      (revision 31251)
+++ makeLazyLoad.R      (working copy)
@@ -60,9 +60,13 @@
             stop(paste("There is no package called", sQuote(package)))
         dataDir <- file.path(pkgpath, "data")
     } else {
-        pkgpath <- sub("/data$", "", dataDir)
-        package <- basename(pkgpath)
-       # avoid builddir != srcdir problems -- assume package has been installed
+        pkgpath <- dirname(dataDir)        
+        package <- Sys.getenv("R_PACKAGE_NAME")
+        if(!nchar(package)) {
+            package <- basename(pkgpath)
+        }
+        ## avoid builddir != srcdir problems -- assume package has been
+        ## installed
         lib.loc <- c(dirname(pkgpath), .libPaths())
     }
     if(file_test("-d", dataDir)) {

and that seems to do the job for me.

Can you pls try again?

Brian: I am not sure about the intentions of the subsequent

        lib.loc <- c(dirname(pkgpath), .libPaths())

Is dirname(pkgpath) supposed to be the path to the library installed
into?  The Unix INSTALL script makes this available in the environment
variable R_PACKAGE_DIR, so we might want to use this as well ...

Best
-k

> I'd be happy to for now apply a patch in Debian's package only, but I
> would not be surprise if the bug hit in other places too.  I really
> think that should be fixed before 2.0.0.

>> I don't understand why this has not been resolved in the alpha period, 
>> though.

> Because of an unfortunate combination of factors:

> i)  2.0.0 breaks old packages, so I have _not_ inserted 2.0.0 into Debian
>     unstable yet, so no autobuilder reports.
    
> ii) When I reported the cluster build failure, Martin could not replicate it
>     as I hadn't realized yet that it was tied also using $Package-$Version/
>     directories.
    
> Dirk

> -- 
> Those are my principles, and if you don't like them... well, I have others.
>                                                 -- Groucho Marx