import: add --orphan-packaging option
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 20 Mar 2014 08:16:59 +0000 (10:16 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 10 Apr 2014 12:04:46 +0000 (15:04 +0300)
This option causes packaging files to be imported into an orphan branch
which has no common history with the upstream branch. Patches are not
applied either, but, packaging files are imported "as is". The new
options is for supporting the new package maintenance model which has
separate branches for packaging files and source code development. After
importing a source package with this option, a development branch can be
created with "gbs devel start".

NOTE! The new option is only valid for implementing source rpms - no
effect when importing upstream tarballs.

Change-Id: Ib7004ccacf8bc15a9935ade60910a74c577893cb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gitbuildsys/cmd_import.py
tools/gbs

index 47b5f2de3c469079c95681b6362ee485ecdfc806..6bf19b48b0e8372ddc5d266b4678bc43dccdc3de 100644 (file)
@@ -71,6 +71,8 @@ def main(args):
             params.append("--allow-same-version")
         if args.native:
             params.append("--native")
+        if args.orphan_packaging:
+            params.append("--orphan-packaging")
         if args.no_patch_import:
             params.append("--no-patch-import")
         ret = gbp_import_srpm(params)
index 5d69c382703e9c11ca2878532becef86b2a95ee9..32c0c55445547869286d0259c69139a51c88b2de 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -71,6 +71,10 @@ def import_parser(parser):
     group.add_argument('--native', action='store_true',
                        help='this is a dist native package, no separate '
                        'upstream')
+    group.add_argument('--orphan-packaging', action='store_true',
+                       help='create a git layout for separate packaging and '
+                            'development branches (only for non-native '
+                            'packages)')
     group.add_argument('--no-patch-import', action='store_true',
                        help='don\'t import patches automatically')
     group = parser.add_argument_group('only for importing upstream tar ball '