Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463446 - dev-util/android-sdk-update-manager-21.1 unable to update itself
Summary: dev-util/android-sdk-update-manager-21.1 unable to update itself
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Richard Freeman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-27 09:22 UTC by urcindalo
Modified: 2013-05-20 10:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description urcindalo 2013-03-27 09:22:33 UTC
When I had dev-util/android-sdk-update-manager-21 installed I was able to update it internally to 21.1 through the Android SDK Manager.

Then a gentoo tree update to v21.1 appeared, and I installed it without problems (the normal warnings about detected collisions were displayed). I even reinstalled it a second time and the warnings disappeared.

Today, when trying to update it internally with the "Android SDK Manager", I just couldn't due to these failures:
=====
$ android update sdk -u
Refresh Sources:
  Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
  Validate XML
  Parse XML
  Fetched Add-ons List successfully
  Refresh Sources
  Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
  Validate XML: https://dl-ssl.google.com/android/repository/repository-7.xml
  Parse XML:    https://dl-ssl.google.com/android/repository/repository-7.xml
  ...
Installing Archives:
  Preparing to install archives
  Downloading Android SDK Platform-tools, revision 16.0.2
  Installing Android SDK Platform-tools, revision 16.0.2
    Stopping ADB server succeeded.
  Failed to rename directory /opt/android-sdk-update-manager/platform-tools to /opt/android-sdk-update-manager/temp/PlatformToolPackage.old01.
  Failed to create directory /opt/android-sdk-update-manager/platform-tools
  Downloading Documentation for Android SDK, API 17, revision 2
  Installing Documentation for Android SDK, API 17, revision 2
  Failed to rename directory /opt/android-sdk-update-manager/docs to /opt/android-sdk-update-manager/temp/DocPackage.old01.
  Failed to create directory /opt/android-sdk-update-manager/docs
  ...
=====

I just reinstalled dev-util/android-sdk-update-manager-21.1 just in case. Every file/folder inside /opt/android-sdk-update-manager has the root:android ownership except the content of /opt/android-sdk-update-manager/temp which belongs to myuser:myuser
Comment 1 Richard Freeman gentoo-dev 2013-03-27 15:42:21 UTC
What are the permissions.  If you're in the android group you should be able to modify those directories (with all the caveats about collisions/etc).  

Looking at my install (which is a mix of package vs installer content) it looks like I should have write access to everything one way or another.

If you aren't in the android group you'll definitely have problems modifying any of the original content.
Comment 2 urcindalo 2013-03-27 16:36:37 UTC
I AM in the android group.

As I said in the opening message, I had no problems whatsoever with v21 to update the sdk internally. It is only with v21.1 when I've experienced this for the first time.
Comment 3 Richard Freeman gentoo-dev 2013-03-27 18:41:14 UTC
Since I can't reproduce this I'll need more info on what exactly is going wrong.  It sounds like a permissions issue hence my question.

What happens if you just try to do:
mv /opt/android-sdk-update-manager/platform-tools /opt/android-sdk-update-manager/temp/PlatformToolPackage.old01

If that fails, please give me the output of:
ls -al /opt/android-sdk-update-manager/
ls -al /opt/android-sdk-update-manager/temp/
Comment 4 Shubhadeep Chaudhuri 2013-05-19 21:53:07 UTC
Right now, the android group can only write to add-ons, docs, platforms, temp & tools directories.
But it also needs to be able to write to platform-tools & extras directories.
Comment 5 Richard Freeman gentoo-dev 2013-05-20 10:46:59 UTC
Ok, I added the group to those directories in v22.  You might need to uninstall the sdk and clean up those directories to get the new permissions, or fix them manually.  Also, the actual android app will likely follow your umask (or not), and any files it installs will probably not have the android group, so if you install something with one user you might have trouble changing it with another.