OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-registry Date: 22-Jun-2006 12:02:26
Branch: HEAD Handle: 2006062211022600
Modified files:
openpkg-registry registry-db.pl
Log:
change the database constraint to allow new official tags
Summary:
Revision Changes Path
1.24 +17 -1 openpkg-registry/registry-db.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-registry/registry-db.pl
============================================================================
$ cvs diff -u -r1.23 -r1.24 registry-db.pl
--- openpkg-registry/registry-db.pl 12 May 2006 19:42:31 -0000 1.23
+++ openpkg-registry/registry-db.pl 22 Jun 2006 10:02:26 -0000 1.24
@@ -404,6 +404,22 @@
return 1;
}
+ # 0.4.0 upgrade to 0.4.1
+ #
+ elsif ( $dbv->{version}->{major} == 0
+ and $dbv->{version}->{minor} == 4
+ and $dbv->{version}->{patch} == 0 ) {
+ $sql = "";
+ my $constraint = q{ CHECK (registry_orel ~
'^[^-]+-((CURRENT|CURRENT-[0-9]+|[^.-]+-STABLE|[^.-]+-STABLE-[0-9]+|[^.-]+\.[^.-]+-SOLID|[^.-]+\.[^.-]+-SOLID-[0-9]+|[^.-]+\.[^.-]+-RELEASE).*|[0-9]+\.[0-9]+)$')
};
+ $sql .= sprintf("ALTER TABLE reg_instance DROP CONSTRAINT
reg_instance_registry_orel_check;\n");
+ $sql .= sprintf("ALTER TABLE reg_instance ADD CONSTRAINT
reg_instance_registry_orel_check $constraint;\n");
+ $sql .= &funcregistry();
+ $sql .= sprintf("UPDATE reg_config SET value = '0.4.1';\n");
+ $rv = $dbh->do($sql);
+ print "$sql\nrv=".$rv." message=".$dbh->errstr."\n\n"; die if
($dbh->errstr =~ m|ERROR|);
+ return 1;
+ }
+
# program data version and database version only differ in patchlevel
- just uprev the number
#
elsif ( $dbv->{version}->{major} == $datavers->{major}
@@ -578,7 +594,7 @@
-- output from openpkg rpm --eval '%{l_platform -p}'
-- [ix86-freebsd5.4]
registry_orel TEXT
- CHECK (registry_orel ~
'^[^-]+-(CURRENT|[0-9]+\.[0-9]+)$'),
+ CHECK (registry_orel ~
'^[^-]+-((CURRENT|CURRENT-[0-9]+|[^.-]+-STABLE|[^.-]+-STABLE-[0-9]+|[^.-]+\.[^.-]+-SOLID|[^.-]+\.[^.-]+-SOLID-[0-9]+|[^.-]+\.[^.-]+-RELEASE).*|[0-9]+\.[0-9]+)$'),
-- output from openpkg rpm --eval
'%{l_openpkg_release}'
-- [OpenPKG-2.5]
registry_date TIMESTAMP (0) WITHOUT TIME ZONE
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]