Giter Site home page Giter Site logo

Comments (9)

kou1okada avatar kou1okada commented on August 25, 2024

I understood "busyness" is not reasonable.
But why the other commands are not clear in their function?
Do you have any ideas for names to clarify the functions?

from apt-cyg.

E3V3A avatar E3V3A commented on August 25, 2024
  • What do you mean with packages (plural) total size?
  • What do you mean with PATTERN_OF_SECTION?

If you show some examples of those, and the output, I may be able to help you reword its function into something that make more sense.

  • What do you mean with completion-install? (That does not make any sense, grammatically.) What is getting complete (or completed?) here? I contrary to what?

from apt-cyg.

kou1okada avatar kou1okada commented on August 25, 2024

packages-total-size sub command calculate the total size of packages, which is currently provided in package repository of cygwin, from setup.ini file.
This can estimate the required disk size for full mirrored cygwin package repository.
Does "packages-total-size" sounds little strange?
This means total-size sub sub command under the the packages sub command.
Perhaps, this should be separated to apt-cyg packages total-size.

PATTERN_OF_SECTION restricts category of packages which is calculated total-size.
You can find section names with describe sub command.
For example, apt-cyg packages-total-size dev calculates total size of packages which belong the dev section.

from apt-cyg.

E3V3A avatar E3V3A commented on August 25, 2024

Aha! :)

Perhaps, this should be separated to apt-cyg packages total-size

Yeah, that sound better, unless you wanna do: size-of-all-packages?

You can find section names with describe sub command.

So what sections are available? I'm not sure this is correct , since for python3-devel it is shown as Python Interpreters which is way too long...

But you still have not said what that busyness and completion-install is all about?

Anyway, thank you so much for paying attention and trying to help.
🥇

from apt-cyg.

kou1okada avatar kou1okada commented on August 25, 2024

Better name for packages-total-size

Maybe size-of-all-package is so nice, but I wanted to be grouping functions with packages, when I implemented it.
So, there are total-count, total-size, cached-count and cached-size sub sub commands under the packages sub command.

Categories which available

Now, I added ls-categories sub command at d9ae7d8.

Another way, that you can find list of all categories at Select Packages dialog of setup-*.exe as below steps:

  1. Open setup-*.exe.
  2. Click next, next, ... and next while Select Packages dialog displayed.
  3. Select Category with pull down menu of View.

Then, you will see the dialog as below:
image

Python is one of a category, Interpreters is another one.
You can find them at above list of categories.

Busyness means about

Windows processes, which is under running, lock files which they are using.
For example, when you are running bash process, /bin/bash.exe,
/usr/bin/cygwin1.dll, /usr/bin/cygreadline7.dll, /usr/bin/cygiconv-2.dll, /usr/bin/cygintl-8.dll and /usr/bin/cygncursesw-10.dll will be locked.
So, these file can not modify or remove until they will be unlocked.
These state calls as busy.
Maybe, packages show-busy-state is better than show-packages-busyness.

This command was implemented for safe behaviors to upgrade and remove packages.
But currently, it is not used in any sub commands, because it takes too long time to check busy state for many files.

The function of completion-install

Do you know bash-completion?
completion-install sub command is a pair of completion-uninstall sub command.
completion-install installs /etc/bash_completion.d/apt-cyg which is script of programmable completion for apt-cyg, and completion-uninstall uninstall it.

You can use it below steps:

  1. Install bash-completion with apt-cyg install bash-completion.
  2. Install /etc/bash_completion.d/apt-cyg with apt-cyg completion-install.
  3. Restart bash.

Now, with this, you become to use command line completion for apt-cyg.
For example, try to type apt-cyg get[TAB] and command line will be automatically complemented to apt-cyg get-proxy!

Happy hacking!
But perhaps, it is not so quick under the HDD environment. 😢

from apt-cyg.

E3V3A avatar E3V3A commented on August 25, 2024

Great Work! :)

  • I really like ls-categories.
  • As for the busyness, that clarifies somewhat. So basically you are checking if there are any lock files for a certain package? (How do you check this?)
  • As for bash-completion, I know it very well, but my imagination could not stretch that far to see that is what you meant. Great! Why not call it install-bash-completion or install-cmd-completion?

All what you just said is very useful and helpful. Please consider putting this on your README and cleanup/remove all that other old warnings etc. 💯 😄

from apt-cyg.

E3V3A avatar E3V3A commented on August 25, 2024

Aha! You're using Perl!

# Usage: isbusy [file ...]
function isbusy ()
{
  perl -e 'foreach $i(@ARGV){if(-f $i){open(DATAFILE,"+<",$i)||exit(0);close(DATAFILE);}}exit(1);' -- "$@"
}

from apt-cyg.

kou1okada avatar kou1okada commented on August 25, 2024

I tried to rewrite it with Programming Language C and OpenMP.
But unfortunately I couldn't get any distinct advantages of the performance.

from apt-cyg.

kou1okada avatar kou1okada commented on August 25, 2024

The reason, why I named completion-install instead of install-bash-completion, is same as I already told for packages-total-size.
I wanted grouping them (i.e. install and uninstall sub sub commands) with the completion sub command .

from apt-cyg.

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.