aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ipsutils/config.py6
-rw-r--r--ipsutils/env.py5
-rw-r--r--simple.ips30
3 files changed, 39 insertions, 2 deletions
diff --git a/ipsutils/config.py b/ipsutils/config.py
index 756d8fa..3f4dc08 100644
--- a/ipsutils/config.py
+++ b/ipsutils/config.py
@@ -38,6 +38,7 @@ class Config(object):
key_dict['arch'] = ''
key_dict['classification'] = ''
key_dict['description'] = ''
+ key_dict['badpath'] = ''
#Define valid build script sections in SPEC file
script_dict = collections.OrderedDict()
@@ -88,7 +89,7 @@ class Config(object):
continue
if line.startswith('#'):
continue
- parts = shlex.split(line)
+ parts = shlex.split(line, posix=False)
if '%end' in parts:
found_data = False
if section in parts:
@@ -103,6 +104,9 @@ class Config(object):
if not self.check_keywords():
exit(1)
+ def _quote(self, s):
+ return "'" + s.replace("'", "'\\''") + "'"
+
def check_keywords(self):
"""Validate SPEC file's FMRI section
"""
diff --git a/ipsutils/env.py b/ipsutils/env.py
index ce9dd21..0551b3c 100644
--- a/ipsutils/env.py
+++ b/ipsutils/env.py
@@ -46,9 +46,12 @@ class Environment(config.Config):
'PKGS': self.pathgen('PKGS'),
'SPKGS': self.pathgen('SPKGS')
}
+
# complete_name is required to build proper path names.
- # The use of "self" in this case may be deprecated in the future.
self.complete_name = self.key_dict['name'] + '-' + self.key_dict['version']
+ if self.key_dict['badpath']:
+ self.complete_name = self.key_dict['badpath']
+
# Dictionary of package-level directories
self.env_pkg = {
'BUILDROOT': os.path.join(self.env['BUILDROOT'], self.complete_name),
diff --git a/simple.ips b/simple.ips
new file mode 100644
index 0000000..08029b2
--- /dev/null
+++ b/simple.ips
@@ -0,0 +1,30 @@
+name: simple
+repackage:
+version:
+release: 1
+group:
+summary: ""
+license:
+maintainer: ""
+upstream_url:
+source_url:
+arch:
+classification: ""
+description: ""
+
+
+%prep
+
+%end
+
+%build
+
+%end
+
+%install
+
+%end
+
+%transforms
+
+%end