GithubHelp home page GithubHelp logo

Restore minimal system about kiss HOT 7 CLOSED

kisslinux avatar kisslinux commented on May 29, 2024
Restore minimal system

from kiss.

Comments (7)

Vouivre avatar Vouivre commented on May 29, 2024 1

Ok, it's time to package more software to see if it works. Thanks!

from kiss.

dylanaraps avatar dylanaraps commented on May 29, 2024

In essence, the ability to revert to the packages only in the chroot?

from kiss.

Vouivre avatar Vouivre commented on May 29, 2024

Yes.

from kiss.

dylanaraps avatar dylanaraps commented on May 29, 2024

This script can be used:

#!/bin/sh -ef
#
# Disable word-splittng warnings as they're safe here.
# shellcheck disable=SC2046
#
# kiss-reset: Remove all packages except for the base.

set -- \
    $(kiss l | while read -r pkg _; do
        case $pkg in
            baselayout|binutils|bison|busybox|bzip2|curl|flex|gcc|git|\
            gzip|kiss|libelf|libressl|linux-headers|m4|make|mandoc|musl|\
            perl|pkgconf|rsync|xz|zlib) ;;

            *) printf '%s\n' "$pkg" ;;
        esac
    done)

[ "$1" ] && {
    printf 'WARNING: This will remove \033[1m%s\033[m package(s).\n' "$#"
    printf 'Continue? [Enter/Ctrl+C]\n'
    read -r _ && KISS_FORCE=1 kiss r "$@"
}

Please let me know if this satisfies your needs and I'll add it to kiss-utils.

from kiss.

Vouivre avatar Vouivre commented on May 29, 2024

Here is what I got:

./kiss-reset.sh
WARNING: This will remove 57 package(s).
Continue? [Enter/Ctrl+C]

-> Removing packages
-> zathura-pdf-poppler Removed successfully
-> zathura Removed successfully
-> poppler-glib Removed successfully
-> libjpeg-turbo Removed successfully
-> yasm Removed successfully
-> girara Removed successfully
-> json-c Removed successfully
-> gtk+3 Removed successfully
-> pango Removed successfully
-> libXft Removed successfully
-> libepoxy Removed successfully
-> libXinerama Removed successfully
-> libXi Removed successfully
-> libXcursor Removed successfully
-> libXcomposite Removed successfully
-> gdk-pixbuf Removed successfully
-> shared-mime-info Removed successfully
!> libxml2 Package is required by 'llvm', 'mesa'

I don't know in which order packages are removed, but it will be probably complicated with dependencies. I could imagine the following:

  • if a package can't be removed because of depencies, the removal can be skipped. After that the user has to run the script once again.
  • the goal is to restore a minimal system and we know it should work. So why not using:
     read -r _ && KISS_FORCE=1 kiss r "$@"

I tried with KISS_FORCE, for the moment I'm able to chroot in my system. I will do more testing by writing other packages.

from kiss.

dylanaraps avatar dylanaraps commented on May 29, 2024

KISS_FORCE=1 should work fine. Will also do some testing. 👍

from kiss.

dylanaraps avatar dylanaraps commented on May 29, 2024

Closing as KISS_FORCE=1 works fine. :)

I'll move this to a kiss-util or the Wiki sometime today.

from kiss.

Related Issues (20)

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.