[haiku-commits] r40861 - in haiku/branches/features/package-management: headers/os/package src/bin/package src/bin/package_repo src/kits/package

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 7 Mar 2011 21:03:00 +0100 (CET)

Author: zooey
Date: 2011-03-07 21:03:00 +0100 (Mon, 07 Mar 2011)
New Revision: 40861
Changeset: http://dev.haiku-os.org/changeset/40861

Modified:
   haiku/branches/features/package-management/headers/os/package/PackageFlags.h
   haiku/branches/features/package-management/src/bin/package/command_list.cpp
   
haiku/branches/features/package-management/src/bin/package_repo/command_create.cpp
   
haiku/branches/features/package-management/src/bin/package_repo/command_list.cpp
   haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp
Log:
* add support for 'create_package_link' flag

Modified: 
haiku/branches/features/package-management/headers/os/package/PackageFlags.h
===================================================================
--- 
haiku/branches/features/package-management/headers/os/package/PackageFlags.h    
    2011-03-07 19:39:50 UTC (rev 40860)
+++ 
haiku/branches/features/package-management/headers/os/package/PackageFlags.h    
    2011-03-07 20:03:00 UTC (rev 40861)
@@ -10,10 +10,13 @@
 
 
 enum {
-       B_PACKAGE_FLAG_APPROVE_LICENSE  = 1ul << 0,
+       B_PACKAGE_FLAG_APPROVE_LICENSE          = 1ul << 0,
                // will trigger display and approval of license before 
installation
-       B_PACKAGE_FLAG_SYSTEM_PACKAGE   = 1ul << 1,
+       B_PACKAGE_FLAG_SYSTEM_PACKAGE           = 1ul << 1,
                // marks package as system package (i.e. belonging into 
/boot/system)
+       B_PACKAGE_FLAG_CREATE_PACKAGE_LINK      = 1ul << 2,
+               // package requires a corresponding link from 
/package-links/... to the
+               // base folder where the package has been activated
 };
 
 

Modified: 
haiku/branches/features/package-management/src/bin/package/command_list.cpp
===================================================================
--- haiku/branches/features/package-management/src/bin/package/command_list.cpp 
2011-03-07 19:39:50 UTC (rev 40860)
+++ haiku/branches/features/package-management/src/bin/package/command_list.cpp 
2011-03-07 20:03:00 UTC (rev 40861)
@@ -141,6 +141,10 @@
                                        printf("\t\tapprove_license\n");
                                if ((value.unsignedInt & 
B_PACKAGE_FLAG_SYSTEM_PACKAGE) != 0)
                                        printf("\t\tsystem_package\n");
+                               if ((value.unsignedInt & 
B_PACKAGE_FLAG_CREATE_PACKAGE_LINK)
+                                       != 0) {
+                                       printf("\t\tcreate_package_link\n");
+                               }
                                break;
 
                        case B_PACKAGE_INFO_ARCHITECTURE:

Modified: 
haiku/branches/features/package-management/src/bin/package_repo/command_create.cpp
===================================================================
--- 
haiku/branches/features/package-management/src/bin/package_repo/command_create.cpp
  2011-03-07 19:39:50 UTC (rev 40860)
+++ 
haiku/branches/features/package-management/src/bin/package_repo/command_create.cpp
  2011-03-07 20:03:00 UTC (rev 40861)
@@ -58,6 +58,8 @@
                                        printf("\t\tapprove_license\n");
                                if ((flags & B_PACKAGE_FLAG_SYSTEM_PACKAGE) != 
0)
                                        printf("\t\tsystem_package\n");
+                               if ((flags & 
B_PACKAGE_FLAG_CREATE_PACKAGE_LINK) != 0)
+                                       printf("\t\tcreate_package_link\n");
                        }
                } else
                        printf("\tchecksum: %s\n", 
packageInfo.Checksum().String());

Modified: 
haiku/branches/features/package-management/src/bin/package_repo/command_list.cpp
===================================================================
--- 
haiku/branches/features/package-management/src/bin/package_repo/command_list.cpp
    2011-03-07 19:39:50 UTC (rev 40860)
+++ 
haiku/branches/features/package-management/src/bin/package_repo/command_list.cpp
    2011-03-07 20:03:00 UTC (rev 40861)
@@ -88,6 +88,10 @@
                                        printf("\t\tapprove_license\n");
                                if ((value.unsignedInt & 
B_PACKAGE_FLAG_SYSTEM_PACKAGE) != 0)
                                        printf("\t\tsystem_package\n");
+                               if ((value.unsignedInt & 
B_PACKAGE_FLAG_CREATE_PACKAGE_LINK)
+                                       != 0) {
+                                       printf("\t\tcreate_package_link\n");
+                               }
                                break;
 
                        case B_PACKAGE_INFO_ARCHITECTURE:

Modified: 
haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp
===================================================================
--- haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp 
2011-03-07 19:39:50 UTC (rev 40860)
+++ haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp 
2011-03-07 20:03:00 UTC (rev 40861)
@@ -446,6 +446,8 @@
                        flags |= B_PACKAGE_FLAG_APPROVE_LICENSE;
                else if (token.text.ICompare("system_package") == 0)
                        flags |= B_PACKAGE_FLAG_SYSTEM_PACKAGE;
+               else if (token.text.ICompare("create_package_link") == 0)
+                       flags |= B_PACKAGE_FLAG_CREATE_PACKAGE_LINK;
                else {
                        throw ParseError("expected 'approve_license' or 
'system_package'",
                                token.pos);


Other related posts:

  • » [haiku-commits] r40861 - in haiku/branches/features/package-management: headers/os/package src/bin/package src/bin/package_repo src/kits/package - zooey