aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-07-05 20:53:10 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-07-05 20:53:10 +0300
commit89ea936652960049bf6ad307df83f52733819683 (patch)
tree13a6d07b3a27d0e31bbe7dd63a2b6a1fc189c31a /pomu/source/file.py
parentAdded the manpage (diff)
downloadpomu-89ea936652960049bf6ad307df83f52733819683.tar.gz
pomu-89ea936652960049bf6ad307df83f52733819683.tar.bz2
pomu-89ea936652960049bf6ad307df83f52733819683.zip
Some fixes
Diffstat (limited to 'pomu/source/file.py')
-rw-r--r--pomu/source/file.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pomu/source/file.py b/pomu/source/file.py
index ffd7c07..f42474d 100644
--- a/pomu/source/file.py
+++ b/pomu/source/file.py
@@ -31,8 +31,8 @@ class LocalEbuild():
) : self.path})
@staticmethod
- def from_data_file(path):
- with open(path, 'r') as f:
+ def from_data_dir(pkgdir):
+ with open(path.join(pkgdir, 'FS_ORIG_PATH'), 'r') as f:
return LocalEbuildSource.parse_ebuild_path(f.readline()).unwrap()
def write_meta(self, pkgdir):
@@ -66,4 +66,8 @@ class LocalEbuildSource():
def parse_full(uri):
if not uri.startswith('fs:'):
return Result.Err()
- return LocalEbuildSource.parse_ebuild_path(uri)
+ return LocalEbuildSource.parse_ebuild_path(uri[3:])
+
+ @classmethod
+ def from_meta_dir(cls, metadir):
+ return LocalEbuild.from_data_dir(cls, metadir)