> [email protected] hat am 5. Juni 2015 um 14:33 geschrieben:
>
>
> Hi @ports,
>
> i wrote a little script to keep the ports on my 5.7-stable machine up to
> date. The script updates the port sources, runs "out-of-date" and feeds
> the output to dpb to rebuild all outdated packages. These are then
> installed via pkg_add -u:
>
> # cd /usr/ports
> # /usr/bin/cvs -d ${CVSROOT} -q up -rOPENBSD_$V -Pd
> # /usr/ports/infrastructure/bin/out-of-date -x 2>/dev/null |
> /usr/bin/tee ${PORTS}
> # /usr/ports/infrastructure/bin/dpb -c -x -P ${PORTS}
> # PKG_PATH=/usr/ports/packages/$(uname -m)/all /usr/sbin/pkg_add -u
>
> To save time, i added
> FETCH_PACKAGES=Yes
> to /etc/mk.conf to avoid building ports that are already available as
> packages.
>
> The setting works when PKG_PATH is set, which it isn't, because
> "installpath" was already set at install time in /etc/pkg.conf.
>
> I thought that would be enough, but neither "make install" nor dpb seem
> to
> care about pkg.conf and only fetch packages if "the real" PKG_PATH is
> set.
> Is this intended, currently unimplemented or am i doing it wrong?
>
> Best,
> Nils
>
>
> Here are my config files:
>
> $ cat /etc/mk.conf
> FETCH_PACKAGES=Yes
> SIGNING_PARAMETERS=-s signify -s /etc/signify/my-pkg.sec
>
> $ cat /etc/pkg.conf
> installpath =
> http://ftp.halifax.rwth-aachen.de/openbsd/5.7/packages/amd64/
>
> dmesg:
> OpenBSD 5.7-stable (GENERIC) #0: Fri May 8 07:45:53 CEST 2015
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
>
After digging the dpb source code a bit, i found this function in
/usr/ports/infrastructure/lib/DPB/Job/Port.pm:
88 sub tweak_args
89 {
90 my ($self, $args, $job, $builder) = @_;
91 push(@$args,
92 "FETCH_PACKAGES=No",
93 "PREPARE_CHECK_ONLY=Yes",
94 "REPORT_PROBLEM='exit 1'", "BULK=No");
95 if ($job->{parallel}) {
96 push(@$args, "MAKE_JOBS=$job->{parallel}");
97 }
98 if ($job->{special}) {
99 push(@$args, "USE_MFS=Yes");
100 }
101 if ($builder->{fetch}) {
102 push(@$args, "NO_CHECKSUM=Yes");
103 }
104 }
Are the fixed settings dependent on each other? Otherwise, i'll try to
come up with a diff.
Best,
Nils