Jim,

Here is the second installment of my response:)

-Moriah

James Carlson wrote:

> usr/src/cmd/svr4pkg/hdrs/install.h
>
>   Not sure why this is a new file. 
> usr/src/cmd/svr4pkg/hdrs/libinst.h
>   Not sure why new.
This file is actually not new, but when I was creating the webrev of
changes I forgot to grab these files from the Legacy Nevada Install
gate.  The only difference between the files that I updated and the
original is the sccs versioning :
  o install.h, I removed:
        > #pragma ident "@(#)install.h  1.24    06/02/27 SMI"

  o libinst.h, I removed:
        > #pragma ident "@(#)libinst.h  1.56    08/01/18 SMI"

>   134,139: ew.
> 
>   155-159: double ew.
> 
>   This header file definitely needs a spring cleaning.  Not this
>   project, though.
Left existing code alone, but completely agree about the yuckyness.

> usr/src/cmd/svr4pkg/installf/Makefile
> 
>   44: should be $(ROOTBIN)
Done.

>   52: nit: '-lc' likely isn't needed here.
Removed this.

>   60: nit: 'all' target should be first (before 'install' on line
>   58).  Otherwise, a bare "make" will cause it to install.
Done.

>   75: is this needed?
> 
Yes, please see Note 3.

> usr/src/cmd/svr4pkg/installf/main.c
> 
>   23: time went backwards
> 
>   (old lines) 417,508: these look like accidentally removed bug fixes.
Fixed, please see Note 4.

> 
> usr/src/cmd/svr4pkg/installf/removef.c
> 
>   107: accidentally removed fix?
Fixed, please see Note 4.

> 
> usr/src/cmd/svr4pkg/libinst/Makefile
> 
>   55: misplaced comment (actually refers to line 58, and was moved?).
Done, moved to proper location.

> 
>   84: needed?
Yes, please see Note 3.  Left the clean and clobber targets in this file
as it contained enough differences that the Makefile.svr4pkg was not useful

> usr/src/cmd/svr4pkg/libinst/fixpath.c
> 
>   822: looks like a removed bug fix.
> 
Left alone.  The change was to fix a coding error so that library would
compile with gcc. Please see Note 5.

> usr/src/cmd/svr4pkg/libinst/isreloc.c
> 
>   48: definitely inappropriate comment for ON.
Removed this.

>   54: remove.
Done. Removed prototype for strtok_r

> usr/src/cmd/svr4pkg/libinst/mapfile-vers
> 
>   What is this file doing ... ?  You're not building a shared library,
>   and the file doesn't have the required "MAPFILE HEADER" text nor any
>   usable symbols.
> 
Removed mapfile from libinst.

> usr/src/cmd/svr4pkg/libinst/pkgdbmerg.c
> 
>   23: time rolled backwards
> 
>   196: removed bug fix.
>
Fixed, please see Note 3.

> usr/src/cmd/svr4pkg/libinst/scriptvfy.c
> 
>   This file should *not* be part of your workspace.  It's a derived
>   object (generated by running lex on scriptvfy.l).  It needs to be
>   removed with "hg rm".
> 
Verified that scriptvfy.c was not managed by hg.  Also added scriptvfy.c
to the list of files to be removed by the clean target.

> usr/src/cmd/svr4pkg/pkgadd/Makefile
> 
>   51: '-lc' likely not needed.
Removed this.

> 
>   54,75: stray; remove.
Removed this.

> 
>   61: 'all' target should be first.
>
Done.

>   68: needed?
Yes, please see Note 3.

> 
> usr/src/cmd/svr4pkg/pkgadd/check.c
> 
>   46-49: looks like an accidentally reverted bug fix.  (The path for
>   this should include hdrs, so <> should work.)
> 
Fixed, please see Note 6.


> usr/src/cmd/svr4pkg/pkgadd/main.c
> 
>   76-79: looks like an accidentally reverted bug fix.  (The path for
>   this should include hdrs, so <> should work.)
> 
Fixed, please see Note 6.

> usr/src/cmd/svr4pkg/pkgadd/presvr4.c
> 
>   60-63: ditto
Fixed, please see Note 6.

> usr/src/cmd/svr4pkg/pkgadd/quit.c
> 
>   41-43: ditto
> 
Fixed, please see Note 6.

>   265-267: remove
> 
Fixed.

>   268: nit: excess parenthesis
Done, removed the excess parenthesis so that it is more readable.

> usr/src/cmd/svr4pkg/pkgadd/quit.h
> 
>   43: ditto
Fixed, please see Note 6.

> usr/src/cmd/svr4pkg/pkgadm/Makefile
> 
>   48-51,53-55: lots of duplicated stuff across makefiles; consider
>   creating "usr/src/cmd/svr4pkg/Makefile.com" to hold it.
Done.  I created the following Makefiles:
  o usr/src/cmd/svr4pkg/Makefile.svr4pkg
  o usr/src/cmd/svr4pkg/Makefile.svr4pkg.targ

>   53: '-lc'
Removed this.

>   62: 'all' target should be first.
Done.

>   74: needed?
Yes, please see Note 3.

> usr/src/cmd/svr4pkg/pkgadm/main.c
> 
>   56-58,61-63: stray; remove
Done.

>   59: why was this made a global symbol?
Honesty, I really don't know why it was originally declared that way.
It doesn't seem to be necessary.  With struct cmd defined as static, gcc
pukes a warning and cc chokes on compilation.

+ /usr/sfw/bin/gcc -fident -finline -fno-inline-functions -fno-builtin
.
.
-D_FILE_OFFSET_BITS=64 -c main.c -o /tmp/.cwCAAsBa4Ac.o
main.c:59: warning: useless keyword or type name in empty declaration
+ /ws/onnv-tools/SUNWspro/SS12/bin/cc -O -xspace -Xa -xildoff
.
.
-D_FILE_OFFSET_BITS=64 -c main.c
*** Error code 1
make: Fatal error: Command failed for target `main.o'
Current working directory
/export/ws/mwaterl/child_of_master/usr/src/cmd/svr4pkg/pkgadm


> 
> usr/src/cmd/svr4pkg/pkgchk/Makefile
> 
>   50: '-lc'
Removed this.

>   59: 'all'
Done.

>   71: needed?
Yes, please see Note 3.

> usr/src/cmd/svr4pkg/pkgchk/main.c
> 
>   536: removed (but wrongish) previous bug fix.
Fixed (sort of), please see Note 0.

> usr/src/cmd/svr4pkg/pkgcond/Makefile
> 
>   48: '-lc'
Removed this.

>   48: linkage to libzonecfg needs to be lazy, or this will fail on
>   systems without Zones installed.
Fixed this.

>   49: possible issues with these other libraries; need to check
>   packaging.
Added -lwanboot to the lazy libraries

>   69: needed?
Done, please see Note 3.

> usr/src/cmd/svr4pkg/pkginfo/Makefile
> 
>   48: '-lc'
Removed this.

>   56: 'all'
Done.

> usr/src/cmd/svr4pkg/pkginfo/pkginfo.c
> 
>   321,323: reverted (and still wrong) bug fix.
Fixed.  Replaced exit statement at end of main() with return statement.

> usr/src/cmd/svr4pkg/pkginstall/Makefile
> 
>   65: '-lc'
Removed this.

>   73: 'all'
Done.

>   88: needed?
Please see Note 3.

> usr/src/cmd/svr4pkg/pkginstall/main.c
> 
>   2244,2246: bug fix
Fixed (sort of), please see Note 0.


> usr/src/cmd/svr4pkg/pkgmk/Makefile
>   usual comments
Done.

> usr/src/cmd/svr4pkg/pkgmk/main.c
> 
>   691: reverted bug fix
Fixed (sort of), please see Note 0.

> usr/src/cmd/svr4pkg/pkgname/Makefile
>   usual comments
Done.

> usr/src/cmd/svr4pkg/pkgname/pkgname.c
> 
>   53,55: bug fix
Fixed.  Replaced exit statement at end of main() with return statement.

> usr/src/cmd/svr4pkg/pkgparam/Makefile
> usr/src/cmd/svr4pkg/pkgproto/Makefile
>   usual comments (on both)
Done.

> usr/src/cmd/svr4pkg/pkgproto/main.c
> 
>   165,167: bug fix
Fixed.  Replaced exit statement at end of main() with return statement.

> usr/src/cmd/svr4pkg/pkgremove/Makefile
> 
>   usual comments
Done.

> usr/src/cmd/svr4pkg/pkgremove/main.c
> 
>   1125,1127: bug fix
Fixed (sort of), please see Note 0.

> usr/src/cmd/svr4pkg/pkgremove/wsreg_pkgrm_test.c
> 
>   Is this file even used?  It doesn't seem to be, and could just be
>   eliminated from the workspace.
This does not appear to be used in any way.  I removed it from my
workspace (hg remove).

> usr/src/cmd/svr4pkg/pkgrm/Makefile
> 
>   usual comments
Done.

> usr/src/cmd/svr4pkg/pkgscripts/Makefile
> 
>   52-55,58-59: this swilly little 'cmdexec' program doesn't seem to
>   use most of this.
Done.  I was able to removed 2 of the includes.


>   61-66: doesn't belong here.
Fixed.


> usr/src/cmd/svr4pkg/pkgscripts/cmdexec.c
> 
>   126,128: bug fix
Fixed.  Replaced exit statement at end of main() with return statement.

> usr/src/cmd/svr4pkg/pkgtrans/Makefile
> 
>   usual comments
Fixed.

> usr/src/cmd/svr4pkg/pkgtrans/main.c
> 
>   211: bug
> 
Fixed.  Removed previously inserted "return (0);" at end of main()


Note 0.
=======
I don't know what the hell to do about this situation.  gcc won't
compile without the returns.
    default:
        usage();
        /*NOTREACHED*/
        /*
         * Although usage() calls a noreturn function,
         * needed to add return (1);  so that main() would
         * pass compilation checks. The statement below
         * should never be executed.
         */
        return (1);

I added the following line at the end of the definition of main() :
    /* LINTED: no return */

Note 2.
======
done. I gutted this Makefile.  I removed all of my debugging comments. I
added the new directories to Targetdirs and modified targets to:
SUBDIRS=        $(CMDSUBDIRS) $(LIBSUBDIR)
    all clean clobber install _msg lint: $(SUBDIRS)

    $(CMDSUBDIRS): $(LIBSUBDIR)

    $(SUBDIRS): FRC
         @cd $@; pwd; $(MAKE) $(TARGET)


You are correct regarding _msg target.  I changed this so that I am not
even  bothering with the additional effort to create a common .po file.
  I changed the targets in each of the command subdirectories to be
$(MSGDOMAINPOFILE)

Note 3.
======
No clean target is defined under usr/src/cmd/Makefile.targ.  I did use
the clobber target from that file and removed my definitions.  I added
the appropriate files to CLOBBERFILES +=


Note 4.
======

Change was putback to this source after code should have been frozen.

D 1.60 08/12/17 04:46:38 jk217608 68 67 00010/00004/01250
MRs:
COMMENTS:
6776920 removef doesn't cope with duplicate path on command line



  I went back and reviewed all the other putbacks since I last pulled
the code and verified that I am not missing anything.

Note 5.
======
Added as part of
D 1.16  94/10/21 Added functions to suppoort faster install.


  719
  720 int
  721 is_an_inst_root(void)
  722 {
  723         return (install_root_exists);
  724 }
  822          client_offset = (is_an_inst_root) ? install_root_len : 0;



fixpath.c: In function `eval_path':
fixpath.c:822: warning: the address of `is_an_inst_root', will always
evaluate as `true'


Note 6.
--------
I fixed these problems.  I had introduced the "" regression when I was
originally working on just getting this code to build in the ON gate and
missed this in my cleanup.

Reply via email to