Subject: Heads Up: wildcard dependencies via FTP
To: None <tech-pkg@netbsd.org>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 12/17/1999 06:10:21
FYI.
Please note the dependency in this pkg, and that it's all over FTP.
This is still work in progress, I'll let you know when I need people
for code review. :)


*** See what binary packages there are on that FTP site:

noon# ls -l /usr/pkgsrc/packages/All/wil*
-rw-r--r--  1 root    wheel  505 Nov 30 11:17 /usr/pkgsrc/packages/All/wildcard-app-nowildcards-1.0.tgz
-rw-r--r--  1 root    wheel  508 Nov 30 07:13 /usr/pkgsrc/packages/All/wildcard-app-wildcards-1.0.tgz
-rw-r--r--  1 root    wheel  497 Nov 30 06:49 /usr/pkgsrc/packages/All/wildcard-lib-1.0.tgz
-rw-r--r--  1 root    wheel  497 Dec 17 02:23 /usr/pkgsrc/packages/All/wildcard-lib-1.2.tgz
-rw-r--r--  1 root    wheel  498 Dec 17 05:30 /usr/pkgsrc/packages/All/wildcard-lib-1.5.tgz
-rw-r--r--  1 feyrer  wheel  497 Dec  3 04:17 /usr/pkgsrc/packages/All/wildcard-lib-2.0.tgz
-rw-r--r--  1 feyrer  wheel  497 Dec  3 04:17 /usr/pkgsrc/packages/All/wildcard-lib-3.0.tgz
-rw-r--r--  1 feyrer  wheel  497 Dec  3 04:17 /usr/pkgsrc/packages/All/wildcard-lib-3.1.tgz
-rw-r--r--  1 feyrer  wheel  497 Dec  3 04:17 /usr/pkgsrc/packages/All/wildcard-lib-3.5.tgz
-rw-r--r--  1 feyrer  wheel  497 Dec  3 04:17 /usr/pkgsrc/packages/All/wildcard-lib-3.99.tgz


*** See what we have installed locally:

noon# pkg_info -e 'wildcard-*'


*** Watch the package list of the wildcard-app-wildcards-1.0 package. Note
    the dependency on a wildcard pkg version.

noon# pkg_info -qf ftp://localhost/pub/NetBSD/packages/All/wildcard-app-wildcards-1.0.tgz
@name wildcard-app-1.0
@cwd /usr/pkg
@pkgdep wildcard-lib-1.?
@comment $NetBSD$
@cwd .
@ignore
+COMMENT
@ignore
+DESC
@ignore
+BUILD_VERSION
@ignore
+BUILD_INFO


*** pkg_add the wildcard-appp-wildcards-1.0 package. Note the expansion of
    the wildcard to the latest package available on the FTP server that
    matches the required pattern. 

noon# pkg_add -v ftp://localhost/pub/NetBSD/packages/All/wildcard-app-wildcards-1.0.tgz
Trying to fetch ftp://localhost/pub/NetBSD/packages/All/wildcard-app-wildcards-1.0.tgz.
Package `wildcard-app-1.0' depends on `wildcard-lib-1.?'.
HF: expandURL('ftp://localhost/pub/NetBSD/packages/All/wildcard-lib-1.?.tgz')'ing #1
'ftp://localhost/pub/NetBSD/packages/All/wildcard-lib-1.?.tgz' expanded to 'ftp://localhost/pub/NetBSD/packages/All/wildcard-lib-1.5.tgz'
Trying to fetch ftp://localhost/pub/NetBSD/packages/All/wildcard-lib-1.5.tgz.
extract: Package name is wildcard-lib-1.5
extract: CWD to /usr/pkg
extract: CWD to .
Attempting to record package into /var/db/pkg/wildcard-lib-1.5.
Package wildcard-lib-1.5 registered in /var/db/pkg/wildcard-lib-1.5
Finished loading ftp://localhost/pub/NetBSD/packages/All/wildcard-lib-1.5.tgz over FTP.
	`wildcard-lib-1.?' loaded successfully as `ftp://localhost/pub/NetBSD/packages/All/wildcard-lib-1.5.tgz'.
extract: Package name is wildcard-app-1.0
extract: CWD to /usr/pkg
extract: CWD to .
Attempting to record package into /var/db/pkg/wildcard-app-1.0.
Attempting to record dependency on package `wildcard-lib-1.?'
Package wildcard-app-1.0 registered in /var/db/pkg/wildcard-app-1.0


*** See what we have now. Voila!

noon# pkg_info -e wildcard*
wildcard-lib-1.5
wildcard-app-1.0


*** Remove it:

noon# pkg_delete -R -v wildcard-app
Change working directory to /usr/pkg
Change working directory to .
Change working directory to /usr/pkg
Change working directory to .
Attempting to remove dependency on package `wildcard-lib-1.?'
Building list of packages that `wildcard-app-1.0' required
deinstalling wildcard-lib-1.?


*** Make sure everything is gone:

noon# pkg_info -e 'wildcard*'


*** Thanks for your attention!

noon# 


 - Hubert

-- 
NetBSD - Better for your uptime than Viagra