[PATCH rdma-core v1 04/14] cbuild: Reduce list of supported for packaging distributions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Hide from tyhe help output the distribution which anyway can't
be built, like centos6 and centos7_epel.

Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
---
 buildlib/cbuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index d6d87b90..492eee7f 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -388,6 +388,15 @@ class ToEnvAction(argparse.Action):
                         res.add(env);
         setattr(namespace, self.dest, sorted(res,key=lambda x:x.name))
 
+def env_choices_pkg():
+    """All the names that can be used with ToEnvAction"""
+    envs = set(("all",));
+    for I in environments:
+        if I.name == "travis" or getattr(I,"is_deb",False) or getattr(I,"is_rpm",False):
+                envs.add(I.name);
+                envs.update(I.aliases);
+    return envs;
+
 def env_choices():
     """All the names that can be used with ToEnvAction"""
     envs = set(("all",));
@@ -719,7 +728,7 @@ def run_travis_build(args,env):
         copy_abi_files(os.path.join(tmpdir, "src/ABI"));
 
 def args_pkg(parser):
-    parser.add_argument("ENV",action=ToEnvAction,choices=env_choices());
+    parser.add_argument("ENV",action=ToEnvAction,choices=env_choices_pkg());
     parser.add_argument("--run-shell",default=False,action="store_true",
                         help="Instead of running the build, enter a shell");
     parser.add_argument("--use-prebuilt-pandoc",default=False,action="store_true",
-- 
2.19.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux