error output (stderr) from 'pkgmk' command is not visible
---------------------------------------------------------

                 Key: MUNIX-34
                 URL: http://jira.codehaus.org/browse/MUNIX-34
             Project: Maven 2.x Unix Plugin
          Issue Type: Bug
    Affects Versions:  1.0-alpha-4
         Environment: SunOS 5.10 Generic_137111-04 sun4v sparc 
SUNW,SPARC-Enterprise-T5220

            Reporter: Patrick Camenzind


if your artifactId (in my case it was "portal_entry") contains characters that 
are not allowed for the PKG abbreviation in pkginfo the build fails with the 
following output:

---
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to create package.

Embedded error: Command 'pkgmk' returned a non-null exit code: 1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
---

Running maven with -e (or even -X) doesn't give more output on the cause of the 
failure... I was able though to find the cause by running mvn inside truss... 
this is what i've discovered:

---
25635:  write(2, " p k g m k", 5)                       = 5
24045/87:       read(103, " p k g m k", 8192)                   = 5
25635:  write(2, " :   E R R O R :  ", 9)               = 9
24045/87:       fstat64(103, 0xB287F2D0)                        = 0
24045/87:       ioctl(103, FIONREAD, 0xB287F3C8)                = 0
25635:  write(2, 0x00031804, 30)                        = 30
25635:     i n v a l i d   p a c k a g e   a b b r e v i a t i o n   <
25635:  write(2, " p o r t a l _ e n t r y", 12)        = 12
24045/87:       read(103, 0xB287D318, 8192)                     = 39
24045/87:          :   E R R O R :   i n v a l i d   p a c k a g e   a b b r e 
v i
24045/87:          a t i o n   <
24045/87:       fstat64(103, 0xB287F2D0)                        = 0
25635:  write(2, " >", 1)                               = 1
24045/87:       ioctl(103, FIONREAD, 0xB287F3C8)                = 0
25635:  write(2, "\n", 1)                               = 1
24045/87:       read(103, 0xB287D318, 8192)                     = 14
24045/87:          p o r t a l _ e n t r y >\n
25635:  sigaction(SIGINT, 0xFFBFEC50, 0xFFBFECF0)       = 0
24045/87:       fstat64(103, 0xB287F2D0)                        = 0
25635:  sigaction(SIGHUP, 0xFFBFEC50, 0xFFBFECF0)       = 0
24045/87:       ioctl(103, FIONREAD, 0xB287F3C8)                = 0
25635:  write(2, 0x00031EB4, 33)                        = 33
25635:     # #   P a c k a g i n g   w a s   n o t   s u c c e s s f u l .
25635:    \n
24045/87:       read(103, 0xB287D318, 8192)                     = 33
24045/87:          # #   P a c k a g i n g   w a s   n o t   s u c c e s s f u 
l .
24045/87:         \n
24045/87:       fstat64(103, 0xB287F2D0)                        = 0
24045/87:       ioctl(103, FIONREAD, 0xB287F3C8)                = 0
25635:  unlink("/var/tmp/tmpmaAAAuuayeY")               = 0
25635:  _exit(1)
---

No surprise as Sun stated in his documents that only the following is allowed 
for the package abbreviation:

- The abbreviation must consist of alphanumeric characters. The first character 
cannot be a number.
- The abbreviation cannot exceed 32 characters in length. 
- The abbreviation cannot be one of the reserved abbreviations: install, new, 
orall.


My suggestion is to make the error output (stderr = file handle #2) of 'pkgmk' 
visible to the user to solve this issue.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to