willeccles / cpm

🌵 A wrapper for package managers to make them consistent for those of us who are lazy.
MIT License
69 stars 13 forks source link

impliment CRUX, ren lunar, remove duplicate in filelistftr #50

Closed foxsouns closed 2 years ago

foxsouns commented 2 years ago

we fall out of spec again on clean. pkgutils is pretty rudimentary, and doesn't have a remove w/ deps, and i elected to use standard install, over depinst. info should provide a deplist, useful for inst or rm.

i also renamed lunar linux to lunar, so it matches the rest

foxsouns commented 2 years ago

@willeccles this is ready for your review.

eepykate commented 2 years ago

Ooh new pfp?

Lets get this motato, anyway.

foxsouns commented 2 years ago

@6gk haha yeah, decided to do away with niko for a while. pusheen is temporary, but will stay for a while. but i'm getting off topic.

zmop commented 2 years ago

this is sage: im locked out of my main for the day (misplaced my main device, passwords are stuck on there): but i am here if needed, and will have control of my main again in around 7 hours.

zmop commented 2 years ago

though i cannot edit the file, ill start drafting it in the comments, and have it ready when i get back to my main

listorphans should output, line by line, the packages that have no dependencies prt-get remove supports only one at a time

prt-get listorphans | prt-get remove "$@"

this might work:

cruxorphans() {
  coendvar=
  unset found
  if "$coendvar"; then
    while IFS= read -r line; do
      [ "$line" = "" ] && found=1
      [ "$found" ] || prt-get remove "$line"
      [ "$found" ] && done
  fi
}

as always, im not really that great at bash, i just fill in the lines and make it look ok this may and probably does completely overcomplicates it, as always, and might also not work.

willeccles commented 2 years ago

I am not sure what the output of prt-get listorphans looks like. If it is just the names of the packages on each line, you can probably do this quite easily with one command (something like prt-get remove $(prt-get listorphans)). However, if the lines require processing (e.g. they have data at the end of them like the output of xbps's list commands), you may have to process the data first.

zmop commented 2 years ago

I am not sure what the output of prt-get listorphans looks like. If it is just the names of the packages on each line, you can probably do this quite easily with one command (something like prt-get remove $(prt-get listorphans)). However, if the lines require processing (e.g. they have data at the end of them like the output of xbps's list commands), you may have to process the data first.

according to the wiki, prt-get listorphans should print just package names, and the -v and -vv flags add more.

willeccles commented 2 years ago

Having read the wiki and the source, I am not convinced that the output of listorphans can be used directly without some processing. Have you tried this out?

zmop commented 2 years ago

i'll be able to soon, but i have yet to do so. give me a second to try and vm it, but as i said, i'm not on my main machine.

foxsouns commented 2 years ago

back on main. life got in the way earlier, but i will verify that crux works as assumed soon

foxsouns commented 2 years ago

noticed another duplicate in filelistftr, and though it works, it's redundant. im working on making the vm for crux now.

foxsouns commented 2 years ago

i just wasted 2 hours trying to virtualize crux i didnt set enough storage for it >:(

"yeah 512 will be enough": me before wasting hours of cpu and ram

foxsouns commented 2 years ago

expect an answer for how listorphans works by tomorrow. im miffed.

foxsouns commented 2 years ago

fyi: ugh i broke it again i'm givin up for today, ill try again tomorrow morning, probably

eepykate commented 2 years ago

512

512 MB? wack

foxsouns commented 2 years ago

@6gk i have 2 free gigs rn, didn't really wanna give off more than i needed to

eepykate commented 2 years ago

Oh? ​ Yeah that's not a lot.

foxsouns commented 2 years ago

i was referring to storage, but ram as well isn't ideal for me either, as host has 4 gigs ram.

eepykate commented 2 years ago

Yea I forgot that for a minute on making the second comment.

Why do you only have 2GB of storage free though? Do you have 64GB storage?

foxsouns commented 2 years ago

shared system: all else is used by other users

foxsouns commented 2 years ago

well only like 3 people but storage is like 32gb at most

foxsouns commented 2 years ago

i'm givin up for today, ill try again tomorrow morning, probably

assuming my average install time of 2 hours: no. if i start now i wont wake up in time for tomorrow. i will do this soon. setting an alarm for it.

foxsouns commented 2 years ago

i have been ignoring this for too long: time for me to maybe do something

foxsouns commented 2 years ago

@willeccles @6gk bit the bullet against my procrastination and tried to test crux today. while i was waiting for the install, looking through the docs, and i found a script natively in crux named pkgfoster. its the clean for this, cant believe i didnt see it earlier!

oh and, to note, this pr also moves guix into the right spot on the readme and removes the 'linux' from 'lunar linux', both on the readme and in the elif list.

p.s. sorry for my utterly shameful github usage, haha.