Conflicting Files When Updating (Manjaro 0.8.0)

From Manjaro Linux
Jump to: navigation, search

Overview

As Manjaro is currently in its beta stage of development, there have been - and will likely continue to be - some significant changes to the underlying system as it evolves towards a stable 1.x release. As such, to accommodate these changes, safeguards have been built in from the release of Manjaro 0.8.1 onwards to ensure that new system updates will continue to be installed smoothly and successfully, nonetheless.

However, as these safeguards had not been enabled in Manjaro 0.8.0, users who installed this release may find that attempts to update the system after a while may be unsuccessful due to conflicting files. Fortunately, although it is recommended that new users install the latest point release of Manjaro (or at least 0.8.1 onwards), it is still possible to quite easily enable this safeguard manually in the 0.8.0 release. This is undertaken by amending the pacman configuration file. pacman is itself the package manager used by Manjaro (and other Arch-based systems) to download, install, and remove software packages.


Opening the Pacman Configuration File

You will need to first open your terminal in order to edit the pacman configuration file. The syntax of the command to do this is:

sudo [text editor] /etc/pacman.conf


For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:

sudo nano /etc/pacman.conf


Otherwise - if you have installed the full version of Manjaro (i.e. not the NET-Edition) - you may find it easier to use the pre-installed gedit text editor instead. This will open the configuration file up as a document, making it easier to read and edit. To use gedit instead, enter the command:

sudo gedit /etc/pacman.conf


Once the pacman configuration file has been opened, two steps will be required to enable the appropriate safeguard. Don't worry if the contents of this file seem complex and intimidating, as only two elements need to be amended, and the amendments themselves are very simple and straightforward.


Enabling the Safeguards

Tip: It is possible to copy and paste the examples provided for the HoldPkg and Syncfirst commands, rather than typing them in yourself.


To enable the safeguards, it will be necessary to amend just two lines of the pacman configuration file. This is in order to ensure that:

1. The pacman, glibc, and manjaro-system files are never removed when updating (by enabling the HoldPkg = command), and

2. the pacman and manjaro-system files are always updated first, before anything else (by enabling the SyncFirst = command).


Lines beginning with a hash '#' will be ignored by Manjaro. As such, these commands may be enabled by simply removing any hashes present at the beginning of the lines they are listed on. Once done, it will then just be a case of ensuring that all of the correct files are listed for each of enabled commands.


The HoldPkg Command

The HoldPkg = command is located in the GENERAL OPTIONS section, near the top of the pacman configuration file. Once the line containing this command has been found:

  • remove the hash (if present) from the beginning of it to enable the command, and 
  • ensure that the appropriate files - pacman, glibc and manjaro-system - are listed after the command itself.


Once complete, the line should look like this:

HoldPkg = pacman glibc manjaro-system


An example as been provided below where the necessary amendment has been made to the HoldPkg = command. This has been coloured in green for illustrative purposes:

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
HoldPkg      = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst    = manjaro-system pacman
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto


Once the amendment has been made, the next command can be enabled.


The SyncFirst Command

The SyncFirst = command is also located in the GENERAL OPTIONS section, near the top of the pacman configuration file. Once the line containing this command has been found:

  • again, remove the hash (if present) from the beginning of it to enable the command, and
  • ensure that the appropriate files - manjaro-system and pacman - are listed after the command itself.


Once complete, the line should look like this:

SyncFirst = manjaro-system pacman


An example as been provided below where the necessary amendment has been made to the Syncfirst = command. This has been coloured in green for illustrative purposes:

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
HoldPkg      = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst   = manjaro-system pacman
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto


Once both the HoldPkg = and Syncfirst = commands have been properly enabled, save your changes and close the configuration file by:

  • nano: Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
  • gedit: Select the 'save' option and then close the window.


Now all that is required to update your system.


Updating the System

Once the pacman configuration file has been amended to enable the safeguards, it will be necessary to synchronise and to update your system from the software repositories.


1. First, to synchronise with the repositories enter the command:

sudo pacman -Syy


2. Second, to only update the Manjaro system enter the command:

sudo pacman -S manjaro-system


3. And third, to update the entire system enter the command:

sudo pacman -Su

Once complete, you should henceforth be able to successfully update your system as normal without encountering issues such as conflicting files.