add ignore_pacakges option, switch to pkgbase everywhere

This commit is contained in:
2021-03-07 15:30:01 +03:00
parent 77db49a379
commit 550474f790
4 changed files with 8 additions and 2 deletions

View File

@ -144,6 +144,8 @@ class Repository:
def updates_aur(self, checked: List[str]) -> List[Package]:
result: List[Package] = []
ignore_list = self.config.get_list(
self.config.get_section_name('build', self.architecture), 'ignore_packages')
for fn in os.listdir(self.paths.repository):
if '.pkg.' not in fn:
@ -157,6 +159,8 @@ class Repository:
continue
if local.name in checked:
continue
if local.name in ignore_list:
continue
if local.is_outdated(remote):
result.append(remote)

View File

@ -39,13 +39,13 @@ class Package:
@classmethod
def from_archive(cls: Type[Package], path: str, aur_url: str) -> Package:
name, version = check_output('expac', '-p', '%n %v', path, exception=None).split()
name, version = check_output('expac', '-p', '%e %v', path, exception=None).split()
return cls(name, version, f'{aur_url}/{name}.git')
@classmethod
def from_aur(cls: Type[Package], name: str, aur_url: str)-> Package:
package = aur.info(name)
return cls(package.name, package.version, f'{aur_url}/{name}.git')
return cls(package.package_base, package.version, f'{aur_url}/{package.package_base}.git')
@classmethod
def from_build(cls: Type[Package], path: str) -> Package: