Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
workaround for a bug in antergos-iso, enables multilib only if it is …
Browse files Browse the repository at this point in the history
…not.
  • Loading branch information
karasu committed Sep 9, 2018
1 parent de2cd05 commit 4467e78
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions cnchi
24 changes: 24 additions & 0 deletions src/cnchi.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,27 @@ def check_for_files():
return True


def enable_multilib():
""" Enable multilib repo in /etc/pacman.conf """

# Check if it is enabled
with open("/etc/pacman.conf", 'rt') as pconf:
lines = pconf.readlines()

enabled = False
for line in lines:
if line.startswith("[multilib]"):
enabled = True
break

if not enabled:
logging.debug("Adding multilib repository to /etc/pacman.conf")
with misc.raised_privileges():
with open("/etc/pacman.conf", 'at') as pconf:
pconf.write("[multilib]\n")
pconf.write("Include = /etc/pacman.d/mirrorlist\n\n")


def init_cnchi():
""" This function initialises Cnchi """

Expand Down Expand Up @@ -477,6 +498,9 @@ def init_cnchi():
if not check_iso_version():
sys.exit(1)

# Workaround for bug in antergos-iso
enable_multilib()

# Init PyObject Threads
threads_init()

Expand Down
2 changes: 1 addition & 1 deletion src/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

""" Set some Cnchi global constants """

CNCHI_VERSION = "0.14.476"
CNCHI_VERSION = "0.14.477"
CNCHI_WEBSITE = "http://www.antergos.com"
CNCHI_RELEASE_STAGE = "production"

Expand Down
2 changes: 1 addition & 1 deletion update.info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"version":"0.14.476","files":[
{"version":"0.14.477","files":[
]}

0 comments on commit 4467e78

Please sign in to comment.