<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.finkproject.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chris01</id>
	<title>the Fink Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.finkproject.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chris01"/>
	<link rel="alternate" type="text/html" href="https://wiki.finkproject.org/index.php/Special:Contributions/Chris01"/>
	<updated>2026-04-15T10:49:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.finkproject.org/index.php?title=Fink:PackageDatabase:NewDesign&amp;diff=81</id>
		<title>Fink:PackageDatabase:NewDesign</title>
		<link rel="alternate" type="text/html" href="https://wiki.finkproject.org/index.php?title=Fink:PackageDatabase:NewDesign&amp;diff=81"/>
		<updated>2007-09-24T13:15:41Z</updated>

		<summary type="html">&lt;p&gt;Chris01: Howto is now updated /* File cleanup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
== Ideas about Improving the PDB ==&lt;br /&gt;
&lt;br /&gt;
This page collectes ideas on what could and should be improved in the [http://pdb.finkproject.org/pdb/ Package Database (pdb)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Setup ==&lt;br /&gt;
&lt;br /&gt;
A demo of how the new PDB could look can be found at http://finch.finkproject.org/~chris01/fink_web/pdb/ . The corresponding files are on finch.finkproject.org . The scripts can be found at:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;finch.finkproject.org:/home/chris01/new_pdb/scripts/pdb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files there are checked out from the [http://fink.cvs.sourceforge.net/fink/scripts/pdb/?pathrev=redesign_pdb redesign_pdb branch]. And the web pages are at:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;finch.finkproject.org:/home/chris01/public_html/fink_web/pdb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
also checked out from the [http://fink.cvs.sourceforge.net/fink/web/pdb/?pathrev=redesign_pdb redesign_pdb branch]. The [http://fink.cvs.sourceforge.net/fink/scripts/pdb/HOWTO?view=markup&amp;amp;pathrev=redesign_pdb HOWTO] file describes how to clean out the db and start fresh.&lt;br /&gt;
&lt;br /&gt;
The database can be accessed through the [https://finch.finkproject.org/phpmyadmin/ phpMyAdmin web] interface.&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT''': Always use the [http://fink.cvs.sourceforge.net/fink/scripts/pdb/update.sh?view=markup&amp;amp;pathrev=redesign_pdb update.sh] script to update the cvs checkouts. This scripts fixes the group permissions so that everybody has access to the files. However, for the php files there is no such script. So make sure you do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod -R g+w *&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Backend: Implementation issues, Database Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
In this section, we talk about the &amp;quot;behind the scenes&amp;quot; code of the package database,&lt;br /&gt;
i.e. the parts not visible to users&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
* Incremental update of package db table. E.g.: ([[User:Chris01|chris01]])&lt;br /&gt;
** create a temporary table with new entries&lt;br /&gt;
** Remove everything from old table not in temp table&lt;br /&gt;
** Update entries already in old table&lt;br /&gt;
** Add entries only in temp table&lt;br /&gt;
** &amp;lt;s&amp;gt;and dmacks says: &amp;quot;Now just a minute, why doesn't index.php just do SELECT COUNT(DISTINCT name) FROM package; ?&amp;quot;&amp;lt;/s&amp;gt; ([[User:Chris01|chris01]])&lt;br /&gt;
* &amp;lt;s&amp;gt;Links to the info files in cvs, and last changed date.&amp;lt;/s&amp;gt; ([[User:Chris01|chris01]])&lt;br /&gt;
* &amp;lt;s&amp;gt;Better formatting of the Desc fields&amp;lt;/s&amp;gt; ([[User:Chris01|chris01]])&lt;br /&gt;
* &amp;lt;s&amp;gt;Show info about a specific version, e.g. http://www.finkproject.org/pdb/package.php/cups-dev?version=1.1.15-2&amp;lt;/s&amp;gt;([[User:Chris01|chris01]])&lt;br /&gt;
** &amp;lt;s&amp;gt;In the same vein, it should always be clearly visible which version is being displayed -- maybe display that information in the the title, so instead of &amp;quot;Package cups-dev&amp;quot; it shows &amp;quot;Package cups-dev 1.1.20-11&amp;quot;; alternatively, add a &amp;quot;Version:&amp;quot; entry to the table&amp;lt;/s&amp;gt; ([[User:Fingolfin|Fingolfin]])&lt;br /&gt;
** &amp;lt;s&amp;gt;The table on package.php which shows the latest known versions of a given package for each dist/tree would probably be linking to these &amp;quot;specific version&amp;quot; pages&amp;lt;/s&amp;gt; ([[User:Fingolfin|Fingolfin]])&lt;br /&gt;
* &amp;lt;s&amp;gt;exclude virtuals, or handle them gracefully, e.g. by showing all possible virtual packages without a version number, might be difficult&amp;lt;/s&amp;gt; ([[User:Chris01|chris01]]: just don't show them.)&lt;br /&gt;
* &amp;lt;s&amp;gt;omit actual locally-installed fink if it is present&amp;lt;/s&amp;gt;&lt;br /&gt;
* Why are there entries in the old pdb for packages that are no longer in any dist? (E.g. [http://pdb.finkproject.org/pdb/package.php/archive-zip-pm586-man archive-zip-pm586-man]) ([[User:Chris01|chris01]])&lt;br /&gt;
** They're available only in dists that aren't displayed in the table (flags/&amp;quot;latest&amp;quot; doesn't know releases.inc and package.php only looks at &amp;quot;latest&amp;quot;). archive-zip-pmXXX-man is present in current-10.4-transitional-unstable only. ([[User:Dmacks|DMacks]] 03:22, 30 January 2007 (CET))&lt;br /&gt;
** So we should discuss how we deal with entries of old releases. I suggest: don't show them in the index anymore. Objections? ([[User:Chris01|chris01]])&lt;br /&gt;
* &amp;lt;s&amp;gt;Show DescUsage&amp;lt;/s&amp;gt; ([[User:Chris01|chris01]])&lt;br /&gt;
* Do we want to hide some information for the default package page, and have an expert mode (e.g. DescUsage, dependencies, CVS, etc.) ([[User:Chris01|chris01]])&lt;br /&gt;
* Show dependencies? ([[User:Chris01|chris01]]) And should that include BuildDepends? ([[User:Alexkhansen|akh]])&lt;br /&gt;
* &amp;lt;s&amp;gt;Fixed a bug where packages were shown in a bindist even though the license was 'Restrictive' at the time of the bindist (e.g. svn-ssl)&amp;lt;/s&amp;gt; ([[User:Chris01|chris01]])&lt;br /&gt;
* How about displaying the output of &amp;quot;fink validate&amp;quot; for every .info file, too? (We would have to store it in the DB, too, for this to work, of course). Benefit: This might coerce some more packagers into validating their packages, as they get a nice shiny green &amp;quot;Package is valid&amp;quot; vs. a list of yellow/orange &amp;quot;Validation warnings/errors&amp;quot;. ([[User:Fingolfin|Fingolfin]])&lt;br /&gt;
* Should 'htdocs/pdb/db.inc.php' used in header.inc be the same as 'htdocs/db.inc.php'? ([[User:Chris01|chris01]])&lt;br /&gt;
* &amp;lt;s&amp;gt;Improve selecting splitoffs in package.php (include version info in link) ([[User:Chris01|chris01]])&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Make links to splitoffs version/release specific, if package.php was called with version/release parameters ([[User:Chris01|chris01]])&amp;lt;/s&amp;gt;&lt;br /&gt;
* Is &amp;quot;[http://sourceforge.net/tracker/?func=detail&amp;amp;aid=1606084&amp;amp;group_id=17203&amp;amp;atid=117203 pdb doesn't see the &amp;quot;current&amp;quot; distribution (Fink Bug # 1606084)]&amp;quot; solved?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the DB table layout ===&lt;br /&gt;
&lt;br /&gt;
* The PDB SQL format is not in the proper form for a relational DB ([[User:Fingolfin|Fingolfin]])&lt;br /&gt;
** &amp;lt;s&amp;gt;fullname is redundant and should go&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;latest and needtest appear redundant, too&amp;lt;/s&amp;gt; ([[User:Chris01|Chris01]])&lt;br /&gt;
** &amp;lt;s&amp;gt;desclong is preformated, instead of leaving this formatting to the presentation layer&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;quot;release&amp;quot; table should be refactored:&amp;lt;/s&amp;gt;&lt;br /&gt;
*** &amp;lt;s&amp;gt;the name &amp;quot;release&amp;quot; for the table / &amp;quot;package&amp;quot; field seems inappropriate. How about changing it to &amp;quot;distribution&amp;quot; ?&amp;lt;/s&amp;gt;&lt;br /&gt;
*** &amp;lt;s&amp;gt;or rather, it might be split (for the sake of normalization): have a distribution&amp;quot; table, which contains: OS/distro, and priority&amp;lt;/s&amp;gt;&lt;br /&gt;
*** &amp;lt;s&amp;gt;then, have a &amp;quot;release&amp;quot; (better name?) table, which contains:  distro, type (stable/unstable/bindist), version (like &amp;quot;0.8.1&amp;quot; or &amp;quot;current&amp;quot;).&amp;lt;/s&amp;gt;&lt;br /&gt;
*** &amp;lt;s&amp;gt;that way, we have normalized the data, and get rid of releases.inc as it is now trivial to find the stable tree matching an unstable tree and vice versa.&amp;lt;/s&amp;gt;&lt;br /&gt;
*** &amp;lt;s&amp;gt;however, I am not quite sure how one would now properly &amp;quot;link&amp;quot; packages to their release? Either we keep the current &amp;quot;release name&amp;quot; (somewhat contrary to normalization), or we simply number the releases sequentially, and use that number as key).&amp;lt;/s&amp;gt;&lt;br /&gt;
*** &amp;lt;s&amp;gt;I suggest the the following DB schema and content for the dist/release tables: [[Fink:PackageDatabase:NewSchema]] ([[User:Chris01|Chris01]])&amp;lt;/s&amp;gt;&lt;br /&gt;
** Consider performing some [http://en.wikipedia.org/wiki/Database_normalization database normalization], at least 1NF or even 2NF/3NF&lt;br /&gt;
*** some of the suggestions above already lead into that direction). &lt;br /&gt;
*** not sure whether this would actually help us, though, considering we automatically create the content of the DB. However, since normalization helps keep data integretity, it might make incremental updating safe(er)&lt;br /&gt;
*** What else should be normalized? sections, maintainers, what else? ([[User:Chris01|Chris01]])&lt;br /&gt;
&lt;br /&gt;
=== File cleanup ===&lt;br /&gt;
This refers to the PDB related files in our repository. Some of them could/should be removed, renamed, documented or otherwise modified.&lt;br /&gt;
&lt;br /&gt;
The following files are in web/pdb:&lt;br /&gt;
* &amp;lt;s&amp;gt;list.php, maintainer.php, nomaintainer.php, search.php, section.php: have all been changed to simply redirect to browse.php&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;testing.php: can eventually be replaced by a redirect to browse.php (once we have refactored the &amp;quot;release&amp;quot; DB table appropriately)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;compare.php: allowed comparing trees, currently not functional: Remove it for now (can easily be restored from CVS should we need to reimplement this feature at some point)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;releases.inc: This should go, instead all the relevant information should be stored in the DB alone (this makes maintanance easier). For this, the &amp;quot;release&amp;quot; DB table needs to be refactored, see elsewhere on this page&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Suspected part of clef's work on .deb contents db [[User:Dmacks|DMacks]]&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;submit.php: Looks like dead code, remove it?&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;packagedetails.php: This seems to be &amp;quot;dead&amp;quot; code: It could in theory be reached by a hidden and currently not working &amp;quot;search package content&amp;quot; feature of search.php: Go to http://pdb.finkproject.org/pdb/search.php?c=1 . Could probably be completly removed&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files are in scripts/pdb:&lt;br /&gt;
* &amp;lt;s&amp;gt;HOWTO: Needs to be updated at some point. It seems that it hasn't received much attention in recent years, as it doesn't even mention pdb_full_update-piecewise and pdb_full_update-unified&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;flag: This evil beast is used for setting the &amp;quot;latest&amp;quot; and &amp;quot;needtest&amp;quot; flags -- once we remove those, it can finally be gone for good, yay :)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;pdb_full_update-unified: This is long unused and no longer certain it's been updated in sync with -piecewise. No longer used because the full update can be too large or slow and hit CPU or timeout limits.&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;pdb_full_update-piecewise: This is the actual update script run by cron to update the databases.&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Frontend: Web interface ==&lt;br /&gt;
&lt;br /&gt;
In this section, we are concerned with the user interface of the package database,&lt;br /&gt;
i.e. the parts of it with which the user interacts.&lt;br /&gt;
&lt;br /&gt;
=== Usability ===&lt;br /&gt;
&lt;br /&gt;
* Limit the amount of data sets returned for large queries, could happen with a LIMIT in the DB, provided the whole result is cached&lt;br /&gt;
* Look into better display possibilities, like a faked scrolling that actually updates inside the page using AJAX&lt;br /&gt;
* Investigate meaningful colour coding (might also help visually impaired)&lt;br /&gt;
* Make sure there is a stripped down, no frills, no javascript version for command line access&lt;br /&gt;
* Move as much as possible of the layout into CSS&lt;br /&gt;
* &amp;lt;s&amp;gt;Displayed advanced fields only when they are necessary in context or an advanced option is active&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Simplify, simplify and simplify&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;The two &amp;quot;Exclude...&amp;quot; options at the bottom of the &amp;quot;Browse...&amp;quot; search form seem redundant at first glance. Maybe this could be moved to another &amp;quot;Advanced&amp;quot; section. --[[User:Charleslepple|Charleslepple]] 04:02, 13 March 2007 (CET)&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;The 'Clear Form' button should always set the form fields back to default (emtpy, Any, etc.). This probably needs some javascripting. --[[User:chris01|chris01]]&amp;lt;/s&amp;gt;&lt;br /&gt;
*&amp;lt;s&amp;gt;Improvements in parsing of Maintainer:  when one puts in ''finchproject.org'' for the maintainer, [[all]] of the packages show up--similarly if I use ''akh@finkproject.org''.&amp;lt;/s&amp;gt;--[[User:Alexkhansen|Alexkhansen]] 21:53, 12 March 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
=== Improved HTML code ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;s&amp;gt;Add type=&amp;quot;text/css&amp;quot; to every css link markups&amp;lt;/s&amp;gt;&lt;br /&gt;
*&amp;lt;s&amp;gt;Copyright &amp;amp;copy 2001-2007 instead of Copyright copy 2001-2007&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;There was already an ampersand but the ending semicolon was missing in the lower-left of the webpages. Is that what you meant?&amp;lt;/s&amp;gt; [[User:Dmacks|DMacks]] 22:53, 26 January 2007 (CET)&lt;br /&gt;
* &amp;lt;s&amp;gt;Encode the url, i.e : &amp;lt;a href=&amp;quot;../maintainer.php?maintainer=Jeffrey%20Whitaker&amp;quot;&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
*I would have use a definition list dl, dt, dd for the part under the pkgversion table. Ex: http://www.maxdesign.com.au/presentation/definition/dl-table-display.htm&lt;br /&gt;
**Seems reasonable. Also improves accessibility (logical relationship of dd to its dt vs just adjacent table cells). Can &amp;amp;lt;div&amp;amp;gt; still be used within dd so that we can manipulate the positioning of the full description?&lt;br /&gt;
***Different span classes may be defined to handle the position of various parts of description. See an example here: http://micmacfr.homeunix.org/translate.shtml.shtml&lt;br /&gt;
* &amp;lt;s&amp;gt;Display browse.php results in a table instead of a list? Might make it more readable.&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP Code ===&lt;br /&gt;
&lt;br /&gt;
*Add modularity to the code. I looked at browse.php and it is frightening. Everything is happening piece after piece without any logical workflow. I will try to rewrite it and will drop here a link for revision by others --[[User:Jimi Dini|Jimi Dini]] 17:49, 18 April 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
=== Other === &lt;br /&gt;
(possibly to be moved to another section)&lt;br /&gt;
&lt;br /&gt;
{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Fink|Package Database New Redesign]]&lt;br /&gt;
[[Category: Fink Structure|Package Database New Redesign]]&lt;/div&gt;</summary>
		<author><name>Chris01</name></author>
	</entry>
	<entry>
		<id>https://wiki.finkproject.org/index.php?title=Fink:PackageDatabase:NewSchema&amp;diff=71</id>
		<title>Fink:PackageDatabase:NewSchema</title>
		<link rel="alternate" type="text/html" href="https://wiki.finkproject.org/index.php?title=Fink:PackageDatabase:NewSchema&amp;diff=71"/>
		<updated>2007-02-20T19:49:52Z</updated>

		<summary type="html">&lt;p&gt;Chris01: collate ascii_general_ci&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
Possible new layout for a distribution/release db. It should replace the existing release table and also the  [http://fink.cvs.sourceforge.net/fink/web/pdb/releases.inc?view=markup&amp;amp;pathrev=redesign_pdb releases.inc] file. The code below will go into the [http://fink.cvs.sourceforge.net/fink/scripts/pdb/schema.sql?view=markup&amp;amp;pathrev=redesign_pdb schema.sql] and [http://fink.cvs.sourceforge.net/fink/scripts/pdb/releases.sql?view=markup&amp;amp;pathrev=redesign_pdb releases.sql]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
create table if not exists distribution (&lt;br /&gt;
  dist_id int unsigned not null auto_increment,&lt;br /&gt;
  identifier varchar(16) not null,&lt;br /&gt;
  description varchar(64) not null default '',&lt;br /&gt;
  architecture enum('powerpc', 'i386') not null default 'powerpc',&lt;br /&gt;
  priority tinyint unsigned not null default '1',&lt;br /&gt;
  active boolean default 1,&lt;br /&gt;
  primary key (dist_id)&lt;br /&gt;
) collate ascii_general_ci;&lt;br /&gt;
&lt;br /&gt;
create table if not exists distribution_releases (&lt;br /&gt;
  rel_id int unsigned not null auto_increment,&lt;br /&gt;
  dist_id int unsigned not null references distribution(dist_id),&lt;br /&gt;
  type enum('bindist', 'stable', 'unstable') not null,&lt;br /&gt;
  version varchar(16) not null,&lt;br /&gt;
  priority tinyint unsigned not null default '1',&lt;br /&gt;
  active boolean default 1,&lt;br /&gt;
  primary key (rel_id)&lt;br /&gt;
) collate ascii_general_ci;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
insert into distribution (dist_id, identifier, description, architecture, priority, active) values (null, '10.1', '10.1', 'powerpc', 1, 1);&lt;br /&gt;
select @last_dist_id := last_insert_id();&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'bindist',  '0.4.1', 1, 1);&lt;br /&gt;
&lt;br /&gt;
insert into distribution (dist_id, identifier, description, architecture, priority, active) values (null, '10.2-gcc3.3', '10.2\n(gcc3.3 only)', 'powerpc', 2, 1);&lt;br /&gt;
select @last_dist_id := last_insert_id();&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'unstable', 'current', 3, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'stable',   'current', 2, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'bindist',  '0.6.4', 1, 1);&lt;br /&gt;
&lt;br /&gt;
insert into distribution (dist_id, identifier, description, architecture, priority, active) values (null, '10.3', '10.3', 'powerpc', 3, 1);&lt;br /&gt;
select @last_dist_id := last_insert_id();&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'unstable', 'current', 3, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'stable',   'current', 2, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'bindist',  '0.7.2', 1, 1);&lt;br /&gt;
&lt;br /&gt;
insert into distribution (dist_id, identifier, description, architecture, priority, active) values (null, '10.4', '10.4/powerpc', 'powerpc', 4, 1);&lt;br /&gt;
select @last_dist_id := last_insert_id();&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'unstable', 'current', 3, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'stable',   'current', 2, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'bindist',  '0.8.1', 1, 1);&lt;br /&gt;
&lt;br /&gt;
insert into distribution (dist_id, identifier, description, architecture, priority, active) values (null, '10.4', '10.4/intel', 'i386', 5, 1);&lt;br /&gt;
select @last_dist_id := last_insert_id();&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'unstable', 'current', 3, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'stable',   'current', 2, 1);&lt;br /&gt;
insert into distribution_releases (rel_id, dist_id, type, version, priority, active) values (null, @last_dist_id, 'bindist',  '0.8.1', 1, 1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the corresponding package schema:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
create table if not exists package (&lt;br /&gt;
 pkg_id int unsigned not null auto_increment,&lt;br /&gt;
 rel_id int unsigned not null references distribution_releases(rel_id),&lt;br /&gt;
 name varchar(64) not null,&lt;br /&gt;
 parentname varchar(64),&lt;br /&gt;
 version varchar(64) not null,&lt;br /&gt;
 revision varchar (16) not null,&lt;br /&gt;
 epoch tinyint not null default '0',&lt;br /&gt;
 descshort varchar(80) not null default '',&lt;br /&gt;
 desclong text,&lt;br /&gt;
 descusage text,&lt;br /&gt;
 maintainer varchar(255),&lt;br /&gt;
 license varchar(64),&lt;br /&gt;
 homepage varchar(255),&lt;br /&gt;
 section varchar(32) not null,&lt;br /&gt;
 infofile varchar(255) not null default '',&lt;br /&gt;
 infofilechanged datetime,&lt;br /&gt;
 primary key (pkg_id),&lt;br /&gt;
 index (name),&lt;br /&gt;
 index (section),&lt;br /&gt;
 index (rel_id)&lt;br /&gt;
) collate ascii_general_ci;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Fink|Package Database New Schema]]&lt;br /&gt;
[[Category: Fink Structure|Package Database New Schema]]&lt;/div&gt;</summary>
		<author><name>Chris01</name></author>
	</entry>
	<entry>
		<id>https://wiki.finkproject.org/index.php?title=Fink:Policy:Packaging_Java&amp;diff=47</id>
		<title>Fink:Policy:Packaging Java</title>
		<link rel="alternate" type="text/html" href="https://wiki.finkproject.org/index.php?title=Fink:Policy:Packaging_Java&amp;diff=47"/>
		<updated>2007-02-20T14:44:00Z</updated>

		<summary type="html">&lt;p&gt;Chris01: Reverted edit of Zenek, changed back to last version by RangerRick&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
There is no official &amp;quot;policy&amp;quot; per se for packaging Java software in Fink, but there are a number of best practices that make it easier.&lt;br /&gt;
&lt;br /&gt;
== The '''''Type''''' Field ==&lt;br /&gt;
&lt;br /&gt;
By default, if you use &amp;lt;code&amp;gt;Type: java&amp;lt;/code&amp;gt; without specifying a version, Fink will use the '''lowest''' JDK found in /System/Library/Frameworks/JavaVM.framework/Versions.  So if you have a 1.3.1, 1.4.2, and 1.5.0 JDK on your system, it will use the 1.3.1.&lt;br /&gt;
&lt;br /&gt;
If you use &amp;lt;code&amp;gt;Type: java('''version''')&amp;lt;/code&amp;gt; (i.e., &amp;lt;code&amp;gt;Type: java(1.4)&amp;lt;/code&amp;gt;), it will use the '''highest''' JDK found that matches that version.  So if you have both a 1.4.1 and 1.4.2 JDK on your system, it will use the 1.4.2 JDK.&lt;br /&gt;
&lt;br /&gt;
Regardless of whether you use the versioned or unversioned field, as long as you're setting &amp;lt;code&amp;gt;Type: java&amp;lt;/code&amp;gt;, the build environment inside your package will have the following extra environment variables set:&lt;br /&gt;
&lt;br /&gt;
  JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/''&amp;lt;code&amp;gt;detected_version&amp;lt;/code&amp;gt;''/Home&lt;br /&gt;
  PATH      /System/Library/Frameworks/JavaVM.framework/Versions/''&amp;lt;code&amp;gt;detected_version&amp;lt;/code&amp;gt;''/Home/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
== Using the '''''Type''''' Field Effectively ==&lt;br /&gt;
&lt;br /&gt;
There are 2 major ways it is recommended to package Java software, depending on whether you want to require a specific JDK, or you want to target a specific JDK or higher.&lt;br /&gt;
&lt;br /&gt;
=== Requiring a Specific JDK ===&lt;br /&gt;
&lt;br /&gt;
If you want to ensure your software is compiled with, say, the 1.4 JDK, use:&lt;br /&gt;
&lt;br /&gt;
  Type: java(1.4)&lt;br /&gt;
&lt;br /&gt;
This will detect a JDK of that specific major and minor version number, and set &amp;lt;code&amp;gt;JAVA_HOME&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt; respectively.  If the software you are packaging uses &amp;lt;code&amp;gt;javac -target&amp;lt;/code&amp;gt; (or ant's &amp;amp;lt;javac target=&amp;quot;&amp;quot;/&amp;amp;gt; notation), it will still use the JDK that you specified, but generate bytecode compatible with the target given.&lt;br /&gt;
&lt;br /&gt;
=== Using The Available JDK (recommended) ===&lt;br /&gt;
&lt;br /&gt;
The problem with using &amp;lt;code&amp;gt;Type: java(1.4)&amp;lt;/code&amp;gt; is that it requires a specific JDK, even if later ones are available.  The primary reason to do so is to be able to create bytecode usable by older JDKs.&lt;br /&gt;
&lt;br /&gt;
Instead, it is recommended to do the following:&lt;br /&gt;
&lt;br /&gt;
  Package: myjavapackage&lt;br /&gt;
  Type: java&lt;br /&gt;
  Depends: system-java (&amp;gt;= 1.4-1)&lt;br /&gt;
  BuildDepends: system-java-dev (&amp;gt;= 1.4-1)&lt;br /&gt;
  Patch: %n.patch&lt;br /&gt;
&lt;br /&gt;
Create a patch that makes sure that javac is being called with a target of 1.4.  In the case of an ant build.xml, change any entries like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;javac srcdir=&amp;quot;foo&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;patternset refid=&amp;quot;foo.files&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/javac&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...into...&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;javac target=&amp;quot;1.4&amp;quot; srcdir=&amp;quot;foo&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;patternset refid=&amp;quot;foo.files&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/javac&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of some other tool calling &amp;lt;code&amp;gt;javac&amp;lt;/code&amp;gt;, you can pass &amp;quot;&amp;lt;code&amp;gt;-target&amp;lt;/code&amp;gt;&amp;quot; on the &amp;lt;code&amp;gt;javac&amp;lt;/code&amp;gt; command-line.&lt;br /&gt;
&lt;br /&gt;
This lets you not care what JDK is installed, as long as it's 1.4 or newer.&lt;br /&gt;
&lt;br /&gt;
== Problems with specific JDKs ==&lt;br /&gt;
&lt;br /&gt;
; as of release 1.5, 'enum' is a keyword, and may not be used as an identifier : The 1.5 JDK adds some new keywords to the language, like &amp;lt;code&amp;gt;enum&amp;lt;/code&amp;gt;.  In some cases, you might need to add &amp;lt;code&amp;gt;source=&amp;quot;1.4&amp;quot;&amp;lt;/code&amp;gt; to your build.xml (or &amp;lt;code&amp;gt;-source 1.4&amp;lt;/code&amp;gt; on the javac command-line) to make things work correctly.&lt;br /&gt;
&lt;br /&gt;
{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Fink|Policy:Packaging Java]]&lt;br /&gt;
[[Category: Fink_Documentation|Policy:Packaging Java]]&lt;/div&gt;</summary>
		<author><name>Chris01</name></author>
	</entry>
	<entry>
		<id>https://wiki.finkproject.org/index.php?title=Fink:Roadmap:0.25_new_features&amp;diff=37</id>
		<title>Fink:Roadmap:0.25 new features</title>
		<link rel="alternate" type="text/html" href="https://wiki.finkproject.org/index.php?title=Fink:Roadmap:0.25_new_features&amp;diff=37"/>
		<updated>2006-12-12T21:03:46Z</updated>

		<summary type="html">&lt;p&gt;Chris01: changes based on dmacks comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
===New features in fink 0.25===&lt;br /&gt;
&lt;br /&gt;
* [[Fink:Roadmap:0.25 new features:Incremental indexing|Incremental Indexing]]&lt;br /&gt;
&lt;br /&gt;
* SkipPrompts&lt;br /&gt;
** Any more categories users would like?&lt;br /&gt;
&lt;br /&gt;
* Info3&lt;br /&gt;
** Can indent nicely in .info files&lt;br /&gt;
** No more support for RFC-822 multi-lines&lt;br /&gt;
** Can put comments in pkglist fields&lt;br /&gt;
&lt;br /&gt;
* fast scanpackages with apt-ftparchive&lt;br /&gt;
&lt;br /&gt;
* auto-detection of country&lt;br /&gt;
&lt;br /&gt;
* Validator fixes:&lt;br /&gt;
** detect InfoN property (should be wrapper)&lt;br /&gt;
&lt;br /&gt;
* New &amp;lt;code&amp;gt;--trees&amp;lt;/code&amp;gt; option restricts fink to using .info files in the chosen tree(s).&lt;br /&gt;
&lt;br /&gt;
* new [[Fink:fink cleanup|fink cleanup]] syntax&lt;br /&gt;
&lt;br /&gt;
* New &amp;lt;code&amp;gt;--maintainer&amp;lt;/code&amp;gt; mode&lt;br /&gt;
&lt;br /&gt;
* New &amp;lt;code&amp;gt;--log-output&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--logfile&amp;lt;/code&amp;gt; flags to save transcripts of package building process&lt;br /&gt;
&lt;br /&gt;
* Integrated scanpackages, including ability to not index restrictive packages.&lt;br /&gt;
&lt;br /&gt;
* [[Fink:Major_New_Feature_Plans:Test_suite|Support for running package test suites]]&lt;br /&gt;
&lt;br /&gt;
* reevaluate fink --tree=stable list&lt;br /&gt;
* Validator:&lt;br /&gt;
** Complain about [https://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=702802&amp;amp;group_id=17203&amp;amp;atid=367203 &amp;gt; and &amp;lt; in dependency versioning]  (in .info).&lt;br /&gt;
** dmacks: complete overhaul of .deb (val-unpack branch)&lt;br /&gt;
** InfoN validator patch '''vasi fixed it the way he likes it'''&lt;br /&gt;
* RangerRick: 'fink build foo-1.0-1' where a .deb exists in the bindist for foo-1.0-1 and UseBinaryDist is true should build locally, not fetch from the bindist.&lt;br /&gt;
* Info3: allow comment lines in pkglist fields&lt;br /&gt;
&amp;lt;pre&amp;gt;Depends: &amp;lt;&amp;lt;&lt;br /&gt;
  #foo-shlibs,   foo is static-only right now&lt;br /&gt;
  bar-shlibs&lt;br /&gt;
&amp;lt;&amp;lt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chown -h&amp;lt;/code&amp;gt; functionality during --build-as-nobody (use Command:chowname_hr?)&lt;br /&gt;
* dmacks: overhaul buildlocks to go away more automatically and have a cleaner cleanup&lt;br /&gt;
** Automatically do cleanup when embarking on a package installation or removal&lt;br /&gt;
* dmacks: buildlock destruction&lt;br /&gt;
** Checking via lock_wait and PreRm&lt;br /&gt;
** Removal on build failure via Fink::Finally&lt;br /&gt;
* remove line-number in SysState error&lt;br /&gt;
* BuildConflicts breakage&lt;br /&gt;
* chown_hR is still leaving nobody-owned links.&lt;br /&gt;
* progress bar during indexing (&amp;quot;.&amp;quot; every 100 .info processed or every 10% of set of .info processed?)—newbies to HEAD have complained &amp;lt;code&amp;gt;index -f&amp;lt;/code&amp;gt; &amp;quot;has hung&amp;quot;...can take up to 5 minutes&lt;br /&gt;
* alternate checksum algorithms&lt;br /&gt;
&lt;br /&gt;
===Bug fixes in fink 0.25===&lt;br /&gt;
&lt;br /&gt;
* Fink no longer gets confused by debs in a local apt repository&lt;br /&gt;
&lt;br /&gt;
* When asking to choose mirrors, fink orders choices alphabetically properly, and presents a reasonable set of mirrors when the user asks for all those on a continent.&lt;br /&gt;
&lt;br /&gt;
* BuildConflicts should actually work&lt;br /&gt;
&lt;br /&gt;
* many more we've forgotten all about...&lt;br /&gt;
&lt;br /&gt;
{{Fink_Header}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Fink|Roadmap 0.25 New Features]]&lt;br /&gt;
[[Category: Fink_Roadmap|0.25 New Features]]&lt;/div&gt;</summary>
		<author><name>Chris01</name></author>
	</entry>
</feed>