Commit a9ba9d3a authored by Vincent Ma's avatar Vincent Ma

Fix for bug5271, add two steps in 2.1 to 2.2 migration.

git-svn-id: http://svn.code.sf.net/p/fossology/code/trunk/fossology@6791 a5643f74-2041-0410-a2b9-94ffef304a07
parent ee22516c
......@@ -100,6 +100,8 @@ uninstall:
rm -f $(DESTDIR)$(LIBEXECDIR)/fo-postinstall
rm -f $(DESTDIR)$(CONFPATH)/sampleheader.txt
rm -f $(DESTDIR)$(CONFPATH)/samplefooter.txt
rm -f $(DESTDIR)$(LIBEXECDIR)/fossinit.php
rm -f $(DESTDIR)$(LIBEXECDIR)/fo_dbcheck.php
@if [ -d $(DESTDIR)$(LIBEXECDIR) ]; then \
if [ "`ls -A $(DESTDIR)$(LIBEXECDIR)`" ]; then \
......
......@@ -18,6 +18,7 @@ install: all
$(INSTALL_DATA) dbmigrate_1.4-2.0.php $(DESTDIR)$(LIBEXECDIR)/dbmigrate_1.4-2.0.php
$(INSTALL_DATA) dbmigrate_2.0-2.1.php $(DESTDIR)$(LIBEXECDIR)/dbmigrate_2.0-2.1.php
$(INSTALL_DATA) dbmigrate_2.1-2.2.php $(DESTDIR)$(LIBEXECDIR)/dbmigrate_2.1-2.2.php
$(INSTALL_DATA) fo_mapping_license.php $(DESTDIR)$(LIBEXECDIR)/fo_mapping_license.php
$(INSTALL_PROGRAM) export_license_ref.php $(DESTDIR)$(LIBEXECDIR)/export_license_ref.php
$(INSTALL_PROGRAM) dbcreate $(DESTDIR)$(LIBEXECDIR)/dbcreate
......@@ -34,6 +35,11 @@ uninstall:
rm -f $(DESTDIR)$(LIBEXECDIR)/fossologyinit.sql
rm -f $(DESTDIR)$(LIBEXECDIR)/licenseref.sql
rm -f $(DESTDIR)$(LIBEXECDIR)/dbcreate
rm -f $(DESTDIR)$(LIBEXECDIR)/dbmigrate_1.4-2.0.php
rm -f $(DESTDIR)$(LIBEXECDIR)/dbmigrate_2.0-2.1.php
rm -f $(DESTDIR)$(LIBEXECDIR)/dbmigrate_2.1-2.2.php
rm -f $(DESTDIR)$(LIBEXECDIR)/export_license_ref.php
rm -f $(DESTDIR)$(LIBEXECDIR)/fo_mapping_license.php
@if [ -d $(DESTDIR)$(LIBEXECDIR) ]; then \
if [ "`ls -A $(DESTDIR)$(LIBEXECDIR)`" ]; then \
......
......@@ -160,6 +160,18 @@ function Migrate_21_22()
DBCheckResult($result, $sql, __FILE__, __LINE__);
pg_free_result($result);
/** Run program to rename licenses **/
global $LIBEXECDIR;
require_once("$LIBEXECDIR/fo_mapping_license.php");
print "Rename license in $LIBEXECDIR\n";
Rename_Licenses();
/** Clear out the report cache **/
print "Clear out the report cache.\n";
$sql = "DELETE FROM report_cache;";
$result = pg_query($PG_CONN, $sql);
DBCheckResult($result, $sql, __FILE__, __LINE__);
pg_free_result($result);
return 0; // success
} // Migrate_21_22
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment