Danek Duvall <[email protected]> writes:
> I've completed the prep work for this, so might as well send it out for
> code review:
>
> http://cr.opensolaris.org/~dduvall/pkg-nativepkg/
Not a review, just a couple of observations from trying the code:
* The clean and clobber rules in src/Makefile still referred to pkgdefs
instead of pkg.
* The clobber rule in src/pkg/Makefile failed to remove Makefile.link.
* Some rules creating files in src/pkg/$(PDIR) lacked dependencies on
$(PDIR), so the directory might not be present when trying to create
files in it.
Fixed as below.
Unfortunately, this doesn't allow me to build a pkg5 repo: I've applied
the patch to pkg gate as of the in141 tag.
* dmake check in src/pkg fails:
pkgsend generate ../../proto/root_i386 | \
pkgmogrify -D ARCH=i386 -D PKGVERS_COMPONENT=0.5.11 -D
PKGVERS_BUILTON=5.11 -D PKGVERS_BRANCH=0.142 -D PKGVERS=0.5.11,5.11-0.142 -D
PYDIR=usr/lib/python2.6 -D PYDIRVP=usr/lib/python2.6/vendor-packages
transforms/compare-strip \
/dev/stdin > pkgtmp/protomanifest
masaya --> 1 job
pkgdiff pkgtmp/protomanifest pkgtmp/pkgmanifest
masaya --> Job output
pkgdiff pkgtmp/protomanifest pkgtmp/pkgmanifest
- dir path=%(path)
- file NOHASH path=%(path)
- hardlink
path=usr/lib/python2.6/vendor-packages/pkg/flavor/depthlimitedmf24.pyc
target=depthlimitedmf25.pyc
- hardlink
path=usr/lib/python2.6/vendor-packages/pkg/flavor/depthlimitedmf25.py
target=depthlimitedmf24.py
- link path=usr/share/pkg/cacert/72fa7371.0
target=Verisign_Class_3_Public_Primary_Certification_Authority-G2.pem
*** Error code 1
dmake: Fatal error: Command failed for target `check'
* Even if I comment the command for the check target, I get nothing in
the repo:
% dmake install
dmake: defaulting to parallel mode.
See the man page dmake(1) for more information on setting up the .dmakerc file.
masaya --> 1 job
/usr/lib/pkg.depotd -d
/opt/os/obj/pkg/gate/in141/src/pkg/../../packages/i386/repo --add-content
--exit-ready
masaya --> Job output
/usr/lib/pkg.depotd -d
/opt/os/obj/pkg/gate/in141/src/pkg/../../packages/i386/repo --add-content
--exit-ready
[28/Jun/2010:15:52:38] INDEX Search Available
[28/Jun/2010:15:52:38] INDEX Search Available
* An explicit attempt to publish a single package fails:
% dmake pkgtmp/SUNWipkg.pub
dmake: defaulting to parallel mode.
See the man page dmake(1) for more information on setting up the .dmakerc file.
masaya --> 1 job
pkgmogrify -D ARCH=i386 -D PKGVERS_COMPONENT=0.5.11 -D PKGVERS_BUILTON=5.11
-D PKGVERS_BRANCH=0.142 -D PKGVERS=0.5.11,5.11-0.142 -D
PYDIR=usr/lib/python2.6 -D PYDIRVP=usr/lib/python2.6/vendor-packages -I
transforms -O pkgtmp/SUNWipkg.mog manifests/SUNWipkg.p5m defaults
masaya --> Job output
pkgmogrify -D ARCH=i386 -D PKGVERS_COMPONENT=0.5.11 -D PKGVERS_BUILTON=5.11
-D PKGVERS_BRANCH=0.142 -D PKGVERS=0.5.11,5.11-0.142 -D
PYDIR=usr/lib/python2.6 -D PYDIRVP=usr/lib/python2.6/vendor-packages -I
transforms -O pkgtmp/SUNWipkg.mog manifests/SUNWipkg.p5m defaults
Traceback (most recent call last):
File "/usr/bin/pkgmogrify", line 498, in <module>
exit_code = main_func()
File "/usr/bin/pkgmogrify", line 430, in main_func
lines.extend(read_file(f, ignoreincludes))
File "/usr/bin/pkgmogrify", line 363, in read_file
add_transform(line, filename, lineno)
File "/usr/bin/pkgmogrify", line 233, in add_transform
transforms.append((types, attrdict, operation, filename, lineno, transform))
UnboundLocalError: local variable 'operation' referenced before assignment
pkgmogrify: caught <type 'exceptions.Exception'>, local variable 'operation'
referenced before assignment
*** Error code 99
dmake: Fatal error: Command failed for target `pkgtmp/SUNWipkg.mog'
The pkg bits currently installed are from an SVR4 build of the pkg
gate as of the in141 tag.
Suggestions?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
--- Makefile.dist 2010-06-28 13:02:36.000000000 +0200
+++ Makefile 2010-06-28 13:23:17.523923916 +0200
@@ -51,11 +51,11 @@ all: $(SUBDIRS)
clean: $(SUBDIRS)
$(PYTHON) setup.py clean
- @cd pkgdefs; pwd; make clean
+ @cd pkg; pwd; make clean
clobber: $(SUBDIRS)
$(PYTHON) setup.py clobber
- @cd pkgdefs; pwd; make clobber
+ @cd pkg; pwd; make clobber
install: $(SUBDIRS)
$(PYTHON) setup.py install
--- pkg/Makefile.dist 2010-06-28 13:02:36.000000000 +0200
+++ pkg/Makefile 2010-06-28 15:35:24.678464302 +0200
@@ -71,7 +71,7 @@ all: $(MOGRIFESTS)
install: repository-metadata
clobber:
- rm -rf $(PDIR) $(PKGDEST)
+ rm -rf $(PDIR) $(PKGDEST) Makefile.link
$(PDIR) $(PKGDEST)/svr4:
mkdir -p $@
@@ -101,7 +101,7 @@ $(PDIR)/%.mog: manifests/%.p5m $(PM_TRAN
$(PKGMOGRIFY) $(PKGMOG_DEFINES) -I transforms -O $@ $< $(PM_TRANSFORMS)
# The main publication rule
-$(PDIR)/%.pub: $(PDIR)/%.mog $(PKGDEST)/repo
+$(PDIR)/%.pub: $(PDIR)/%.mog $(PKGDEST)/repo $(PDIR)
$(PKGSEND) -s file://$(PKGDEST)/repo publish -d $(PKGROOT) -d
license_files \
--fmri-in-manifest --no-index --no-catalog $<
touch $@
@@ -118,13 +118,13 @@ TARGETS.cmd = \
python -c 'import os, sys; print " ".join(("--target " +
os.path.normpath(os.path.join(os.path.dirname(p), t)) for p, t in
(l.strip().split() for l in sys.stdin.readlines())))'
# Create a pseudo-manifest of the proto area
-$(PDIR)/protomanifest: FRC transforms/compare-strip
+$(PDIR)/protomanifest: FRC transforms/compare-strip $(PDIR)
$(PKGSEND) generate $(TARGETS.cmd:sh) $(PKGROOT) | \
$(PKGMOGRIFY) $(PKGMOG_DEFINES) transforms/compare-strip \
/dev/stdin > $@
# Create a pseudo-manifest of the combined packages
-$(PDIR)/pkgmanifest: $(MOGRIFESTS) transforms/compare-strip
+$(PDIR)/pkgmanifest: $(MOGRIFESTS) transforms/compare-strip $(PDIR)
$(PKGMOGRIFY) $(PKGMOG_DEFINES) transforms/compare-strip $(MOGRIFESTS)
> $@
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss