Giter VIP home page Giter VIP logo

Comments (6)

EnigmaCurry avatar EnigmaCurry commented on August 30, 2024

I'm not setting any thing weird myself, but since it's building inside a container, it does require root access to delete the folder. arch-ppa does the clean with sudo. Perhaps it's an issue with your package list.

What list of packages are you using? I'll test that and see if I can reproduce. Thanks for testing!

from arch-ppa.

budric avatar budric commented on August 30, 2024

I believe it's obnam package (one of its dependencies PKGBUILD has a bug and fails to build), but here's my complete command history that reproduces the error of not being able to cleanup

git clone https://github.com/EnigmaCurry/arch-ppa.git
cd ./arch-ppa/
./arch-ppa add obnam lxd
./arch-ppa add oxipng
./arch-ppa add chromium-pepper-flash
./arch-ppa add zabbix-agent
./arch-ppa clean myrepo
./arch-ppa build myrepo

The build fails on this package

==> Making package: python2-cliapp

<snip> some download stuff </snip>

==> Starting build()...
Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    import cliapp
  File "/build/python2-cliapp/src/python-cliapp-1.20160109/cliapp/__init__.py", line 36, in <module>
    from .settings import (Settings, log_group_name, config_group_name,
  File "/build/python2-cliapp/src/python-cliapp-1.20160109/cliapp/settings.py", line 24, in <module>
    import yaml
ImportError: No module named yaml

Now

./arch-ppa clean myrepo
$ sudo rm -rf /home/budric/temp/arch-ppa/chroot/myrepo /home/budric/temp/arch-ppa/chroot/myrepo.lock
rm: cannot remove '/home/budric/temp/arch-ppa/chroot/myrepo': Operation not permitted

from arch-ppa.

budric avatar budric commented on August 30, 2024

I figured it out. I'm running this on top of btrfs and some part of the process above (I don't know if it's part of the script or some other part of Arch) created subvolumes under arch-ppa/chroot. These can't be removed with rm -rf and have to be deleted with btrfs subvolume delete first.

If subvolumes were created by arch-ppa script then it's a bug. If not perhaps you can consider this as enhancement request to check for btrfs and delete chroot subvolumes before issuing rm -rf.

from arch-ppa.

EnigmaCurry avatar EnigmaCurry commented on August 30, 2024

Interesting. Pretty sure arch-nspawn does btrfs volumes as part of its implementation, so there may have been some incompatibility with btrfs on top of btrfs.

from arch-ppa.

fallenpixel avatar fallenpixel commented on August 30, 2024

I'm running into this issue as well. The chroots are created as BTRFS subvolumes, and 'rm -rf'ing the directory will fail since it's a mount-point that is in use, instead you need to use btrfs subvol delete. I'm by no means an expert on scripting, but I'll take a look at this tomorrow and see if I can come up with something that works, if you'd like.

from arch-ppa.

rafaelsoaresbr avatar rafaelsoaresbr commented on August 30, 2024

On btrfs disks, the chroot is created as a subvolume, so you have to remove it by removing the subvolume with # btrfs subvolume delete $CHROOT/root

https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot#Setting_Up_A_Chroot

arch-ppa should check if this folder is also a btrfs subvolume. Something like this:

if [ $(sudo btrfs subvolume list 2>/dev/null | grep $repo) ];
then
    sudo btrfs subvolume delete $basedir/chroot/$repo
else
    echo "Do something else..."
fi

from arch-ppa.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.