You are not logged in.

#1 2010-08-21 22:34:25

dominikh
Member
Registered: 2010-06-29
Posts: 12

Ruby gems installed from AUR leave files behind if removed again

Most Ruby gems in the AUR use the PKGBUILD snippet provided by http://wiki.archlinux.org/index.php/Rub … Guidelines – now I think that using "gem install" will avoid the sandbox and also make it impossible for yaourt/clyde/… to keep track of the installed files. As a result of this, removing an installed package again (with `{yaourt,clyde,…} -R <package>` will *not* uninstall the gem, at all.

A quick test demonstrates this:

$ gem list | grep hmac
$ yaourt -S ruby-hmac

$ gem list | grep hmac
ruby-hmac (0.4.0)
$ yaourt -R ruby-hmac

$ gem list | grep hmac
ruby-hmac (0.4.0)

As you can see, the gem is still there.

Doesn't that defeat the purpose of using packages?

Offline

#2 2010-08-22 14:32:47

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Ruby gems installed from AUR leave files behind if removed again

I can't replicate it:

$  gem list | grep hmac
ruby-hmac (0.4.0)
$  sudo bauerbill -R ruby-hmac
--> Switching to pacman: '/usr/bin/pacman --config /etc/pacman.conf -R ruby-hmac"
checking dependencies...

Remove (1): ruby-hmac-0.4.0-1

Total Removed Size:   0.42 MB

Do you want to remove these packages? [Y/n] y
(1/1) removing ruby-hmac                          
$  gem list | grep hmac
$  

All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2010-08-22 14:35:58

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: Ruby gems installed from AUR leave files behind if removed again

Firstly, yaourt/clyde do not keep track of AUR packages, they're kept track off by pacman. The PKGBUILD on the wiki looks just fine. Perhaps you have your own copy of that gem somewhere else?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2010-08-22 15:01:33

dominikh
Member
Registered: 2010-06-29
Posts: 12

Re: Ruby gems installed from AUR leave files behind if removed again

Nope, no own copy of that gem (like the first line in my paste shows).

Furthermore, I ran three more tests. One with yaourt, one with clyde and one with manually downloading the package, running makepkg and installing it with pacman. All three won't remove the gem:

[yaourt]    http://stuff.fork-bomb.org/trial1.txt
[clyde]     http://stuff.fork-bomb.org/trial2.txt
[pacman] http://stuff.fork-bomb.org/trial3.txt

What surprises me the most is that it says "Total Removed Size: 0.00 MB" for me, while it correctly shows the size for loafer.

I can't see anything I am missing.

Here some details on the version of rubygems:
$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.6
  - RUBY VERSION: 1.9.1 (2010-07-02 patchlevel 429) [i686-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1

$ which gem
/usr/bin/gem

Offline

#5 2010-08-22 15:59:39

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Ruby gems installed from AUR leave files behind if removed again

I can't reproduce this, neither with ruby-hmac nor with my own gem based ruby packages on aur (e.g. ruby-uuid or ruby-macaddr). Pacman says Installed/removed size for ruby-hmac is 0.42MB.

What's notable is that your gem version (1.3.6) is not the one currently shipped with arch's ruby package (1.3.1). Where does your gem installation come from?

On my system:

~$» pacman -Qo gem
/usr/bin/gem is owned by ruby 1.9.1_p429-1
~$» gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.9.1 (2010-07-02 patchlevel 429) [i686-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.9.1
     - /home/chenno/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

Offline

#6 2010-08-22 16:07:29

dominikh
Member
Registered: 2010-06-29
Posts: 12

Re: Ruby gems installed from AUR leave files behind if removed again

Okay, apparently I ran "gem update --system" ages ago, because 1.3.1 doesn't cut it for me.

Does that mean that Arch's Rubygems 1.3.1 has some patch applied to work properly with the PKGBUILDs?

Offline

#7 2010-08-22 16:23:14

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Ruby gems installed from AUR leave files behind if removed again

dominikh wrote:

Does that mean that Arch's Rubygems 1.3.1 has some patch applied to work properly with the PKGBUILDs?

There are no patches to rubygems in Arch's ruby package. Also there is no need to guess; just read /var/abs/extra/ruby/PKGBUILD.

All that it means is that you are using a different gem version as the one shipped with ruby. It may be the cause for your trouble, maybe not. I just pointed out that difference.

Offline

#8 2010-08-22 17:06:42

dominikh
Member
Registered: 2010-06-29
Posts: 12

Re: Ruby gems installed from AUR leave files behind if removed again

Okay, yes, it *is* caused by the newer version, it does work properly with 1.3.1.

Offline

Board footer

Powered by FluxBB