octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45369] pkg build leads to duplication of PKG_


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #45369] pkg build leads to duplication of PKG_ADD and PKG_DEL files
Date: Sun, 21 Jun 2015 11:55:20 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.7.0

URL:
  <http://savannah.gnu.org/bugs/?45369>

                 Summary: pkg build leads to duplication of PKG_ADD and
PKG_DEL files
                 Project: GNU Octave
            Submitted by: carandraug
            Submitted on: Sun 21 Jun 2015 11:55:19 GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

PKG_ADD and PKG_DEL files can be defined in different ways. At the root of the
package, and as comments in the source files.  In the first case, the files
are copied both to the architecture dependent and independent directories.  In
the later, a PKG file is created for each of the directories.

pkg() has an option "build" to generate binary distribution of packages. When
such distribution is created, pkg() parses the source files for PKG_ADD and
PKG_DEl directives.  It then places them at the root of the package. This
means that installation of such binary distribution will copy the PKG files to
both directories.

This has 2 negative side effects:

* the PKG files will be executes twice (probably not what the developer
wanted);

* executing the PKG files may fail if they call functions that belong to the
package (which is often the case)

On the case of the stk package (where this bug was reported), PKG_ADD calls
stk_init().  This is a m function and is defined as a comment on a m file. 
Installing this package means that a single PKG_ADD file is created on the
architecture independent directory. Everything works fine.  However, when
using "pkg build", the PKG_ADD file is copied to the root of the package and
then installed in both directories. The architecture dependent is added to the
path first, when stk_init() is not defined yet causing an error when loading
the package.

See #45362 for details and a test case.

I think the best fix is to no longer accept PKG_ADD and PKG_DEL files at the
root of the package.  If they are meant to be executed when adding the package
to the package, chances are the maintainer only wants it executed once.  The
only use case I can think for it is when a package has only arch dependent or
independent functions in which case they could have this files there too.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45369>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]