prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Awesome profile installation failed with no such file or directory on xdg-mime
  ![VirtualBox_arch_09_04_2021_17_47_40](https://user-images.githubusercontent.com/277927/114245038-9f62e980-995d-11eb-965c-e5a9fbb9ded2.png)
  ![VirtualBox_arch_09_04_2021_17_53_17](https://user-images.githubusercontent.com/277927/114245039-9ffb8000-995d-11eb-8f73-2ece536d1c2a.png)
  
  Resolve #261 and related issues
  Closes #262.
  
  🚨 PR Guidelines:
  
  # New features *(v2.2.0)*
  
  Merge new features in to `torxed-v2.2.0`.<br>
  This branch is designated for potential breaking changes, added complexity and new functionality.
  
  # Bug fixes *(v2.1.4)*
  
  Merge against `master` for bug fixes and anything that improves stability and quality of life.<br>
  This excludes:
   * New functionality
   * Added complexity
   * Breaking changes
  
  Any changes to `master` automatically gets pulled in to `torxed-v2.2.0` to avoid merge hell.
  
  # Describe your PR
  
  If the changes has been discussed in an Issue, please tag it so we can backtrace from the Issue later on.<br>
  If the PR is larger than ~20 lines, please describe it here unless described in an issue.
  
  # Testing
  
  Any new feature or stability improvement should be tested if possible.
  Please follow the test instructions at the bottom of the README.
  
  *These PR guidelines will change after 2021-05-01, which is when `v2.1.4` gets onto the new ISO*
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `profiles/desktop.py`
  Content:
  ```
  1 # A desktop environment selector.
  2 
  3 import archinstall, os
  4 
  5 is_top_level_profile = True
  6 
  7 # New way of defining packages for a profile, which is iterable and can be used out side
  8 # of the profile to get a list of "what packages will be installed".
  9 __packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools']
  10 
  11 def _prep_function(*args, **kwargs):
  12 	"""
  13 	Magic function called by the importing installer
  14 	before continuing any further. It also avoids executing any
  15 	other code in this stage. So it's a safe way to ask the user
  16 	for more input before any other installer steps start.
  17 	"""
  18 
  19 	supported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon', 'xfce4', 'lxqt', 'i3', 'budgie']
  20 	desktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ')
  21 	
  22 	# Temporarily store the selected desktop profile
  23 	# in a session-safe location, since this module will get reloaded
  24 	# the next time it gets executed.
  25 	archinstall.storage['_desktop_profile'] = desktop
  26 
  27 	profile = archinstall.Profile(None, desktop)
  28 	# Loading the instructions with a custom namespace, ensures that a __name__ comparison is never triggered.
  29 	with profile.load_instructions(namespace=f"{desktop}.py") as imported:
  30 		if hasattr(imported, '_prep_function'):
  31 			return imported._prep_function()
  32 		else:
  33 			print(f"Deprecated (??): {desktop} profile has no _prep_function() anymore")
  34 
  35 if __name__ == 'desktop':
  36 	"""
  37 	This "profile" is a meta-profile.
  38 	There are no desktop-specific steps, it simply routes
  39 	the installer to whichever desktop environment/window manager was chosen.
  40 
  41 	Maybe in the future, a network manager or similar things *could* be added here.
  42 	We should honor that Arch Linux does not officially endorse a desktop-setup, nor is
  43 	it trying to be a turn-key desktop distribution.
  44 
  45 	There are plenty of desktop-turn-key-solutions based on Arch Linux,
  46 	this is therefore just a helper to get started
  47 	"""
  48 	
  49 	# Install common packages for all desktop environments
  50 	installation.add_additional_packages(__packages__)
  51 
  52 	# TODO: Remove magic variable 'installation' and place it
  53 	#       in archinstall.storage or archinstall.session/archinstall.installation
  54 	installation.install_profile(archinstall.storage['_desktop_profile'])
  55 
  56
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/profiles/desktop.py b/profiles/desktop.py
  --- a/profiles/desktop.py
  +++ b/profiles/desktop.py
  @@ -6,7 +6,7 @@
   
   # New way of defining packages for a profile, which is iterable and can be used out side
   # of the profile to get a list of "what packages will be installed".
  -__packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools']
  +__packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools', 'xdg-utils']
   
   def _prep_function(*args, **kwargs):
   	"""
  
verification_info: {"golden_diff": "diff --git a/profiles/desktop.py b/profiles/desktop.py\n--- a/profiles/desktop.py\n+++ b/profiles/desktop.py\n@@ -6,7 +6,7 @@\n \n # New way of defining packages for a profile, which is iterable and can be used out side\n # of the profile to get a list of \"what packages will be installed\".\n-__packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools']\n+__packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools', 'xdg-utils']\n \n def _prep_function(*args, **kwargs):\n \t\"\"\"\n", "issue": "Awesome profile installation failed with no such file or directory on xdg-mime\n![VirtualBox_arch_09_04_2021_17_47_40](https://user-images.githubusercontent.com/277927/114245038-9f62e980-995d-11eb-965c-e5a9fbb9ded2.png)\r\n![VirtualBox_arch_09_04_2021_17_53_17](https://user-images.githubusercontent.com/277927/114245039-9ffb8000-995d-11eb-8f73-2ece536d1c2a.png)\r\n\nResolve #261 and related issues\nCloses #262.\r\n\r\n\ud83d\udea8 PR Guidelines:\r\n\r\n# New features *(v2.2.0)*\r\n\r\nMerge new features in to `torxed-v2.2.0`.<br>\r\nThis branch is designated for potential breaking changes, added complexity and new functionality.\r\n\r\n# Bug fixes *(v2.1.4)*\r\n\r\nMerge against `master` for bug fixes and anything that improves stability and quality of life.<br>\r\nThis excludes:\r\n * New functionality\r\n * Added complexity\r\n * Breaking changes\r\n\r\nAny changes to `master` automatically gets pulled in to `torxed-v2.2.0` to avoid merge hell.\r\n\r\n# Describe your PR\r\n\r\nIf the changes has been discussed in an Issue, please tag it so we can backtrace from the Issue later on.<br>\r\nIf the PR is larger than ~20 lines, please describe it here unless described in an issue.\r\n\r\n# Testing\r\n\r\nAny new feature or stability improvement should be tested if possible.\r\nPlease follow the test instructions at the bottom of the README.\r\n\r\n*These PR guidelines will change after 2021-05-01, which is when `v2.1.4` gets onto the new ISO*\r\n\n", "before_files": [{"content": "# A desktop environment selector.\n\nimport archinstall, os\n\nis_top_level_profile = True\n\n# New way of defining packages for a profile, which is iterable and can be used out side\n# of the profile to get a list of \"what packages will be installed\".\n__packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools']\n\ndef _prep_function(*args, **kwargs):\n\t\"\"\"\n\tMagic function called by the importing installer\n\tbefore continuing any further. It also avoids executing any\n\tother code in this stage. So it's a safe way to ask the user\n\tfor more input before any other installer steps start.\n\t\"\"\"\n\n\tsupported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon', 'xfce4', 'lxqt', 'i3', 'budgie']\n\tdesktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ')\n\t\n\t# Temporarily store the selected desktop profile\n\t# in a session-safe location, since this module will get reloaded\n\t# the next time it gets executed.\n\tarchinstall.storage['_desktop_profile'] = desktop\n\n\tprofile = archinstall.Profile(None, desktop)\n\t# Loading the instructions with a custom namespace, ensures that a __name__ comparison is never triggered.\n\twith profile.load_instructions(namespace=f\"{desktop}.py\") as imported:\n\t\tif hasattr(imported, '_prep_function'):\n\t\t\treturn imported._prep_function()\n\t\telse:\n\t\t\tprint(f\"Deprecated (??): {desktop} profile has no _prep_function() anymore\")\n\nif __name__ == 'desktop':\n\t\"\"\"\n\tThis \"profile\" is a meta-profile.\n\tThere are no desktop-specific steps, it simply routes\n\tthe installer to whichever desktop environment/window manager was chosen.\n\n\tMaybe in the future, a network manager or similar things *could* be added here.\n\tWe should honor that Arch Linux does not officially endorse a desktop-setup, nor is\n\tit trying to be a turn-key desktop distribution.\n\n\tThere are plenty of desktop-turn-key-solutions based on Arch Linux,\n\tthis is therefore just a helper to get started\n\t\"\"\"\n\t\n\t# Install common packages for all desktop environments\n\tinstallation.add_additional_packages(__packages__)\n\n\t# TODO: Remove magic variable 'installation' and place it\n\t#       in archinstall.storage or archinstall.session/archinstall.installation\n\tinstallation.install_profile(archinstall.storage['_desktop_profile'])\n\n", "path": "profiles/desktop.py"}], "after_files": [{"content": "# A desktop environment selector.\n\nimport archinstall, os\n\nis_top_level_profile = True\n\n# New way of defining packages for a profile, which is iterable and can be used out side\n# of the profile to get a list of \"what packages will be installed\".\n__packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools', 'xdg-utils']\n\ndef _prep_function(*args, **kwargs):\n\t\"\"\"\n\tMagic function called by the importing installer\n\tbefore continuing any further. It also avoids executing any\n\tother code in this stage. So it's a safe way to ask the user\n\tfor more input before any other installer steps start.\n\t\"\"\"\n\n\tsupported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon', 'xfce4', 'lxqt', 'i3', 'budgie']\n\tdesktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ')\n\t\n\t# Temporarily store the selected desktop profile\n\t# in a session-safe location, since this module will get reloaded\n\t# the next time it gets executed.\n\tarchinstall.storage['_desktop_profile'] = desktop\n\n\tprofile = archinstall.Profile(None, desktop)\n\t# Loading the instructions with a custom namespace, ensures that a __name__ comparison is never triggered.\n\twith profile.load_instructions(namespace=f\"{desktop}.py\") as imported:\n\t\tif hasattr(imported, '_prep_function'):\n\t\t\treturn imported._prep_function()\n\t\telse:\n\t\t\tprint(f\"Deprecated (??): {desktop} profile has no _prep_function() anymore\")\n\nif __name__ == 'desktop':\n\t\"\"\"\n\tThis \"profile\" is a meta-profile.\n\tThere are no desktop-specific steps, it simply routes\n\tthe installer to whichever desktop environment/window manager was chosen.\n\n\tMaybe in the future, a network manager or similar things *could* be added here.\n\tWe should honor that Arch Linux does not officially endorse a desktop-setup, nor is\n\tit trying to be a turn-key desktop distribution.\n\n\tThere are plenty of desktop-turn-key-solutions based on Arch Linux,\n\tthis is therefore just a helper to get started\n\t\"\"\"\n\t\n\t# Install common packages for all desktop environments\n\tinstallation.add_additional_packages(__packages__)\n\n\t# TODO: Remove magic variable 'installation' and place it\n\t#       in archinstall.storage or archinstall.session/archinstall.installation\n\tinstallation.install_profile(archinstall.storage['_desktop_profile'])\n\n", "path": "profiles/desktop.py"}]}