[RFC] cygport: PKG_OBSOLETES

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Tue Jul 23 05:02:00 GMT 2013


I wanted to get feedback from those using cygport regarding a possible 
new feature: PKG_OBSOLETES.  This is best explained with an example, so 
let's say I had the following:

NAME="libfoo"
...
PKG_NAMES="libfoo1 libfoo-bin libfoo-devel"
libfoo1_CONTENTS="usr/bin/cygfoo-1.dll"
libfoo_bin_CONTENTS="etc/ usr/bin/*.exe usr/share/doc/ 
usr/share/man/man[15]"
libfoo_devel_CONTENTS="usr/include/ usr/lib/ usr/share/man/man3/"

It then becomes apparent that libfoo-bin is a really bad name for a 
package, because people looking for the executables aren't finding an 
obvious match in the package list.  Also, libfoo1 really needs those 
configuration files, so I decide to add a libfoo-common package, and 
rename libfoo-bin to foobar.  Right now, I could do the following:

PKG_NAMES="libfoo1 libfoo-bin libfoo-common libfoo-devel foobar"
libfoo1_REQUIRES="libfoo-common"
libfoo1_CONTENTS="usr/bin/cygfoo-1.dll"
libfoo_common_CONTENTS="etc/ usr/share/doc/ usr/share/man/man5/"
libfoo_bin_CATEGORY="_obsolete"
libfoo_bin_REQUIRES="foobar"
libfoo_bin_SUMMARY="Obsolete package"
libfoo_bin_CONTENTS= # empty
libfoo_devel_CONTENTS="usr/include/ usr/lib/ usr/share/man/man3/"
foobar_CONTENTS="usr/bin/*.exe usr/share/man/man1/"

While that works, that's a lot of lines to handle an empty package. 
What PKG_OBSOLETES could do is make that much simpler:

PKG_NAMES="libfoo1 libfoo-common libfoo-devel foobar"
libfoo1_REQUIRES="libfoo-common"
libfoo1_CONTENTS="usr/bin/cygfoo-1.dll"
libfoo_common_CONTENTS="etc/ usr/share/doc/ usr/share/man/man5/"
libfoo_devel_CONTENTS="usr/include/ usr/lib/ usr/share/man/man3/"
foobar_OBSOLETES="libfoo-bin"
foobar_CONTENTS="usr/bin/*.exe usr/share/man/man1/"

The attached patch is what I'm working with at the moment.  Thoughts?


Yaakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pkg-obsoletes.patch
Type: text/x-patch
Size: 2344 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20130723/f49b7c6e/attachment.bin>


More information about the Cygwin-apps mailing list